123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829 |
- #ifndef USR_CONFIG_H
- #define USR_CONFIG_H
- #define SHOES_NAME "SMART SHOE"
- #define SHOES_NAME_LEN 64
- #define HARDWARE_VERSION 0x00010201
- #define SOFTWARE_VERSION 0x0001
-
- #ifndef BLE_DFU_ENANBLE
- #define BLE_DFU_ENANBLE 0
- #endif
- #ifndef BleNameHoldOn_ENANBLE
- #define BleNameHoldOn_ENANBLE 1
- #endif
- #if BleNameHoldOn_ENANBLE
- #define LEFT_NAME "SH_777"
- #define RIGHT_NAME "L1_"LEFT_NAME
- #define LAST_NAME "L0_"LEFT_NAME"_LAST"
- #endif
- #ifndef ProcessTime_EN
- #define ProcessTime_EN 0
- #endif
- #if ProcessTime_EN
- #define DisInterval 1000
- #endif
- #ifndef UART_HZ
- #define UART_HZ 250000
- #endif
- #ifndef WDT_RELOAD_VALUE
- #define WDT_RELOAD_VALUE 3000
- #endif
- #ifndef LOSSPACK_ENANBLE
- #define LOSSPACK_ENANBLE 1
- #endif
- #ifndef BLUE_LED_TEST_ENANBLE
- #define BLUE_LED_TEST_ENANBLE 0
- #endif
- #ifndef JS_RTT_DEBUG_EN
- #define JS_RTT_DEBUG_EN 0
- #endif
- #ifndef _IS_HOST
- #define _IS_HOST 1
- #endif
- #ifndef _SAME_DIRECTION
- #define _SAME_DIRECTION 0
- #endif
- #ifndef USEFIFO
- #define USEFIFO 0
- #endif
- #ifndef DEBUG_EN
- #define DEBUG_EN 1
- #endif
- #if DEBUG_EN
- #ifndef DEBUG_LEDRUN
- #define DEBUG_LEDRUN 0
- #endif
- #ifndef DEBUG_LEDRGB
- #define DEBUG_LEDRGB 0
- #endif
- #ifndef DEBUG_FPS
- #define DEBUG_FPS 0
- #endif
- #ifndef DEBUG_DFU_EN
- #define DEBUG_DFU_EN 0
- #endif
- #ifndef DEBUG_STEP
- #define DEBUG_STEP 0
- #endif
- #ifndef DEBUG_BLE_Client
- #define DEBUG_BLE_Client 0
- #endif
- #ifndef DEBUG_BLE_Host
- #define DEBUG_BLE_Host 0
- #endif
- #ifndef DEBUG_UART0
- #define DEBUG_UART0 0
- #endif
- #endif
- #ifndef sleep_cb_max
- #define sleep_cb_max 5
- #endif
- #ifndef wakeup_cb_max
- #define wakeup_cb_max 6
- #endif
- #ifndef process_max
- #define process_max 60
- #endif
- #ifndef HeartTime_Interval
- #define HeartTime_Interval 1
- #endif
- #ifndef LowPower_Interval
- #define LowPower_Interval 100
- #endif
- #ifndef FullPower_Interval
- #define FullPower_Interval 10
- #endif
- #ifndef StandByPower_Interval
- #define StandByPower_Interval 1000
- #endif
- #ifndef RTC2_IRQ_PRIORITY
- #define RTC2_IRQ_PRIORITY 2
- #endif
- #ifndef UART0_IRQ_PRIORITY
- #define UART0_IRQ_PRIORITY 3
- #endif
- #ifndef SPI0_IRQ_PRIORITY
- #define SPI0_IRQ_PRIORITY 6
- #endif
- #ifndef SPI1_IRQ_PRIORITY
- #define SPI1_IRQ_PRIORITY 6
- #endif
- #ifndef SPI2_IRQ_PRIORITY
- #define SPI2_IRQ_PRIORITY 6
- #endif
- #ifndef PWM0_IRQ_PRIORITY
- #define PWM0_IRQ_PRIORITY 6
- #endif
- #ifndef ADC_IRQ_PRIORITY
- #define ADC_IRQ_PRIORITY 6
- #endif
- #ifndef WDT_IRQ_PRIORITY
- #define WDT_IRQ_PRIORITY 6
- #endif
- #ifndef PCB_VERSION
- #define PCB_VERSION 3
- #endif
- #if PCB_VERSION == 0
- #ifndef PIN_LED_RUN
- #define PIN_LED_RUN 17
- #endif
- #ifndef PIN_RESET_PIN
- #define PIN_RESET_PIN 20
- #endif
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 0
- #endif
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 19
- #endif
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 18
- #endif
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 10
- #endif
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 24
- #endif
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 23
- #endif
- #ifndef PIN_SEL
- #define PIN_SEL 16
- #endif
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 6
- #endif
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 30
- #endif
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 1
- #endif
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 2
- #endif
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 3
- #endif
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 4
- #endif
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 5
- #endif
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 7
- #endif
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 6
- #endif
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 8
- #endif
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 9
- #endif
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 25
- #endif
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 26
- #endif
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 28
- #endif
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 29
- #endif
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 5
- #endif
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 31
- #endif
- #ifndef LED_SMALL_ENABLE
- #define LED_SMALL_ENABLE 0
- #endif
- #ifndef LED_SMALL_DISABLE
- #define LED_SMALL_DISABLE 1
- #endif
- #endif
- #if PCB_VERSION == 1
- #ifndef PIN_LED_RUN
- #define PIN_LED_RUN 19
- #endif
- #ifndef PIN_RESET_PIN
- #define PIN_RESET_PIN 20
- #endif
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 10
- #endif
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 26
- #endif
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 26
- #endif
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 22
- #endif
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 27
- #endif
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 25
- #endif
- #ifndef PIN_SEL
- #define PIN_SEL 18
- #endif
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 2
- #endif
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 4
- #endif
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 5
- #endif
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 6
- #endif
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 7
- #endif
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 8
- #endif
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 9
- #endif
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 11
- #endif
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 12
- #endif
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 13
- #endif
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 14
- #endif
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 0
- #endif
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 1
- #endif
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 2
- #endif
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 28
- #endif
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 4
- #endif
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 3
- #endif
- #ifndef LED_SMALL_ENABLE
- #define LED_SMALL_ENABLE 1
- #endif
- #ifndef LED_SMALL_DISABLE
- #define LED_SMALL_DISABLE 0
- #endif
- #endif
- #if PCB_VERSION == 2
- #ifndef PIN_LED_RUN
- #define PIN_LED_RUN 17
- #endif
- #ifndef PIN_RESET_PIN
- #define PIN_RESET_PIN 20
- #endif
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 2
- #endif
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 19
- #endif
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 19
- #endif
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 22
- #endif
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 14
- #endif
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 18
- #endif
- #ifndef PIN_SEL
- #define PIN_SEL 16
- #endif
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 7
- #endif
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 31
- #endif
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 5
- #endif
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 6
- #endif
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 7
- #endif
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 8
- #endif
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 9
- #endif
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 11
- #endif
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 12
- #endif
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 13
- #endif
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 14
- #endif
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 11
- #endif
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 12
- #endif
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 13
- #endif
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 28
- #endif
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 4
- #endif
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 25
- #endif
- #ifndef LED_SMALL_ENABLE
- #define LED_SMALL_ENABLE 1
- #endif
- #ifndef LED_SMALL_DISABLE
- #define LED_SMALL_DISABLE 0
- #endif
- #endif
- #if PCB_VERSION == 3
- #ifndef PIN_MT_EN
- #define PIN_MT_EN 2
- #endif
- #ifndef PIN_TXD_BLE
- #define PIN_TXD_BLE 22
- #endif
- #ifndef PIN_RXD_BLE
- #define PIN_RXD_BLE 22
- #endif
- #ifndef PIN_UART0_UNUSED_PIN
- #define PIN_UART0_UNUSED_PIN 23
- #endif
- #ifndef PIN_LED_ENABLE
- #define PIN_LED_ENABLE 16
- #endif
- #ifndef PIN_LED_CONTROL
- #define PIN_LED_CONTROL 17
- #endif
- #ifndef PIN_ADC_BAT_CHANNEL
- #define PIN_ADC_BAT_CHANNEL 7
- #endif
- #ifndef PIN_ADC_BAT_IN
- #define PIN_ADC_BAT_IN 31
- #endif
- #ifndef PIN_FRONT_SENSE_POWER
- #define PIN_FRONT_SENSE_POWER 7
- #endif
- #ifndef PIN_FRONT_SPI_MISO
- #define PIN_FRONT_SPI_MISO 3
- #endif
- #ifndef PIN_FRONT_SPI_MOSI
- #define PIN_FRONT_SPI_MOSI 4
- #endif
- #ifndef PIN_FRONT_SPI_SCLK
- #define PIN_FRONT_SPI_SCLK 5
- #endif
- #ifndef PIN_FRONT_SPI_nCS
- #define PIN_FRONT_SPI_nCS 6
- #endif
- #ifndef PIN_QMA7981_POWER
- #define PIN_QMA7981_POWER 11
- #endif
- #ifndef PIN_QMA7981_AD0
- #define PIN_QMA7981_AD0 13
- #endif
- #ifndef PIN_QMA7981_SDA
- #define PIN_QMA7981_SDA 12
- #endif
- #ifndef PIN_QMA7981_SCLK
- #define PIN_QMA7981_SCLK 14
- #endif
- #ifndef PIN_QMA7981_nCS
- #define PIN_QMA7981_nCS 15
- #endif
- #ifndef PIN_BACK_SENSE_POWER
- #define PIN_BACK_SENSE_POWER 18
- #endif
- #ifndef PIN_BACK_SCL
- #define PIN_BACK_SCL 19
- #endif
- #ifndef PIN_BACK_SDA
- #define PIN_BACK_SDA 20
- #endif
- #ifndef PIN_ADC_CHARGMEASURE
- #define PIN_ADC_CHARGMEASURE 29
- #endif
- #ifndef PIN_ADC_CHARGMEASURE_CHANNEL
- #define PIN_ADC_CHARGMEASURE_CHANNEL 5
- #endif
- #ifndef PIN_CHARGING
- #define PIN_CHARGING 28
- #endif
- #ifndef PIN_FLASH_SPI_MISO
- #define PIN_FLASH_SPI_MISO 11
- #endif
- #ifndef PIN_FLASH_SPI_MOSI
- #define PIN_FLASH_SPI_MOSI 12
- #endif
- #ifndef PIN_FLASH_SPI_SCLK
- #define PIN_FLASH_SPI_SCLK 13
- #endif
- #ifndef PIN_FLASH_SPI_nCS
- #define PIN_FLASH_SPI_nCS 14
- #endif
- #endif
- #endif //SDK_CONFIG_H
|