SmartSnippets DA1459x SDK
ble_mgr_cmd.h
Go to the documentation of this file.
1 
43 #ifndef BLE_MGR_CMD_H_
44 #define BLE_MGR_CMD_H_
45 
46 #include <stdbool.h>
47 #include "osal.h"
48 
49 typedef void (* ble_mgr_cmd_handler_t) (void *param);
50 
54 typedef struct {
55  uint16_t op_code;
56  uint16_t msg_len;
57  uint8_t payload[0];
59 
64  BLE_MGR_COMMON_CMD_CAT = 0x00,
65  BLE_MGR_GAP_CMD_CAT = 0x01,
66  BLE_MGR_GATTS_CMD_CAT = 0x02,
67  BLE_MGR_GATTC_CMD_CAT = 0x03,
68  BLE_MGR_L2CAP_CMD_CAT = 0x04,
69  BLE_MGR_LAST_CMD_CAT,
70 };
71 
72 #define BLE_MGR_CMD_CAT_FIRST(CAT) (CAT << 8)
73 
74 #define BLE_MGR_CMD_GET_CAT(OPCODE) (OPCODE >> 8)
75 #define BLE_MGR_CMD_GET_IDX(OPCODE) (OPCODE & 0xFF)
76 
77 bool ble_mgr_cmd_handle(void *cmd);
78 
79 #endif /* BLE_MGR_CMD_H_ */
80 
ble_mgr_msg_hdr_t
Definition: ble_mgr_cmd.h:54
osal.h
OS abstraction layer API.
ble_cmd_cat
ble_cmd_cat
Definition: ble_mgr_cmd.h:63