63 lines
1.7 KiB
C
63 lines
1.7 KiB
C
|
#ifndef _CONFIG_H_
|
|||
|
#define _CONFIG_H_
|
|||
|
|
|||
|
#include "lib.h"
|
|||
|
|
|||
|
#define _DEBUG_
|
|||
|
#define _SYD_RTT_DEBUG_
|
|||
|
|
|||
|
#define USER_32K_CLOCK_RCOSCxx //ʹ<><CAB9>оƬ<D0BE>ڲ<EFBFBD><DAB2><EFBFBD>32K<32><4B>RC<52><43><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
#define PDULENTH 20
|
|||
|
|
|||
|
#define Device_Name 'C','a','d','e','n','c','e','-','0','0','0','0'
|
|||
|
#define Device_Name_Len 12
|
|||
|
|
|||
|
/* device information*/
|
|||
|
#define Manufacturer_Name "Lvbu"
|
|||
|
#define Manufacturer_Size 5
|
|||
|
|
|||
|
#define Model_Number "BD1S4-02"
|
|||
|
#define Model_Size 9
|
|||
|
|
|||
|
#define Serial_Number "SYD4P1MBD1241231"
|
|||
|
#define Serial_Size 17
|
|||
|
|
|||
|
#define Hardware_Vesion "V2.0.0"
|
|||
|
#define Hardware_Size 7
|
|||
|
|
|||
|
#define Software_Vesion "V1.0.0"
|
|||
|
#define Software_Size 7
|
|||
|
|
|||
|
#define MAX_TX_LENGTH 1024
|
|||
|
#define MAX_RX_LENGTH 128
|
|||
|
|
|||
|
#define WORK_SLEEP_TIME 20
|
|||
|
#define ADV_TIMEOUT 10
|
|||
|
|
|||
|
typedef enum _SYD_NOSLEEP_CONTROL_{
|
|||
|
SYD_NOSLEEP_SW = 0x0001,
|
|||
|
SYD_NOSLEEP_ADC = 0x0002,
|
|||
|
SYD_NOSLEEP_HEARTADC = 0x0004,
|
|||
|
}SYD_NOSLEEP_CONTROL;
|
|||
|
|
|||
|
typedef struct{
|
|||
|
uint8_t data[MAX_TX_LENGTH];
|
|||
|
uint32_t header,tail;
|
|||
|
}Tx_Buffer_t;
|
|||
|
|
|||
|
|
|||
|
#define EVT_NUM ((uint8_t) 0x04) /**< <20><>ǰ<EFBFBD><C7B0>ʱ<EFBFBD><CAB1><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>*/
|
|||
|
|
|||
|
#define EVT_2S ((uint32_t) 0x00000001) /**< <20><>ʱ<EFBFBD><CAB1>2s<32>¼<EFBFBD>*/
|
|||
|
#define EVT_1S_OTA ((uint32_t) 0x00000002) /**< <20><>ʱ<EFBFBD><CAB1>1s<31>¼<EFBFBD>*/
|
|||
|
#define EVT_1S_WORK ((uint32_t) 0x00000004) /**< <20><>ʱ<EFBFBD><CAB1>1s<31>¼<EFBFBD>*/
|
|||
|
//#define EVT_100MS_PACK ((uint32_t) 0x00000008) /**< <20><>ʱ<EFBFBD><CAB1>300ms<6D>¼<EFBFBD>*/
|
|||
|
#define EVT_20S_BATTERY ((uint32_t) 0x00000010) /**< <20><>ʱ<EFBFBD><CAB1>20S<30><53><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>*/
|
|||
|
|
|||
|
#define RTCEVT_NUM ((uint8_t) 0x01) /**< <20><>ǰ<EFBFBD><C7B0>ʱ<EFBFBD><CAB1><EFBFBD>¼<EFBFBD><C2BC><EFBFBD>*/
|
|||
|
#define RTCEVT_185S ((uint32_t) 0x0000001) /**< <20><>ʱ<EFBFBD><CAB1>185s<35>¼<EFBFBD>*/
|
|||
|
|
|||
|
#endif
|
|||
|
|