Airoha M0 BLE API  1.0.5.4
sm_slave.h
1 /******************************************************************************
2 Copyright (c) Airoha 2016 - All rights reserved
3 
4 FILE NAME
5  sm_slave.h
6 DESCRIPTION
7 NOTES
8 ********************************************************************************/
9 #ifndef __SM_SLAVE_H__
10 #define __SM_SLAVE_H__
11 
12 #if (SM_HAL_AB1600_ENABLED)
13 #include <stdbool.h>
14 #include "ble_gap_sm.h"
15 #endif
16 
17 #ifdef _MSC_VER
18 __pragma(pack(push, 1))
19 #define __attribute__(x)
20 #endif
21 
22 
23 /* HCI EVENT */
24 typedef struct
25 {
26  uint16_t connHandle;
27  uint8_t rand[8];
28  uint8_t ediv[2];
29 }PACKED_STRUCT sm_hci_ltk_request_t;
30 
31 #ifdef _MSC_VER
32 __pragma(pack(pop))
33 #undef __attribute__
34 #endif
35 
36 void SM_Slave_Init(void);
37 bool SM_Slave_StartPairing(uint8_t idx, ble_sm_security_param_t *securityParam);
38 void SM_Slave_EncryptionChange(uint8_t idx, uint8_t *evtPtr);
39 void SM_Slave_LTKRequest(uint8_t idx, sm_hci_ltk_request_t *evtPtr);
40 bool SM_Slave_SendSecurityRequest(uint8_t idx, uint8_t authReq);
41 bool SM_Slave_LTKRequestHandler(uint8_t idx, bool isPositive);
42 void SM_Slave_CheckState(void);
43 void SM_Slave_PasskeyInputRsp(uint8_t idx, uint32_t passKey);
44 void SM_Slave_OOBInputRsp(uint8_t idx, uint8_t* oobData);
45 
46 
47 #endif
Parameters for BLE_gap_sm_set_security_param function.
Definition: ble_gap_sm.h:116