fix:修改UDP通讯中,取电变化上报机制
1、问题点:当RCU网络状态异常的情况下,网络还处于协商状态下,还未进入正常通讯环节时,取电变化不会进行判断。这会导致取电变化上报与实际产生取电状态时间点对不上。 2、将BLV_C1F_Module代码上传至Gitea,之前代码修改记录请查看 .\BasicCode\Readme.txt
This commit is contained in:
67
BasicCode/Drive/BLE/HAL/include/HAL.h
Normal file
67
BasicCode/Drive/BLE/HAL/include/HAL.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : HAL.h
|
||||
* Author : WCH
|
||||
* Version : V1.0
|
||||
* Date : 2016/05/05
|
||||
* Description :
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
#ifndef __HAL_H
|
||||
#define __HAL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "RTC.h"
|
||||
#include "SLEEP.h"
|
||||
#include "LED.h"
|
||||
#include "KEY.h"
|
||||
|
||||
/* hal task Event */
|
||||
#define LED_BLINK_EVENT 0x0001
|
||||
#define HAL_KEY_EVENT 0x0002
|
||||
#define HAL_REG_INIT_EVENT 0x2000
|
||||
#define HAL_TEST_EVENT 0x4000
|
||||
|
||||
// hal sys_message
|
||||
#define MESSAGE_UART 0xA0 // UART message
|
||||
#define UART0_MESSAGE (MESSAGE_UART|0 ) // UART0 message
|
||||
#define UART1_MESSAGE (MESSAGE_UART|1 ) // UART1 message
|
||||
|
||||
#define USB_MESSAGE 0xB0 // USB message
|
||||
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
extern tmosTaskID halTaskID;
|
||||
|
||||
typedef struct tag_uart_package
|
||||
{
|
||||
tmos_event_hdr_t hdr;
|
||||
uint8 *pData;
|
||||
} uartPacket_t;
|
||||
|
||||
/*********************************************************************
|
||||
* GLOBAL FUNCTIONS
|
||||
*/
|
||||
extern void HAL_Init( void );
|
||||
extern tmosEvents HAL_ProcessEvent( tmosTaskID task_id, tmosEvents events );
|
||||
extern void CH57X_BLEInit( void );
|
||||
extern uint16 HAL_GetInterTempValue( void );
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
146
BasicCode/Drive/BLE/HAL/include/KEY.h
Normal file
146
BasicCode/Drive/BLE/HAL/include/KEY.h
Normal file
@@ -0,0 +1,146 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : KEY.h
|
||||
* Author : WCH
|
||||
* Version : V1.0
|
||||
* Date : 2016/04/12
|
||||
* Description :
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
#ifndef __KEY_H
|
||||
#define __KEY_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/**************************************************************************************************
|
||||
* MACROS
|
||||
**************************************************************************************************/
|
||||
#define KEY_CHANGE 0xC0 // Key message
|
||||
|
||||
#define HAL_KEY_RISING_EDGE 0
|
||||
#define HAL_KEY_FALLING_EDGE 1
|
||||
|
||||
#define HAL_KEY_DEBOUNCE_VALUE 25
|
||||
#define HAL_KEY_POLLING_VALUE 100
|
||||
|
||||
/* Interrupt option - Enable or disable */
|
||||
#define HAL_KEY_INTERRUPT_DISABLE 0x00
|
||||
#define HAL_KEY_INTERRUPT_ENABLE 0x01
|
||||
|
||||
/* Key state - shift or nornal */
|
||||
#define HAL_KEY_STATE_NORMAL 0x00
|
||||
#define HAL_KEY_STATE_SHIFT 0x01
|
||||
|
||||
/* Switches (keys) */
|
||||
#define HAL_KEY_SW_1 0x01 // key1
|
||||
#define HAL_KEY_SW_2 0x02 // key2
|
||||
#define HAL_KEY_SW_3 0x04 // key3
|
||||
#define HAL_KEY_SW_4 0x08 // key4
|
||||
#define HAL_KEY_SW_5 0x10 // key5
|
||||
|
||||
/* Joystick */
|
||||
#define HAL_KEY_UP 0x01 // Joystick up
|
||||
#define HAL_KEY_RIGHT 0x02 // Joystick right
|
||||
#define HAL_KEY_CENTER 0x04 // Joystick center
|
||||
#define HAL_KEY_LEFT 0x08 // Joystick left
|
||||
#define HAL_KEY_DOWN 0x10 // Joystick down
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
|
||||
/* 1 - KEY */
|
||||
#define KEY1_BV BV(22)
|
||||
#define KEY2_BV
|
||||
#define KEY3_BV
|
||||
#define KEY4_BV
|
||||
|
||||
#define KEY1_PU (R32_PB_PU |= KEY1_BV)
|
||||
#define KEY2_PU ()
|
||||
#define KEY3_PU ()
|
||||
#define KEY4_PU ()
|
||||
|
||||
#define KEY1_DIR (R32_PB_DIR &= ~KEY1_BV)
|
||||
#define KEY2_PU ()
|
||||
#define KEY3_PU ()
|
||||
#define KEY4_PU ()
|
||||
|
||||
#define KEY1_IN (ACTIVE_LOW(R32_PB_PIN&KEY1_BV))
|
||||
#define KEY2_IN ()
|
||||
#define KEY3_IN ()
|
||||
#define KEY4_IN ()
|
||||
|
||||
#define HAL_PUSH_BUTTON1() ( KEY1_IN ) //<2F><><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6>尴<EFBFBD><E5B0B4>
|
||||
#define HAL_PUSH_BUTTON2() ( 0 )
|
||||
#define HAL_PUSH_BUTTON3() ( 0 )
|
||||
#define HAL_PUSH_BUTTON4() ( 0 )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**************************************************************************************************
|
||||
* TYPEDEFS
|
||||
**************************************************************************************************/
|
||||
typedef void (*halKeyCBack_t) (uint8 keys, uint8 state);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tmos_event_hdr_t hdr;
|
||||
uint8 state; // shift
|
||||
uint8 keys; // keys
|
||||
} keyChange_t;
|
||||
|
||||
/**************************************************************************************************
|
||||
* GLOBAL VARIABLES
|
||||
**************************************************************************************************/
|
||||
extern uint8 Hal_KeyIntEnable;
|
||||
|
||||
/*********************************************************************
|
||||
* FUNCTIONS
|
||||
*/
|
||||
|
||||
/*
|
||||
* Initialize the Key Service
|
||||
*/
|
||||
void HAL_KeyInit( void );
|
||||
|
||||
/*
|
||||
* This is for internal used by hal_driver
|
||||
*/
|
||||
void HAL_KeyPoll( void );
|
||||
|
||||
/*
|
||||
* Register the Key Service
|
||||
*/
|
||||
void HAL_KEY_RegisterForKeys( tmosTaskID id );
|
||||
|
||||
/*
|
||||
* Configure the Key Service
|
||||
*/
|
||||
void HalKeyConfig( uint8 interruptEnable, const halKeyCBack_t cback);
|
||||
|
||||
/*
|
||||
* Read the Key callback
|
||||
*/
|
||||
void HalKeyCallback ( uint8 keys, uint8 state );
|
||||
|
||||
/*
|
||||
* Read the Key status
|
||||
*/
|
||||
uint8 HalKeyRead( void);
|
||||
|
||||
/**************************************************************************************************
|
||||
**************************************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
128
BasicCode/Drive/BLE/HAL/include/LED.h
Normal file
128
BasicCode/Drive/BLE/HAL/include/LED.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : LED.h
|
||||
* Author : WCH
|
||||
* Version : V1.0
|
||||
* Date : 2016/04/12
|
||||
* Description :
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
#ifndef __LED_H
|
||||
#define __LED_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* CONSTANTS
|
||||
*/
|
||||
|
||||
/* LEDS - The LED number is the same as the bit position */
|
||||
#define HAL_LED_1 0x01
|
||||
#define HAL_LED_2 0x02
|
||||
#define HAL_LED_3 0x04
|
||||
#define HAL_LED_4 0x08
|
||||
#define HAL_LED_ALL (HAL_LED_1 | HAL_LED_2 | HAL_LED_3 | HAL_LED_4)
|
||||
|
||||
/* Modes */
|
||||
#define HAL_LED_MODE_OFF 0x00
|
||||
#define HAL_LED_MODE_ON 0x01
|
||||
#define HAL_LED_MODE_BLINK 0x02
|
||||
#define HAL_LED_MODE_FLASH 0x04
|
||||
#define HAL_LED_MODE_TOGGLE 0x08
|
||||
|
||||
/* Defaults */
|
||||
#define HAL_LED_DEFAULT_MAX_LEDS 4
|
||||
#define HAL_LED_DEFAULT_DUTY_CYCLE 5
|
||||
#define HAL_LED_DEFAULT_FLASH_COUNT 50
|
||||
#define HAL_LED_DEFAULT_FLASH_TIME 1000
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* TYPEDEFS
|
||||
*/
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>LED<45><44><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>,<2C>͵<EFBFBD>ƽLED<45><44> */
|
||||
|
||||
/* 1 - LED */
|
||||
#define LED1_BV BV(0)
|
||||
#define LED2_BV
|
||||
#define LED3_BV
|
||||
|
||||
#define LED1_OUT (R32_PB_OUT)
|
||||
#define LED2_OUT 0
|
||||
#define LED3_OUT 0
|
||||
#define LED4_OUT 0
|
||||
|
||||
#define LED1_DDR (R32_PB_DIR|=LED1_BV)
|
||||
#define LED2_DDR 0
|
||||
#define LED3_DDR 0
|
||||
|
||||
#define HAL_TURN_OFF_LED1() (LED1_OUT |= LED1_BV)
|
||||
#define HAL_TURN_OFF_LED2()
|
||||
#define HAL_TURN_OFF_LED3()
|
||||
#define HAL_TURN_OFF_LED4()
|
||||
|
||||
#define HAL_TURN_ON_LED1() (LED1_OUT &= (~LED1_BV))
|
||||
#define HAL_TURN_ON_LED2()
|
||||
#define HAL_TURN_ON_LED3()
|
||||
#define HAL_TURN_ON_LED4()
|
||||
|
||||
#define HAL_STATE_LED1() 0
|
||||
#define HAL_STATE_LED2() 0
|
||||
#define HAL_STATE_LED3() 0
|
||||
#define HAL_STATE_LED4() 0
|
||||
|
||||
/*********************************************************************
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
|
||||
/*
|
||||
* Initialize LED Service.
|
||||
*/
|
||||
void HAL_LedInit( void );
|
||||
|
||||
|
||||
/*
|
||||
* update time LED Service.
|
||||
*/
|
||||
void HalLedUpdate (void);
|
||||
|
||||
/*
|
||||
* Set the LED ON/OFF/TOGGLE.
|
||||
*/
|
||||
extern uint8 HalLedSet( uint8 led, uint8 mode );
|
||||
|
||||
/*
|
||||
* Blink the LED.
|
||||
*/
|
||||
extern void HalLedBlink( uint8 leds, uint8 cnt, uint8 duty, uint16 time );
|
||||
|
||||
/*
|
||||
* Put LEDs in sleep state - store current values
|
||||
*/
|
||||
extern void HalLedEnterSleep( void );
|
||||
|
||||
/*
|
||||
* Retore LEDs from sleep state
|
||||
*/
|
||||
extern void HalLedExitSleep( void );
|
||||
|
||||
/*
|
||||
* Return LED state
|
||||
*/
|
||||
extern uint8 HalLedGetState ( void );
|
||||
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
40
BasicCode/Drive/BLE/HAL/include/RTC.h
Normal file
40
BasicCode/Drive/BLE/HAL/include/RTC.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : RTC.h
|
||||
* Author : WCH
|
||||
* Version : V1.0
|
||||
* Date : 2016/04/12
|
||||
* Description :
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
#ifndef __RTC_H
|
||||
#define __RTC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define RTC_TIMER_MAX_VALUE 0xa8c00000
|
||||
|
||||
extern u32V RTCTigFlag;
|
||||
|
||||
/*
|
||||
* Initialize time Service.
|
||||
*/
|
||||
void HAL_TimeInit( void );
|
||||
|
||||
/*
|
||||
* System Clock Service.
|
||||
*/
|
||||
extern void RTC_SetTignTime( u32 time );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
38
BasicCode/Drive/BLE/HAL/include/SLEEP.h
Normal file
38
BasicCode/Drive/BLE/HAL/include/SLEEP.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : SLEEP.h
|
||||
* Author : WCH
|
||||
* Version : V1.0
|
||||
* Date : 2018/11/12
|
||||
* Description :
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
#ifndef __SLEEP_H
|
||||
#define __SLEEP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* GLOBAL VARIABLES
|
||||
*/
|
||||
|
||||
/*********************************************************************
|
||||
* FUNCTIONS
|
||||
*/
|
||||
extern void HAL_SleepInit( void );
|
||||
|
||||
extern u32 CH57X_LowPower( u32 time );
|
||||
/*********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
128
BasicCode/Drive/BLE/HAL/include/config.h
Normal file
128
BasicCode/Drive/BLE/HAL/include/config.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/********************************** (C) COPYRIGHT *******************************
|
||||
* File Name : CONFIG.h
|
||||
* Author : WCH
|
||||
* Version : V1.10
|
||||
* Date : 2019/11/05
|
||||
* Description : <20><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĵ<DEB8>ǰֵ
|
||||
*******************************************************************************/
|
||||
|
||||
/******************************************************************************/
|
||||
#ifndef __CONFIG_H
|
||||
#define __CONFIG_H
|
||||
|
||||
#define ID_CH577 0x77
|
||||
#define ID_CH578 0x78
|
||||
#define ID_CH579 0x79
|
||||
|
||||
#define CHIP_ID ID_CH579
|
||||
|
||||
#ifdef CH57xBLE_ROM
|
||||
#include "CH57xBLE_ROM.H"
|
||||
#else
|
||||
#include "CH57xBLE_LIB.H"
|
||||
#endif
|
||||
/*********************************************************************
|
||||
<EFBFBD><EFBFBD>MAC<EFBFBD><EFBFBD>
|
||||
BLE_MAC - <20>Ƿ<EFBFBD><C7B7>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Mac<61><63>ַ ( Ĭ<><C4AC>:FALSE - ʹ<><CAB9>оƬMac<61><63>ַ )<29><><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>main.c<><EFBFBD>Mac<61><63>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD>SLEEP<EFBFBD><EFBFBD>
|
||||
HAL_SLEEP - <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>˯<EFBFBD>߹<EFBFBD><DFB9><EFBFBD> ( Ĭ<><C4AC>:FALSE )
|
||||
WAKE_UP_RTC_MAX_TIME - ˯<><EFBFBD><DFBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>䣬<EFBFBD><E4A3AC><EFBFBD>ݲ<EFBFBD>ͬ˯<CDAC><CBAF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡֵ<C8A1>ɷ<EFBFBD>Ϊ<EFBFBD><CEAA>˯<EFBFBD><CBAF>ģʽ/<2F>µ<EFBFBD>ģʽ - 65(Ĭ<><C4AC>)
|
||||
<09><>ͣģʽ - 65
|
||||
<09><><EFBFBD><EFBFBD>ģʽ - 5
|
||||
|
||||
<EFBFBD><EFBFBD>TEMPERATION<EFBFBD><EFBFBD>
|
||||
TEM_SAMPLE - <20>Ƿ<EFBFBD><C7B7><EFBFBD><F2BFAAB8><EFBFBD><EFBFBD>¶ȱ仯У<D0A3>Ĺ<EFBFBD><C4B9>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD>У<D0A3><D7BC>ʱС<CAB1><D0A1>10ms( Ĭ<><C4AC>:TRUE )
|
||||
|
||||
<EFBFBD><EFBFBD>CALIBRATION<EFBFBD><EFBFBD>
|
||||
BLE_CALIBRATION_ENABLE - <20>Ƿ<EFBFBD><C7B7><EFBFBD>ʱУ<D0A3>Ĺ<EFBFBD><C4B9>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD>У<D0A3><D7BC>ʱС<CAB1><D0A1>10ms( Ĭ<><C4AC>:TRUE )
|
||||
BLE_CALIBRATION_PERIOD - <20><>ʱУ<D0A3><D7BC><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>λms( Ĭ<><C4AC>:120000 )
|
||||
|
||||
<EFBFBD><EFBFBD>SNV<EFBFBD><EFBFBD>
|
||||
BLE_SNV - <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>SNV<4E><56><EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ( Ĭ<><C4AC>:TRUE )
|
||||
BLE_SNV_ADDR - SNV<4E><56>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>ʹ<EFBFBD><CAB9>data flash<73><68><EFBFBD><EFBFBD>( Ĭ<><C4AC>:0x3EC00 )
|
||||
|
||||
<EFBFBD><EFBFBD>RTC<EFBFBD><EFBFBD>
|
||||
CLK_OSC32K - RTCʱ<43><CAB1>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ⲿ32K( Ĭ<><C4AC>:0 <20>ⲿ(32768Hz)<29><>1<EFBFBD><31><EFBFBD>ڲ<EFBFBD>(32000Hz)<29><>2<EFBFBD><32><EFBFBD>ڲ<EFBFBD>(32768Hz) )
|
||||
|
||||
<EFBFBD><EFBFBD>MEMORY<EFBFBD><EFBFBD>
|
||||
BLE_MEMHEAP_SIZE - <20><><EFBFBD><EFBFBD>Э<EFBFBD><D0AD>ջʹ<D5BB>õ<EFBFBD>RAM<41><4D>С<EFBFBD><D0A1><EFBFBD><EFBFBD>С<EFBFBD><D0A1>6K ( Ĭ<><C4AC>:(1024*8) )
|
||||
|
||||
<EFBFBD><EFBFBD>DATA<EFBFBD><EFBFBD>
|
||||
BLE_BUFF_MAX_LEN - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>( Ĭ<><C4AC>:27 (ATT_MTU=23)<29><>ȡֵ<C8A1><D6B5>Χ[27~251] )
|
||||
BLE_BUFF_NUM - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>İ<EFBFBD><C4B0><EFBFBD><EFBFBD><EFBFBD>( Ĭ<><C4AC>:5 )
|
||||
BLE_TX_NUM_EVENT - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>ٸ<EFBFBD><D9B8><EFBFBD><EFBFBD>ݰ<EFBFBD>( Ĭ<><C4AC>:1 )
|
||||
BLE_TX_POWER - <20><><EFBFBD>书<EFBFBD><E4B9A6>( Ĭ<><C4AC>:LL_TX_POWEER_0_DBM (0dBm) )
|
||||
|
||||
<EFBFBD><EFBFBD>MULTICONN<EFBFBD><EFBFBD>
|
||||
PERIPHERAL_MAX_CONNECTION - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD>ٴӻ<D9B4><D3BB><EFBFBD>ɫ( Ĭ<><C4AC>:1 )
|
||||
CENTRAL_MAX_CONNECTION - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ( Ĭ<><C4AC>:3 )
|
||||
**********************************************************************/
|
||||
|
||||
/*********************************************************************
|
||||
* Ĭ<><C4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
||||
*/
|
||||
#ifndef BLE_MAC
|
||||
#define BLE_MAC /*FALSE*/TRUE
|
||||
#endif
|
||||
#ifndef HAL_SLEEP
|
||||
#define HAL_SLEEP FALSE
|
||||
#endif
|
||||
#ifndef WAKE_UP_RTC_MAX_TIME
|
||||
#define WAKE_UP_RTC_MAX_TIME 65
|
||||
#endif
|
||||
#ifndef HAL_KEY
|
||||
#define HAL_KEY FALSE
|
||||
#endif
|
||||
#ifndef HAL_LED
|
||||
#define HAL_LED FALSE
|
||||
#endif
|
||||
#ifndef TEM_SAMPLE
|
||||
#define TEM_SAMPLE TRUE
|
||||
#endif
|
||||
#ifndef BLE_CALIBRATION_ENABLE
|
||||
#define BLE_CALIBRATION_ENABLE TRUE
|
||||
#endif
|
||||
#ifndef BLE_CALIBRATION_PERIOD
|
||||
#define BLE_CALIBRATION_PERIOD 120000
|
||||
#endif
|
||||
#ifndef BLE_SNV
|
||||
#define BLE_SNV TRUE
|
||||
#endif
|
||||
#ifndef BLE_SNV_ADDR
|
||||
#define BLE_SNV_ADDR 0x3EC00
|
||||
#endif
|
||||
#ifndef CLK_OSC32K
|
||||
#define CLK_OSC32K 2 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ⲿ32K
|
||||
#endif
|
||||
#ifndef BLE_MEMHEAP_SIZE
|
||||
#define BLE_MEMHEAP_SIZE (1024*8)
|
||||
#endif
|
||||
#ifndef BLE_BUFF_MAX_LEN
|
||||
#define BLE_BUFF_MAX_LEN 145
|
||||
#endif
|
||||
#ifndef BLE_BUFF_NUM
|
||||
#define BLE_BUFF_NUM 5
|
||||
#endif
|
||||
#ifndef BLE_TX_NUM_EVENT
|
||||
#define BLE_TX_NUM_EVENT 1
|
||||
#endif
|
||||
#ifndef BLE_TX_POWER
|
||||
#define BLE_TX_POWER LL_TX_POWEER_0_DBM
|
||||
#endif
|
||||
#ifndef PERIPHERAL_MAX_CONNECTION
|
||||
#define PERIPHERAL_MAX_CONNECTION 1
|
||||
#endif
|
||||
#ifndef CENTRAL_MAX_CONNECTION
|
||||
#define CENTRAL_MAX_CONNECTION 3
|
||||
#endif
|
||||
|
||||
#if BLE_CODE_EN
|
||||
extern u32 MEM_BUF[BLE_MEMHEAP_SIZE/4];
|
||||
#endif
|
||||
|
||||
extern u8 MACAddr[6];
|
||||
|
||||
#endif
|
||||
|
||||
/******************************* endfile @ config ******************************/
|
||||
Reference in New Issue
Block a user