28#define Buzzer_Power_ON PE6=1
29#define Buzzer_Power_OFF PE6=0
Nano100 series peripheral access layer header file. This file contains all the peripheral register's ...
#define SYS_PC_H_MFP_PC13_MFP_Msk
NuEdu-Basic01 Buzzer driver header file.
void CLK_EnableModuleClock(uint32_t u32ModuleIdx)
This function enable module clock.
void CLK_SetModuleClock(uint32_t u32ModuleIdx, uint32_t u32ClkSrc, uint32_t u32ClkDiv)
This function set selected module clock source and module clock divider.
void GPIO_SetMode(GPIO_T *gpio, uint32_t u32PinMask, uint32_t u32Mode)
Set GPIO operation mode.
#define PE
Pointer to GPIO port E register structure.
#define PC
Pointer to GPIO port C register structure.
#define PWM1
Pointer to PWM1 register structure.
#define SYS
Pointer to SYS register structure.
uint32_t PWM_ConfigOutputChannel(PWM_T *pwm, uint32_t u32ChannelNum, uint32_t u32Frequency, uint32_t u32DutyCycle)
This function config PWM generator and get the nearest frequency in edge aligned auto-reload mode.
void PWM_Start(PWM_T *pwm, uint32_t u32ChannelMask)
This function start PWM module.
void PWM_EnableOutput(PWM_T *pwm, uint32_t u32ChannelMask)
This function enables PWM output generation of selected channels.
#define SYS_PC_H_MFP_PC13_MFP_PWM1_CH1
#define BIT13
Bit 13 mask of an 32 bit integer.
#define BIT6
Bit 6 mask of an 32 bit integer.
#define Buzzer_Power_OFF
Control Buzzer module power down.
void Close_Buzzer(void)
This function power down the Buzzer module.
void Write_Buzzer(unsigned int frequence, unsigned int duty)
This function set PWM output frequence and duty to drive Buzzer module.
#define Buzzer_Power_ON
Control Buzzer module power on.
void Open_Buzzer(void)
This function enable PWM1 module clock and set clock source to start Buzzer module.
void Initial_PWM_GPIO(void)
This function config PC.13 multi-function for PWM to drive Buzzer module, and config PE....