STM8L15x Standard Peripherals Drivers: stm8l15x_beep.c File Reference

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

stm8l15x_beep.c File Reference

This file provides firmware functions to manage the following functionalities of the BEEPER (BEEP) peripheral:

  • Initialization and Configuration
  • Low Speed Internal Clock(LSI) Calibration.
More...
#include "stm8l15x_beep.h"

Go to the source code of this file.

Functions

void BEEP_Cmd (FunctionalState NewState)
 Enable or disable the BEEP function.
void BEEP_DeInit (void)
 Deinitializes the BEEP peripheral registers to their default reset values.
void BEEP_Init (BEEP_Frequency_TypeDef BEEP_Frequency)
 Initializes the BEEP function according to the specified parameters.
void BEEP_LSClockToTIMConnectCmd (FunctionalState NewState)
 Enable or disable the LS clock source connection to TIM for measurement.
void BEEP_LSICalibrationConfig (uint32_t LSIFreqHz)
 Update CSR register with the measured LSI frequency.

Detailed Description

This file provides firmware functions to manage the following functionalities of the BEEPER (BEEP) peripheral:

  • Initialization and Configuration
  • Low Speed Internal Clock(LSI) Calibration.
Author:
MCD Application Team
Version:
V1.5.0
Date:
13-May-2011
  *          ===================================================================
  *                                 How to use this driver
  *          ===================================================================  
  *          1- Make sure that the LS RC clock calibration is performed by the following 
  *            steps:
  *               - Connect internally the LS clock source to TIM2 channel 1 input
  *                 capture for measurement using BEEP_LSClockToTIMConnectCmd() function
  *               - Update the BEEP_CSR register by the measured LSI frequency 
  *                  --> During this phase the BEEPER must be disabled to avoid 
  *                      unwanted interrupts  
  *
  *          2- Configure the output beeper frequency using the BEEP_Init() function
  *
  *          3- Enable the beeper using the BEEP_Cmd() function
  *
  *  
Attention:

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics

Definition in file stm8l15x_beep.c.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com