Reference Time Update Service.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include <string.h>
#include "at_ble_api.h"
#include "ble_manager.h"
#include "ble_utils.h"
#include "reference_time.h"
Functions | |
at_ble_status_t | tis_rtu_update_read (at_ble_handle_t conn_handle, at_ble_handle_t char_handle, uint16_t length) |
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_rtu_update_read_response (at_ble_characteristic_read_response_t *read_resp, gatt_rtu_handler_t *rtu_handler) |
Read response handler for read response for time characteristic. More... | |
at_ble_status_t | tis_rtu_update_write (at_ble_handle_t conn_handle, at_ble_handle_t char_value_handle, uint8_t char_value) |
write Characteristic value giving its handle More... | |
at_ble_status_t tis_rtu_update_read | ( | at_ble_handle_t | conn_handle, |
at_ble_handle_t | char_handle, | ||
uint16_t | length | ||
) |
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, RTU_INVALID_CHAR_HANDLE, and RTU_READ_OFFSET.
Referenced by app_read_response_cb().
int8_t tis_rtu_update_read_response | ( | at_ble_characteristic_read_response_t * | read_resp, |
gatt_rtu_handler_t * | rtu_handler | ||
) |
Read response handler for read response for time characteristic.
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, DBG_LOG, at_ble_characteristic_read_response_t::status, and gatt_rtu_handler::tp_state_char_handle.
Referenced by time_info_characteristic_read_response(), and time_info_notification_handler().
at_ble_status_t tis_rtu_update_write | ( | at_ble_handle_t | conn_handle, |
at_ble_handle_t | char_value_handle, | ||
uint8_t | char_value | ||
) |
write Characteristic value giving its handle
[in] | conn_handle | connection handle |
[in] | char_value_handle | characteristic value handle |
[in] | char_value | characteristic new value |
References at_ble_characteristic_write(), AT_BLE_INVALID_STATE, and RTU_INVALID_CHAR_HANDLE.
Referenced by tip_app_custom_event().