5454
5555/** BLE response/event status codes. */
5656enum BLE_STATUS {
57- BLE_STATUS_SUCCESS = 0 , /**< General BLE Success code */
58- BLE_STATUS_PENDING , /**< Request received and execution started, response pending */
59- BLE_STATUS_TIMEOUT , /**< Request timed out */
60- BLE_STATUS_NOT_SUPPORTED , /**< Request/feature/parameter not supported */
61- BLE_STATUS_NOT_ALLOWED , /**< Request not allowed */
62- BLE_STATUS_LINK_TIMEOUT , /**< Link timeout (link loss) */
63- BLE_STATUS_NOT_ENABLED , /**< BLE not enabled, @ref ble_enable */
64- BLE_STATUS_ERROR , /**< Generic Error */
65- BLE_STATUS_ALREADY_REGISTERED , /**< BLE service already registered */
66- BLE_STATUS_WRONG_STATE , /**< Wrong state for request */
67- BLE_STATUS_ERROR_PARAMETER , /**< Parameter in request is wrong */
68- BLE_STATUS_NO_MEMORY , /**< System doesn't have memory */
69- BLE_STATUS_GAP_BASE = 0x100 , /**< GAP specific error base */
70- BLE_STATUS_GATT_BASE = 0x200 , /**< GATT specific Error base */
57+ BLE_STATUS_SUCCESS = 0 , /**< General BLE Success code */
58+ BLE_STATUS_PENDING , /**< Request received and execution started, response pending */
59+ BLE_STATUS_TIMEOUT , /**< Request timed out */
60+ BLE_STATUS_NOT_SUPPORTED , /**< Request/feature/parameter not supported */
61+ BLE_STATUS_NOT_ALLOWED , /**< Request not allowed */
62+ BLE_STATUS_LINK_TIMEOUT , /**< Link timeout (link loss) */
63+ BLE_STATUS_NOT_ENABLED , /**< BLE not enabled, @ref ble_enable */
64+ BLE_STATUS_ERROR , /**< Generic Error */
65+ BLE_STATUS_ALREADY_REGISTERED , /**< BLE service already registered */
66+ BLE_STATUS_WRONG_STATE , /**< Wrong state for request */
67+ BLE_STATUS_ERROR_PARAMETER , /**< Parameter in request is wrong */
68+ BLE_STATUS_NO_MEMORY , /**< System doesn't have memory */
69+ BLE_STATUS_GAP_BASE = 0x100 , /**< GAP specific error base */
70+ BLE_STATUS_GATT_BASE = 0x200 , /**< GATT specific Error base */
7171};
7272
7373typedef uint16_t ble_status_t ; /**< Response and event BLE service status type @ref BLE_STATUS */
@@ -77,6 +77,14 @@ typedef ble_status_t BleStatus;
7777#define BLE_MAX_CONN_CFG 2
7878
7979typedef bool (* ble_advertise_handle_cb_t )(uint8_t type , const uint8_t * data ,
80- uint8_t data_len , void * user_data );
80+ uint8_t data_len , void * user_data );
81+
82+
83+ typedef struct ble_conn_param {
84+ float interval_min ; // 7.5 - 4000ms
85+ float interval_max ; // 7.5 - 4000ms
86+ uint16_t latency ; // 0x0000 - 0x01F4
87+ uint16_t timeout ; // 100 - 32000ms
88+ }ble_conn_param_t ;
8189
8290#endif // _BLE_COMMON_H_INCLUDED
0 commit comments