Current Time Service Application declarations.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include "ble_manager.h"
Data Structures | |
struct | gatt_cts_handler |
Macros | |
#define | CTS_CLIENT_CHAR_DESCRIPTOR (0x2902) |
#define | CTS_DESCRIPTOR_LENGTH (2) |
#define | CTS_INVALID_CHAR_HANDLE (0) |
#define | CTS_READ_LENGTH (20) |
#define | CTS_READ_OFFSET (0) |
Typedefs | |
typedef struct gatt_cts_handler | gatt_cts_handler_t |
Functions | |
at_ble_status_t | tis_current_time_noti (at_ble_handle_t conn_handle, at_ble_handle_t desc_handle, uint8_t *notify) |
write notification handler for Current Time Service More... | |
at_ble_status_t | tis_current_time_read (at_ble_handle_t conn_handle, at_ble_handle_t char_handle) |
Send the Read request to the current time characteristic Read value will be reported via AT_BLE_CHARACTERISTIC_READ_RESPONSE event. More... | |
int8_t | tis_current_time_read_response (at_ble_characteristic_read_response_t *read_resp, gatt_cts_handler_t *cts_handler) |
Read response handler for read response. More... | |
#define CTS_CLIENT_CHAR_DESCRIPTOR (0x2902) |
Referenced by time_info_descriptor_found_handler().
#define CTS_DESCRIPTOR_LENGTH (2) |
#define CTS_INVALID_CHAR_HANDLE (0) |
Referenced by tis_current_time_noti(), and tis_current_time_read().
#define CTS_READ_LENGTH (20) |
Referenced by tis_current_time_read().
#define CTS_READ_OFFSET (0) |
Referenced by tis_current_time_read().
typedef struct gatt_cts_handler gatt_cts_handler_t |
at_ble_status_t tis_current_time_noti | ( | at_ble_handle_t | conn_handle, |
at_ble_handle_t | desc_handle, | ||
uint8_t * | notify | ||
) |
write notification handler for Current Time Service
[in] | conn_handle | read response data available form |
[in] | desc_handle | read response data available form |
[in] | notify | read response data available form at_ble_characteristic_read_response_t |
References at_ble_characteristic_write(), AT_BLE_INVALID_STATE, CTS_INVALID_CHAR_HANDLE, and DBG_LOG.
Referenced by time_info_write_notification_handler().
at_ble_status_t tis_current_time_read | ( | at_ble_handle_t | conn_handle, |
at_ble_handle_t | char_handle | ||
) |
Send the Read request to the current time characteristic Read value will be reported via AT_BLE_CHARACTERISTIC_READ_RESPONSE event.
[in] | conn_handle | handle of the connection |
[in] | char_handle | handle of the characteristic |
References at_ble_characteristic_read(), AT_BLE_INVALID_STATE, CTS_INVALID_CHAR_HANDLE, CTS_READ_LENGTH, and CTS_READ_OFFSET.
Referenced by app_read_response_cb(), and tip_app_custom_event().
int8_t tis_current_time_read_response | ( | at_ble_characteristic_read_response_t * | read_resp, |
gatt_cts_handler_t * | cts_handler | ||
) |
Read response handler for read response.
[in] | read_value | read response data available form at_ble_characteristic_read_response_t |
Read response handler for read response.
References AT_BLE_SUCCESS, at_ble_characteristic_read_response_t::char_handle, at_ble_characteristic_read_response_t::char_value, gatt_cts_handler::curr_char_handle, DBG_LOG, DBG_LOG_CONT, gatt_cts_handler::lti_char_handle, ptr, gatt_cts_handler::rti_char_handle, and at_ble_characteristic_read_response_t::status.
Referenced by time_info_characteristic_read_response(), and time_info_notification_handler().