123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978 |
- #ifndef USR_CONFIG_H
- #define USR_CONFIG_H
- // <<< Use Configuration Wizard in Context Menu >>>\n
- #define SHOES_NAME "SMART SHOE"
- #define SHOES_NAME_LEN 64
- #define HARDWARE_VERSION 0x00010401
- #define SOFTWARE_VERSION 0x001C
- // <h> 公共
- // <h> 系统设置
-
- // <q> BLE_DFU_ENANBLE - 空中升级DFU使能
- #ifndef BLE_DFU_ENANBLE
- #define BLE_DFU_ENANBLE 1
- #endif
- // <e> BleNameHoldOn_ENANBLE - 蓝牙名字固定使能
- #ifndef BleNameHoldOn_ENANBLE
- #define BleNameHoldOn_ENANBLE 0
- #endif
- #if BleNameHoldOn_ENANBLE
- // <s> LEFT_NAME - 左鞋广播名称
- #define LEFT_NAME "SH_22_2"
- // <s> RIGHT_NAME - 右鞋广播前缀
- #define RIGHT_NAME "L1_"LEFT_NAME
- #define LAST_NAME "L0_"LEFT_NAME"_LAST"
- #endif
- // </e>
- // <e> ProcessTime_EN - 线程时间显示
- #ifndef ProcessTime_EN
- #define ProcessTime_EN 0
- #endif
- #if ProcessTime_EN
- // <o> DisInterval - 线程时间显示间隔
- #define DisInterval 10000
- #endif
- // </e>
- // <e> DEBUGLOG_ENABLE - SEGGER RTT打印
- #ifndef DEBUGLOG_ENABLE
- #define DEBUGLOG_ENABLE 0
- #endif
- // </e>
- // <o> WDT_RELOAD_VALUE - 看门狗重载入值,单位ms
- #ifndef WDT_RELOAD_VALUE
- #define WDT_RELOAD_VALUE 3000
- #endif
- // <q> LOSSPACK_ENANBLE - 丢包检测功能使能
- #ifndef LOSSPACK_ENANBLE
- #define LOSSPACK_ENANBLE 1
- #endif
- // <q> ONE_WIRE_ENABLE - 有线配对
- #ifndef ONE_WIRE_ENABLE
- #define ONE_WIRE_ENABLE 0
- #endif
- // <o> _IS_HOST - 主从选择
- // <0=> 从机
- // <1=> 主机
- #ifndef _IS_HOST
- #define _IS_HOST 0
- #endif
- // <q> USEFIFO - 采用FIFO方式发送
- #ifndef USEFIFO
- #define USEFIFO 0
- #endif
- // </h>
- // <e> DEBUG_EN - 调试信息
- #ifndef DEBUG_EN
- #define DEBUG_EN 1
- #endif
- #if DEBUG_EN
- // <q> DEBUG_LEDRUN - 运行灯
- #ifndef DEBUG_LEDRUN
- #define DEBUG_LEDRUN 0
- #endif
- // <q> DEBUG_LEDRGB - RGB灯
- #ifndef DEBUG_LEDRGB
- #define DEBUG_LEDRGB 0
- #endif
- // <q> DEBUG_FPS - 大循环fps
- #ifndef DEBUG_FPS
- #define DEBUG_FPS 0
- #endif
- // <q> DEBUG_DFU_EN - 流程调试:DFU
- #ifndef DEBUG_DFU_EN
- #define DEBUG_DFU_EN 0
- #endif
- // <q> DEBUG_STEP - 计步
- #ifndef DEBUG_STEP
- #define DEBUG_STEP 0
- #endif
- // <q> DEBUG_BLE_Client - ble 从机
- #ifndef DEBUG_BLE_Client
- #define DEBUG_BLE_Client 0
- #endif
- // <q> DEBUG_BLE_Host - ble 主机
- #ifndef DEBUG_BLE_Host
- #define DEBUG_BLE_Host 0
- #endif
- // <q> DEBUG_UART0 - UART0
- #ifndef DEBUG_UART0
- #define DEBUG_UART0 0
- #endif
- #endif
- // </e>
- // <h> 线程管理
- // <o> sleep_cb_max - 休眠之前最多事件数
- #ifndef sleep_cb_max
- #define sleep_cb_max 5
- #endif
- // <o> wakeup_cb_max - 唤醒最多事件数
- #ifndef wakeup_cb_max
- #define wakeup_cb_max 6
- #endif
- // <o> process_max - 最多线程数
- #ifndef process_max
- #define process_max 60
- #endif
- // <o> HeartTime_Interval - 心跳时间间隔,ms
- #ifndef HeartTime_Interval
- #define HeartTime_Interval 1
- #endif
- // <o> LowPower_Interval - 低功耗时间间隔,ms
- #ifndef LowPower_Interval
- #define LowPower_Interval 100
- #endif
- // <o> FullPower_Interval - 全功率时间间隔,ms
- #ifndef FullPower_Interval
- #define FullPower_Interval 10
- #endif
- // <o> StandByPower_Interval - 待机功耗时间间隔,ms
- #ifndef StandByPower_Interval
- #define StandByPower_Interval 1000
- #endif
- // </h>
- // <h> 优先级管理(协议使用:0,1,4,5,应用层不可使用。应用层使用:2,3,6)
- // <o> RTC2_IRQ_PRIORITY - RTC2优先级
- #ifndef RTC2_IRQ_PRIORITY
- #define RTC2_IRQ_PRIORITY 2
- #endif
- // <o> UART0_IRQ_PRIORITY - UART优先级
- #ifndef UART0_IRQ_PRIORITY
- #define UART0_IRQ_PRIORITY 3
- #endif
- // <o> SPI0_IRQ_PRIORITY - SPI0优先级
- #ifndef SPI0_IRQ_PRIORITY
- #define SPI0_IRQ_PRIORITY 6
- #endif
- // <o> SPI1_IRQ_PRIORITY - SPI1优先级
- #ifndef SPI1_IRQ_PRIORITY
- #define SPI1_IRQ_PRIORITY 6
- #endif
- // <o> SPI2_IRQ_PRIORITY - SPI2优先级
- #ifndef SPI2_IRQ_PRIORITY
- #define SPI2_IRQ_PRIORITY 6
- #endif
- // <o> PWM0_IRQ_PRIORITY - PWM0优先级
- #ifndef PWM0_IRQ_PRIORITY
- #define PWM0_IRQ_PRIORITY 6
- #endif
- // <o> ADC_IRQ_PRIORITY - ADC优先级
- #ifndef ADC_IRQ_PRIORITY
- #define ADC_IRQ_PRIORITY 3
- #endif
- // <o> WDT_IRQ_PRIORITY - WDT优先级
- #ifndef WDT_IRQ_PRIORITY
- #define WDT_IRQ_PRIORITY 6
- #endif
- // </h>
- // </h>
- // <h> PCB板选择
- // <o> PCB_VERSION - PCB板选择
- // <0=> PCB_V1.9
- // <1=> PCB_V2.0
- // <2=> PCB_V2.1
- // <3=> PCB_V2.2
- // <4=> PCB_V2.3
- #ifndef PCB_VERSION
- #define PCB_VERSION 4
- #endif
- #if PCB_VERSION == 0
- // <h> PCB_R1.9
- // <o> PIN_LED_RUN - 运行灯
- #ifndef PIN_LED_RUN
- #define PIN_LED_RUN 17
- #endif
- // <o> PIN_RESET_PIN - 硬件复位
- #ifndef PIN_RESET_PIN
- #define PIN_RESET_PIN 20
- #endif
- // <o> PIN_MT_EN - 电机使能
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 0
- #endif
- // <o> PIN_TXD_BLE - 串口发送
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 19
- #endif
- // <o> PIN_RXD_BLE - 串口接收
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 18
- #endif
- // <o> PIN_UART0_UNUSED_PIN - 串口空闲脚,左右鞋TX脚不能同时设置,否者接收不了,用个不使用的引脚设置TX作为中转,只保留RX就能接收。
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 10
- #endif
- // <o> PIN_LED_ENABLE - LED_ENABLE引脚
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 24
- #endif
- // <o> PIN_LED_CONTROL - LED_CONTROL引脚
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 23
- #endif
- // <o> PIN_SEL - 左右鞋区分引脚
- #ifndef PIN_SEL
- #define PIN_SEL 16
- #endif
- // <o> PIN_ADC_BAT_CHANNEL - 电池ADC输入通道
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 6
- #endif
- // <o> PIN_ADC_BAT_IN - 电池ADC输入引脚
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 30
- #endif
- // <o> PIN_FRONT_SENSE_POWER - FRONT_SENSE_POWER引脚
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 1
- #endif
- // <o> PIN_FRONT_SPI_MISO - FRONT_SPI_MISO引脚
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 2
- #endif
- // <o> PIN_FRONT_SPI_MOSI - FRONT_SPI_MOSI引脚
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 3
- #endif
- // <o> PIN_FRONT_SPI_SCLK - FRONT_SPI_SCLK引脚
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 4
- #endif
- // <o> PIN_FRONT_SPI_nCS - FRONT_SPI_nCS引脚
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 5
- #endif
- // <o> PIN_FLASH_SPI_MISO - FLASH_SPI_MISO引脚
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 7
- #endif
- // <o> PIN_FLASH_SPI_MOSI - FLASH_SPI_MOSI引脚
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 6
- #endif
- // <o> PIN_FLASH_SPI_SCLK - FLASH_SPI_SCLK引脚
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 8
- #endif
- // <o> PIN_FLASH_SPI_nCS - FLASH_SPI_nCS引脚
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 9
- #endif
- // <o> PIN_BACK_SENSE_POWER - BACK_SENSE_POWER引脚
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 25
- #endif
- // <o> PIN_BACK_SCL - BACK_SCL引脚
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 26
- #endif
- // <o> PIN_BACK_SDA - BACK_SDA引脚
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 28
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 29
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚通道
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 5
- #endif
- // <o> PIN_CHARGING - 正在充电引脚
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 31
- #endif
- // <o> LED_SMALL_ENABLE - 小灯亮
- #ifndef LED_SMALL_ENABLE
- #define LED_SMALL_ENABLE 0
- #endif
- // <o> LED_SMALL_DISABLE - 小灯灭
- #ifndef LED_SMALL_DISABLE
- #define LED_SMALL_DISABLE 1
- #endif
- // </h>
- #endif
- #if PCB_VERSION == 1
- // <h> PCB_R2.0
- // <o> PIN_LED_RUN - 运行灯
- #ifndef PIN_LED_RUN
- #define PIN_LED_RUN 19
- #endif
- // <o> PIN_RESET_PIN - 硬件复位
- #ifndef PIN_RESET_PIN
- #define PIN_RESET_PIN 20
- #endif
- // <o> PIN_MT_EN - 电机使能
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 10
- #endif
- // <o> PIN_TXD_BLE - 串口发送
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 26
- #endif
- // <o> PIN_RXD_BLE - 串口接收
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 26
- #endif
- // <o> PIN_UART0_UNUSED_PIN - 串口空闲脚,左右鞋TX脚不能同时设置,否者接收不了,用个不使用的引脚设置TX作为中转,只保留RX就能接收。
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 22
- #endif
- // <o> PIN_LED_ENABLE - LED_ENABLE引脚
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 27
- #endif
- // <o> PIN_LED_CONTROL - LED_CONTROL引脚
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 25
- #endif
- // <o> PIN_SEL - 左右鞋区分引脚
- #ifndef PIN_SEL
- #define PIN_SEL 18
- #endif
- // <o> PIN_ADC_BAT_CHANNEL - 电池ADC输入通道
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 2
- #endif
- // <o> PIN_ADC_BAT_IN - 电池ADC输入引脚
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 4
- #endif
- // <o> PIN_FRONT_SENSE_POWER - FRONT_SENSE_POWER引脚
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 5
- #endif
- // <o> PIN_FRONT_SPI_MISO - FRONT_SPI_MISO引脚
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 6
- #endif
- // <o> PIN_FRONT_SPI_MOSI - FRONT_SPI_MOSI引脚
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 7
- #endif
- // <o> PIN_FRONT_SPI_SCLK - FRONT_SPI_SCLK引脚
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 8
- #endif
- // <o> PIN_FRONT_SPI_nCS - FRONT_SPI_nCS引脚
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 9
- #endif
- // <o> PIN_FLASH_SPI_MISO - FLASH_SPI_MISO引脚
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 11
- #endif
- // <o> PIN_FLASH_SPI_MOSI - FLASH_SPI_MOSI引脚
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 12
- #endif
- // <o> PIN_FLASH_SPI_SCLK - FLASH_SPI_SCLK引脚
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 13
- #endif
- // <o> PIN_FLASH_SPI_nCS - FLASH_SPI_nCS引脚
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 14
- #endif
- // <o> PIN_BACK_SENSE_POWER - BACK_SENSE_POWER引脚
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 0
- #endif
- // <o> PIN_BACK_SCL - BACK_SCL引脚
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 1
- #endif
- // <o> PIN_BACK_SDA - BACK_SDA引脚
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 2
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 28
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚通道
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 4
- #endif
- // <o> PIN_CHARGING - 正在充电引脚
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 3
- #endif
- // <o> LED_SMALL_ENABLE - 小灯亮
- #ifndef LED_SMALL_ENABLE
- #define LED_SMALL_ENABLE 1
- #endif
- // <o> LED_SMALL_DISABLE - 小灯灭
- #ifndef LED_SMALL_DISABLE
- #define LED_SMALL_DISABLE 0
- #endif
- // </h>
- #endif
- #if PCB_VERSION == 2
- // <h> PCB_R2.1
- // <o> PIN_LED_RUN - 运行灯
- #ifndef PIN_LED_RUN
- #define PIN_LED_RUN 17
- #endif
- // <o> PIN_RESET_PIN - 硬件复位
- #ifndef PIN_RESET_PIN
- #define PIN_RESET_PIN 20
- #endif
- // <o> PIN_MT_EN - 电机使能
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 2
- #endif
- // <o> PIN_TXD_BLE - 串口发送
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 19
- #endif
- // <o> PIN_RXD_BLE - 串口接收
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 19
- #endif
- // <o> PIN_UART0_UNUSED_PIN - 串口空闲脚,左右鞋TX脚不能同时设置,否者接收不了,用个不使用的引脚设置TX作为中转,只保留RX就能接收。
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 22
- #endif
- // <o> PIN_LED_ENABLE - LED_ENABLE引脚
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 14
- #endif
- // <o> PIN_LED_CONTROL - LED_CONTROL引脚
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 18
- #endif
- // <o> PIN_SEL - 左右鞋区分引脚
- #ifndef PIN_SEL
- #define PIN_SEL 16
- #endif
- // <o> PIN_ADC_BAT_CHANNEL - 电池ADC输入通道
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 7
- #endif
- // <o> PIN_ADC_BAT_IN - 电池ADC输入引脚
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 31
- #endif
- // <o> PIN_FRONT_SENSE_POWER - FRONT_SENSE_POWER引脚
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 5
- #endif
- // <o> PIN_FRONT_SPI_MISO - FRONT_SPI_MISO引脚
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 6
- #endif
- // <o> PIN_FRONT_SPI_MOSI - FRONT_SPI_MOSI引脚
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 7
- #endif
- // <o> PIN_FRONT_SPI_SCLK - FRONT_SPI_SCLK引脚
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 8
- #endif
- // <o> PIN_FRONT_SPI_nCS - FRONT_SPI_nCS引脚
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 9
- #endif
- // <o> PIN_FLASH_SPI_MISO - FLASH_SPI_MISO引脚
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 11
- #endif
- // <o> PIN_FLASH_SPI_MOSI - FLASH_SPI_MOSI引脚
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 12
- #endif
- // <o> PIN_FLASH_SPI_SCLK - FLASH_SPI_SCLK引脚
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 13
- #endif
- // <o> PIN_FLASH_SPI_nCS - FLASH_SPI_nCS引脚
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 14
- #endif
- // <o> PIN_BACK_SENSE_POWER - BACK_SENSE_POWER引脚
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 11
- #endif
- // <o> PIN_BACK_SCL - BACK_SCL引脚
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 12
- #endif
- // <o> PIN_BACK_SDA - BACK_SDA引脚
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 13
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 28
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚通道
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 4
- #endif
- // <o> PIN_CHARGING - 正在充电引脚
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 25
- #endif
- // <o> LED_SMALL_ENABLE - 小灯亮
- #ifndef LED_SMALL_ENABLE
- #define LED_SMALL_ENABLE 1
- #endif
- // <o> LED_SMALL_DISABLE - 小灯灭
- #ifndef LED_SMALL_DISABLE
- #define LED_SMALL_DISABLE 0
- #endif
- // </h>
- #endif
- #if PCB_VERSION == 3
- // <h> PCB_R2.2
- // <o> PIN_MT_EN - 电机使能
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 2
- #endif
- // <o> PIN_TXD_BLE - 串口发送
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 22
- #endif
- // <o> PIN_RXD_BLE - 串口接收
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 22
- #endif
- // <o> PIN_UART0_UNUSED_PIN - 串口空闲脚,左右鞋TX脚不能同时设置,否者接收不了,用个不使用的引脚设置TX作为中转,只保留RX就能接收。
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 23
- #endif
- // <o> PIN_LED_ENABLE - LED_ENABLE引脚
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 16
- #endif
- // <o> PIN_LED_CONTROL - LED_CONTROL引脚
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 17
- #endif
- // <o> PIN_ADC_BAT_CHANNEL - 电池ADC输入通道
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 7
- #endif
- // <o> PIN_CHARGING_CHANNEL - 充电引脚ADC通道
- #ifndef PIN_CHARGING_CHANNEL
- #define PIN_CHARGING_CHANNEL 4
- #endif
- // <o> PIN_ADC_BAT_IN - 电池ADC输入引脚
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 31
- #endif
- // <o> PIN_FRONT_SENSE_POWER - FRONT_SENSE_POWER引脚
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 7
- #endif
- // <o> PIN_FRONT_SPI_MISO - FRONT_SPI_MISO引脚
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 3
- #endif
- // <o> PIN_FRONT_SPI_MOSI - FRONT_SPI_MOSI引脚
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 4
- #endif
- // <o> PIN_FRONT_SPI_SCLK - FRONT_SPI_SCLK引脚
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 5
- #endif
- // <o> PIN_FRONT_SPI_nCS - FRONT_SPI_nCS引脚
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 6
- #endif
- // <o> PIN_QMA7981_POWER - PIN_QMA7981_POWER引脚
- #ifndef PIN_QMA7981_POWER
- #define PIN_QMA7981_POWER 11
- #endif
- // <o> PIN_QMA7981_AD0 - PIN_QMA7981_AD0引脚
- #ifndef PIN_QMA7981_AD0
- #define PIN_QMA7981_AD0 13
- #endif
- // <o> PIN_QMA7981_SDA - PIN_QMA7981_SDA引脚
- #ifndef PIN_QMA7981_SDA
- #define PIN_QMA7981_SDA 12
- #endif
- // <o> PIN_QMA7981_SCLK - PIN_QMA7981_SCLK引脚
- #ifndef PIN_QMA7981_SCLK
- #define PIN_QMA7981_SCLK 14
- #endif
- // <o> PIN_QMA7981_nCS - PIN_QMA7981_nCS引脚
- #ifndef PIN_QMA7981_nCS
- #define PIN_QMA7981_nCS 15
- #endif
- // <o> PIN_BACK_SENSE_POWER - BACK_SENSE_POWER引脚
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 18
- #endif
- // <o> PIN_BACK_SCL - BACK_SCL引脚
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 19
- #endif
- // <o> PIN_BACK_SDA - BACK_SDA引脚
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 20
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 29
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚通道
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 5
- #endif
- // <o> PIN_CHARGING - 正在充电引脚
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 28
- #endif
- // <o> PIN_FLASH_SPI_MISO - FLASH_SPI_MISO引脚
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 11
- #endif
- // <o> PIN_FLASH_SPI_MOSI - FLASH_SPI_MOSI引脚
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 12
- #endif
- // <o> PIN_FLASH_SPI_SCLK - FLASH_SPI_SCLK引脚
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 13
- #endif
- // <o> PIN_FLASH_SPI_nCS - FLASH_SPI_nCS引脚
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 14
- #endif
- // </h>
- #endif
- #if PCB_VERSION == 4
- // <h> PCB_R2.3
- // <o> PIN_MT_EN - 电机使能
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 2
- #endif
- // <o> PIN_TXD_BLE - 串口发送
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 22
- #endif
- // <o> PIN_RXD_BLE - 串口接收
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 22
- #endif
- // <o> PIN_UART0_UNUSED_PIN - 串口空闲脚,左右鞋TX脚不能同时设置,否者接收不了,用个不使用的引脚设置TX作为中转,只保留RX就能接收。
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 23
- #endif
- // <o> PIN_LED_ENABLE - LED_ENABLE引脚
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 16
- #endif
- // <o> PIN_LED_CONTROL - LED_CONTROL引脚
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 17
- #endif
- // <o> PIN_ADC_BAT_CHANNEL - 电池ADC输入通道
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 7
- #endif
- // <o> PIN_CHARGING_CHANNEL - 充电引脚ADC通道
- #ifndef PIN_CHARGING_CHANNEL
- #define PIN_CHARGING_CHANNEL 4
- #endif
- // <o> PIN_ADC_BAT_IN - 电池ADC输入引脚
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 31
- #endif
- // <o> PIN_FRONT_SENSE_POWER - FRONT_SENSE_POWER引脚
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 7
- #endif
- // <o> PIN_FRONT_SPI_MISO - FRONT_SPI_MISO引脚
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 3
- #endif
- // <o> PIN_FRONT_SPI_MOSI - FRONT_SPI_MOSI引脚
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 4
- #endif
- // <o> PIN_FRONT_SPI_SCLK - FRONT_SPI_SCLK引脚
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 5
- #endif
- // <o> PIN_FRONT_SPI_nCS - FRONT_SPI_nCS引脚
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 6
- #endif
- // <o> PIN_QMA7981_POWER - PIN_QMA7981_POWER引脚
- #ifndef PIN_QMA7981_POWER
- #define PIN_QMA7981_POWER 11
- #endif
- // <o> PIN_QMA7981_AD0 - PIN_QMA7981_AD0引脚
- #ifndef PIN_QMA7981_AD0
- #define PIN_QMA7981_AD0 13
- #endif
- // <o> PIN_QMA7981_SDA - PIN_QMA7981_SDA引脚
- #ifndef PIN_QMA7981_SDA
- #define PIN_QMA7981_SDA 12
- #endif
- // <o> PIN_QMA7981_SCLK - PIN_QMA7981_SCLK引脚
- #ifndef PIN_QMA7981_SCLK
- #define PIN_QMA7981_SCLK 14
- #endif
- // <o> PIN_QMA7981_nCS - PIN_QMA7981_nCS引脚
- #ifndef PIN_QMA7981_nCS
- #define PIN_QMA7981_nCS 15
- #endif
- // <o> PIN_BACK_SENSE_POWER - BACK_SENSE_POWER引脚
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 18
- #endif
- // <o> PIN_BACK_SCL - BACK_SCL引脚
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 19
- #endif
- // <o> PIN_BACK_SDA - BACK_SDA引脚
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 20
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 29
- #endif
- // <o> PIN_CHARGMEASURE - 充电测量引脚通道
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 5
- #endif
- // <o> PIN_CHARGING - 正在充电引脚
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 28
- #endif
- // <o> PIN_BATFULL - 充电完成引脚
- #ifndef PIN_BATFULL
- #define PIN_BATFULL 30
- #endif
- // <o> PIN_FLASH_SPI_MISO - FLASH_SPI_MISO引脚
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 11
- #endif
- // <o> PIN_FLASH_SPI_MOSI - FLASH_SPI_MOSI引脚
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 12
- #endif
- // <o> PIN_FLASH_SPI_SCLK - FLASH_SPI_SCLK引脚
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 13
- #endif
- // <o> PIN_FLASH_SPI_nCS - FLASH_SPI_nCS引脚
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 14
- #endif
- // </h>
- #endif
- // </h>
- // <<< end of configuration section >>>
- #endif //SDK_CONFIG_H
|