SmartSnippets DA1459x SDK
ble_mgr_common.h
Go to the documentation of this file.
1 
43 #ifndef BLE_MGR_COMMON_H_
44 #define BLE_MGR_COMMON_H_
45 
46 #include "osal.h"
47 #include "ble_mgr.h"
48 #include "ble_mgr_cmd.h"
49 
50 enum ble_mgr_common_cmd_opcode {
51  BLE_MGR_COMMON_STACK_MSG = BLE_MGR_CMD_CAT_FIRST(BLE_MGR_COMMON_CMD_CAT),
52  BLE_MGR_COMMON_REGISTER_CMD,
53  BLE_MGR_COMMON_ENABLE_CMD,
54  BLE_MGR_COMMON_RESET_CMD,
55  BLE_MGR_COMMON_READ_TX_POWER_CMD,
56  /* Dummy command opcode, needs to be always defined after all commands */
57  BLE_MGR_COMMON_LAST_CMD,
58 };
59 
61 typedef struct ble_msg {
67 
68 void ble_mgr_common_stack_msg_handler(void *param);
69 
70 typedef struct {
72  OS_TASK task;
73 } ble_mgr_common_register_cmd_t;
74 
75 typedef struct {
77  ble_error_t status;
78 } ble_mgr_common_register_rsp_t;
79 
80 void ble_mgr_common_register_cmd_handler(void *param);
81 
82 typedef struct {
84 } ble_mgr_common_enable_cmd_t;
85 
86 typedef struct {
88  ad_ble_status_t status;
89 } ble_mgr_common_enable_rsp_t;
90 
91 void ble_mgr_common_enable_cmd_handler(void *param);
92 
93 typedef struct {
95 } ble_mgr_common_reset_cmd_t;
96 
97 typedef struct {
99  ad_ble_status_t status;
100 } ble_mgr_common_reset_rsp_t;
101 
102 void ble_mgr_common_reset_cmd_handler(void *param);
103 
104 typedef struct {
105  ble_mgr_msg_hdr_t hdr;
106  uint16_t conn_idx;
108 } ble_mgr_common_read_tx_power_cmd_t;
109 
110 typedef struct {
111  ble_mgr_msg_hdr_t hdr;
112  ble_error_t status;
113  uint8_t tx_power_level;
114 } ble_mgr_common_read_tx_power_rsp_t;
115 
116 void ble_mgr_common_read_tx_power_cmd_handler(void *param);
117 
118 #endif /* BLE_MGR_COMMON_H_ */
119 
ble_mgr.h
BLE Manager API.
ble_mgr_cmd.h
BLE manager command definitions.
ble_mgr_common_stack_msg_t
struct ble_msg ble_mgr_common_stack_msg_t
ble_stack_msg_type_t
enum ble_stack_msg_types ble_stack_msg_type_t
ble_msg::hdr
ble_mgr_msg_hdr_t hdr
Definition: ble_mgr_common.h:62
tx_power_level_type_t
tx_power_level_type_t
Definition: ble_common.h:207
ble_mgr_msg_hdr_t
Definition: ble_mgr_cmd.h:54
ble_msg
Definition: ble_mgr_common.h:61
osal.h
OS abstraction layer API.
ble_msg::msg
ble_stack_msg_t msg
Definition: ble_mgr_common.h:65
ble_msg::msg_type
ble_stack_msg_type_t msg_type
Definition: ble_mgr_common.h:63
ble_stack_msg
Definition: ad_ble.h:221
ble_error_t
ble_error_t
Definition: ble_common.h:53