123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #ifndef __USER_DRIVER_H
- #define __USER_DRIVER_H
- #include "yc11xx_pwm.h"
- #include "system.h"
- #define FREQUENCY_DIVISION_0 0x0 //48M
- #define FREQUENCY_DIVISION_1 0x1 //24M
- #define FREQUENCY_DIVISION_2 0x2 //12M
- #define FREQUENCY_DIVISION_3 0x3 //6M
- #define FREQUENCY_DIVISION_4 0x4 //3M
- #define FREQUENCY_DIVISION_5 0x5 //1.5M
- #define FREQUENCY_DIVISION_6 0x6 //0.75M
- #define FREQUENCY_DIVISION_7 0x7 //0.375
- #define IS_FREQUENCY_DIVISION(FREQUENCY) ((FREQUENCY <= FREQUENCY_DIVISION_7))
- //#define HAL_MIN_48M_MIN_FREQUENCY ((48000000)/65535)
- #define HAL_MIN_48M_MIN_FREQUENCY ((48000000)/60000)
- #define HAL_MAX_48M_MAX_FREQUENCY (48000000>>1)
- #define HAL_MIN_24M_MIN_FREQUENCY ((24000000)/60000)
- #define HAL_MAX_24M_MAX_FREQUENCY (24000000>>1)
- #define HAL_MIN_12M_MIN_FREQUENCY ((12000000)/60000)
- #define HAL_MAX_12M_MAX_FREQUENCY (12000000>>1)
- #define HAL_MIN_6M_MIN_FREQUENCY ((6000000)/60000)
- #define HAL_MAX_6M_MAX_FREQUENCY (6000000>>1)
- #define HAL_MIN_3M_MIN_FREQUENCY ((3000000)/60000)
- #define HAL_MAX_3M_MAX_FREQUENCY (3000000>>1)
- #define HAL_MIN_1500K_MIN_FREQUENCY ((1500000)/60000)
- #define HAL_MAX_1500K_MAX_FREQUENCY (1500000>>1)
- #define HAL_MIN_750K_MIN_FREQUENCY ((750000)/60000)
- #define HAL_MAX_750K_MAX_FREQUENCY (750000>>1)
- #define HAL_MIN_375K_MIN_FREQUENCY ((375000)/65535)
- #define HAL_MAX_375K_MAX_FREQUENCY (375000>>1)
- void UserSet_OutPWM(GPIO_NUM gpio, PWM_ChxTypeDef pwm_channel,uint32_t frequecy,uint32_t percent);
- void ADC_Configuration(void);
- void Audio_to_uart_start();
- void Audio_sampling_init();
- void light_set_color(uint32_t color_rgb);
- void u_ble_data_send(uint8_t *send_data, uint8_t send_len);
- uint32_t HW_Get_Native_Clk_Avoid_Race(void);
- void flash_write_data (uint8_t *buffer, uint32_t address, uint32_t len);
- void flash_read_data (uint8_t *buffer, uint32_t address, uint32_t len);
- void flash_erase_sector(uint32_t address);
- uint8_t Get_Audio_val(void);
- unsigned char ReverseByteBits(unsigned char num);
- #endif
|