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 //使用芯片内部的32K的RC晶振
|
|
|
|
#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) /**< 当前定时器事件数*/
|
|
|
|
#define EVT_2S ((uint32_t) 0x00000001) /**< 定时器2s事件*/
|
|
#define EVT_1S_OTA ((uint32_t) 0x00000002) /**< 定时器1s事件*/
|
|
#define EVT_1S_WORK ((uint32_t) 0x00000004) /**< 定时器1s事件*/
|
|
//#define EVT_100MS_PACK ((uint32_t) 0x00000008) /**< 定时器300ms事件*/
|
|
#define EVT_20S_BATTERY ((uint32_t) 0x00000010) /**< 定时器20S电池事件*/
|
|
|
|
#define RTCEVT_NUM ((uint8_t) 0x01) /**< 当前定时器事件数*/
|
|
#define RTCEVT_185S ((uint32_t) 0x0000001) /**< 定时器185s事件*/
|
|
|
|
#endif
|
|
|