| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- /*****************************************************************************
- * Module : Configs
- * File : config_define.h
- * Function : 定义用户参数常量
- *****************************************************************************/
- #ifndef CONFIG_DEFINE_H
- #define CONFIG_DEFINE_H
- /*****************************************************************************
- * Module : VDDIO等级定义
- *****************************************************************************/
- #define PMU_VDDIO_2V4 0x0 //2.4V
- #define PMU_VDDIO_2V5 0x1
- #define PMU_VDDIO_2V6 0x2
- #define PMU_VDDIO_2V7 0x3
- #define PMU_VDDIO_2V8 0x4
- #define PMU_VDDIO_2V9 0x5
- #define PMU_VDDIO_3V0 0x6
- #define PMU_VDDIO_3V1 0x7
- #define PMU_VDDIO_3V2 0x8
- #define PMU_VDDIO_3V3 0x9
- #define PMU_VDDIO_3V4 0xA
- #define PMU_VDDIO_3V5 0xB
- #define PMU_VDDIO_3V6 0xC
- #define PMU_VDDIO_3V7 0xD
- #define PMU_VDDIO_3V8 0xE
- #define PMU_VDDIO_3V9 0xF
- /*****************************************************************************
- * Module : MIC相关定义
- *****************************************************************************/
- #define MIC_BIAS_1V8 0x0 //1.8V
- #define MIC_BIAS_2V0 0x1
- #define MIC_BIAS_2V2 0x2
- #define MIC_BIAS_2V4 0x3
- #define MIC_BIAS_2V5 0x4
- #define MIC_BIAS_2V6 0x5
- #define MIC_BIAS_2V7 0x6
- #define MIC_BIAS_2V8 0x7
- #define MIC_BIAS_RES_0K 0x0
- #define MIC_BIAS_RES_1K 0x1
- #define MIC_BIAS_RES_2K 0x2
- #define MIC_BIAS_RES_4K 0x4
- #define MIC_BIAS_RES_8K 0x8
- #define MIC_ANA_GAIN_0 0x0
- #define MIC_ANA_GAIN_1 0x1
- #define MIC_ANA_GAIN_2 0x2
- #define MIC_ANA_GAIN_3 0x3
- #define MIC_ANA_GAIN_4 0x4
- #define MIC_ANA_GAIN_5 0x5
- #define MIC_ANA_GAIN_6 0x6
- #define MIC_ANA_GAIN_7 0x7
- /*****************************************************************************
- * Module : FLASH大小定义
- *****************************************************************************/
- #define FSIZE_1M 0x100000
- #define FSIZE_2M 0x200000
- #define FSIZE_512K 0x80000
- #define FSIZE_256K 0x40000
- #define FSIZE_128K 0x20000
- /*****************************************************************************
- * Module : FOTA升级方式选择列表
- *****************************************************************************/
- #define AB_FOT_TYPE_PACK 1 //FOTA压缩升级(代码做压缩处理,升级完成需做解压才可正常运行)
- #define AB_FOT_TYPE_NORMAL 2 //FOTA非压缩升级(代码完全双备份,不做压缩处理,升级完成可直接运行)
- #define AB_FOT_CHANNEL_BLE 0x01 //BLE->Device
- #define AB_FOT_CHANNEL_USB 0x02 //USB->Device
- #define AB_FOT_CHANNEL_ALL 0xff
- /*****************************************************************************
- * Module : SLEEP模式定义
- *****************************************************************************/
- #define SLEEP_DISABLE 0x00
- #define SLEEP_LEVEL_LV1 0x01
- #define SLEEP_LEVEL_LV2 0x02
- /*****************************************************************************
- * Module : Printf IO 定义
- *****************************************************************************/
- /* IO INDEX */
- #define PRINTF_NULL 0x00
- #define PRINTF_PA0 0xA0
- #define PRINTF_PA1 0xA1
- #define PRINTF_PA2 0xA2
- #define PRINTF_PA3 0xA3
- #define PRINTF_PA4 0xA4
- #define PRINTF_PA5 0xA5
- #define PRINTF_PA6 0xA6
- #define PRINTF_PA7 0xA7
- #define PRINTF_PA8 0xA8
- #define PRINTF_PA9 0xA9
- #define PRINTF_PA10 0xAA
- #define PRINTF_PA11 0xAB
- #define PRINTF_PA12 0xAC
- #define PRINTF_PA13 0xAD
- #define PRINTF_PA14 0xAE
- #define PRINTF_PA15 0xAF
- #define PRINTF_PB0 0xB0
- #define PRINTF_PB1 0xB1
- #define PRINTF_PB2 0xB2
- #define PRINTF_PB3 0xB3
- #define PRINTF_PB4 0xB4
- #define PRINTF_PB5 0xB5
- #define PRINTF_PB6 0xB6
- #define PRINTF_PB7 0xB7
- #define PRINTF_PB8 0xB8
- #define PRINTF_PB9 0xB9
- /* IO SWAPPER */
- #define GPIO_PORT_GET(x) (((x & 0xF0) == 0xA0)? GPIOA_REG: GPIOB_REG)
- #define GPIO_PIN_GET(x) (1 << (x & 0x0F))
- #endif //CONFIG_DEFINE_H
|