| BlueNRG-1 ACI APIs and events callbacks

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

bluenrg1_stack.h
Go to the documentation of this file.
1 #ifndef BLUENRG1_STACK_H
2 #define BLUENRG1_STACK_H
3
23 #include <stdint.h>
24 #include <bluenrg1_api.h>
25 #include <bluenrg1_events.h>
26
27
38 #define TOTAL_BUFFER_SIZE(NUM_LINKS,NUM_GATT_ATTRIBUTES,NUM_GATT_SERVICES,ATT_VALUE_ARRAY_SIZE) (\
39 852 + ((((ATT_VALUE_ARRAY_SIZE)-1)|3)+1) + \
40 (272*NUM_LINKS) + \
41 (40*NUM_GATT_ATTRIBUTES) + \
42 (48*NUM_GATT_SERVICES) \
43 )
44
53 #define TOTAL_FLASH_BUFFER_SIZE(FLASH_SEC_DB_SIZE, FLASH_SERVER_DB_SIZE) (\
54 ((((FLASH_SEC_DB_SIZE+FLASH_SERVER_DB_SIZE)-1)|2047)+1)\
55 )
56
60 #define TOTAL_DEVICE_ID_DATA_SIZE (56)
61
66 typedef struct {
67 uint32_t *hot_ana_config_table;
68 uint32_t max_conn_event_length;
69 uint16_t slave_sca ;
70 uint8_t master_sca ;
71 uint8_t ls_source;
72 uint16_t hs_startup_time ;
73 } hardware_config_table_t;
74
79 typedef struct {
80 uint8_t* bleStartFlashAddress;
81 uint32_t secDbSize;
82 uint32_t serverDbSize;
83 uint8_t* stored_device_id_data_p;
84 uint8_t* bleStartRamAddress;
85 uint16_t numAttrRecord;
86 uint16_t numAttrServ;
87 uint16_t attrValueArrSize;
97 uint8_t numOfLinks;
98 hardware_config_table_t hardware_config;
99 } BlueNRG_Stack_Initialization_t;
100
101
110 void BTLE_StackTick(void);
111
124 tBleStatus BlueNRG_Stack_Initialization(const BlueNRG_Stack_Initialization_t *BlueNRG_Stack_Init_params_p);
125
126
139 uint8_t BlueNRG_Stack_Perform_Deep_Sleep_Check(void);
140
148 void RAL_Isr(void);
149
163 int HAL_VTimerStart_ms(uint8_t timerNum, int32_t msRelTimeout);
164
175 void HAL_VTimer_Stop(uint8_t timerNum);
176
188 void HAL_VTimerTimeoutCallback(uint8_t timerNum);
189
201 uint32_t HAL_VTimerGetCurrentTime_sysT32(void);
202
216 uint32_t HAL_VTimerAcc_sysT32_ms(uint32_t sysTime, int32_t msTime);
217
218
232 int32_t HAL_VTimerDiff_ms_sysT32(uint32_t sysTime1, uint32_t sysTime2);
233
247 int HAL_VTimerStart_sysT32(uint8_t timerNum, uint32_t time);
248
249
263 int HAL_VTimerExpiry_sysT32(uint8_t timerNum, uint32_t *sysTime);
264
280 tBleStatus hci_rx_acl_data_event(uint16_t connHandle, uint8_t pb_flag, uint8_t bc_flag, uint16_t dataLen, uint8_t* pduData);
281
298 tBleStatus hci_tx_acl_data(uint16_t connHandle, uint8_t pb_flag, uint8_t bc_flag, uint16_t dataLen, uint8_t* pduData);
299
300
301 #endif // defined( BLUENRG1_STACK_H )
302
hardware_config_table_t::slave_sca
uint16_t slave_sca
Definition: bluenrg1_stack.h:69
BlueNRG_Stack_Initialization_t
Definition: bluenrg1_stack.h:79
BlueNRG_Stack_Initialization_t::attrValueArrSize
uint16_t attrValueArrSize
Definition: bluenrg1_stack.h:87
hardware_config_table_t::master_sca
uint8_t master_sca
Definition: bluenrg1_stack.h:70
BlueNRG_Stack_Initialization_t::numAttrRecord
uint16_t numAttrRecord
Definition: bluenrg1_stack.h:85
BTLE_StackTick
void BTLE_StackTick(void)
bluenrg1_events.h
Header file for BlueNRG-1 Bluetooth Low Energy stack events callbacks.
HAL_VTimerTimeoutCallback
void HAL_VTimerTimeoutCallback(uint8_t timerNum)
hardware_config_table_t::ls_source
uint8_t ls_source
Definition: bluenrg1_stack.h:71
tBleStatus
uint8_t tBleStatus
Definition: bluenrg1_api.h:71
hci_rx_acl_data_event
tBleStatus hci_rx_acl_data_event(uint16_t connHandle, uint8_t pb_flag, uint8_t bc_flag, uint16_t dataLen, uint8_t *pduData)
This callback is called by the stack library to indicate the arrival of an ACL Data Packet...
hardware_config_table_t
Definition: bluenrg1_stack.h:66
HAL_VTimerGetCurrentTime_sysT32
uint32_t HAL_VTimerGetCurrentTime_sysT32(void)
HAL_VTimerStart_sysT32
int HAL_VTimerStart_sysT32(uint8_t timerNum, uint32_t time)
BlueNRG_Stack_Initialization_t::serverDbSize
uint32_t serverDbSize
Definition: bluenrg1_stack.h:82
BlueNRG_Stack_Initialization_t::numOfLinks
uint8_t numOfLinks
Definition: bluenrg1_stack.h:97
HAL_VTimer_Stop
void HAL_VTimer_Stop(uint8_t timerNum)
HAL_VTimerDiff_ms_sysT32
int32_t HAL_VTimerDiff_ms_sysT32(uint32_t sysTime1, uint32_t sysTime2)
HAL_VTimerExpiry_sysT32
int HAL_VTimerExpiry_sysT32(uint8_t timerNum, uint32_t *sysTime)
BlueNRG_Stack_Initialization_t::stored_device_id_data_p
uint8_t * stored_device_id_data_p
Definition: bluenrg1_stack.h:83
HAL_VTimerStart_ms
int HAL_VTimerStart_ms(uint8_t timerNum, int32_t msRelTimeout)
hardware_config_table_t::max_conn_event_length
uint32_t max_conn_event_length
Definition: bluenrg1_stack.h:68
BlueNRG_Stack_Perform_Deep_Sleep_Check
uint8_t BlueNRG_Stack_Perform_Deep_Sleep_Check(void)
HAL_VTimerAcc_sysT32_ms
uint32_t HAL_VTimerAcc_sysT32_ms(uint32_t sysTime, int32_t msTime)
hardware_config_table_t::hot_ana_config_table
uint32_t * hot_ana_config_table
Definition: bluenrg1_stack.h:67
hci_tx_acl_data
tBleStatus hci_tx_acl_data(uint16_t connHandle, uint8_t pb_flag, uint8_t bc_flag, uint16_t dataLen, uint8_t *pduData)
API used to send HCI ACL Data Packets to exchange data between the Host and Controller.
BlueNRG_Stack_Initialization_t::numAttrServ
uint16_t numAttrServ
Definition: bluenrg1_stack.h:86
RAL_Isr
void RAL_Isr(void)
BlueNRG_Stack_Initialization_t::bleStartRamAddress
uint8_t * bleStartRamAddress
Definition: bluenrg1_stack.h:84
BlueNRG_Stack_Initialization_t::bleStartFlashAddress
uint8_t * bleStartFlashAddress
Definition: bluenrg1_stack.h:80
hardware_config_table_t::hs_startup_time
uint16_t hs_startup_time
Definition: bluenrg1_stack.h:72
BlueNRG_Stack_Initialization_t::hardware_config
hardware_config_table_t hardware_config
Definition: bluenrg1_stack.h:98
BlueNRG_Stack_Initialization_t::secDbSize
uint32_t secDbSize
Definition: bluenrg1_stack.h:81
BlueNRG_Stack_Initialization
tBleStatus BlueNRG_Stack_Initialization(const BlueNRG_Stack_Initialization_t *BlueNRG_Stack_Init_params_p)
bluenrg1_api.h
Header file for BlueNRG-1 Bluetooth Low Energy stack APIs.