Custom Serial Chat Service Declarations.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | csc_serv |
Custom serial chat service info. More... | |
Macros | |
#define | CSC_UUID_128_LEN (16) |
Custom serial chat UUID length. More... | |
Typedefs | |
typedef struct csc_serv | csc_serv_t |
Custom serial chat service info. More... | |
Functions | |
at_ble_status_t | csc_serv_init (uint8_t *buf, uint16_t len) |
Initialize the csc service initialization function. More... | |
at_ble_status_t | csc_serv_send_data (uint16_t connhandle, uint8_t *databuf, uint16_t datalen) |
Function used for sending data to remote device. More... | |
#define CSC_UUID_128_LEN (16) |
Custom serial chat UUID length.
typedef struct csc_serv csc_serv_t |
Custom serial chat service info.
at_ble_status_t csc_serv_init | ( | uint8_t * | buf, |
uint16_t | len | ||
) |
Initialize the csc service initialization function.
[in] | buf | Buffer pointer for data to be send |
[in] | len | size of buffer |
Initialize the csc service initialization function.
References AT_BLE_ATTR_NO_PERMISSIONS, AT_BLE_ATTR_READABLE_NO_AUTHN_NO_AUTHR, AT_BLE_ATTR_READABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_ATTR_WRITABLE_NO_AUTHN_NO_AUTHR, AT_BLE_ATTR_WRITABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_CHAR_NOTIFY, at_ble_primary_service_define(), AT_BLE_UUID_128, BLE_PAIR_ENABLE, buf, CSC_ENDPOINT_CHAR_UUID, CSC_SERVICE_UUID, CSC_UUID_128_LEN, csc_serv::endpoint_chars, at_ble_characteristic_t::init_value, len, NULL, at_ble_characteristic_t::presentation_format, at_ble_characteristic_t::properties, csc_serv::serv_handle, csc_serv::serv_uuid, at_ble_uuid_t::type, at_ble_uuid_t::uuid, at_ble_characteristic_t::uuid, at_ble_characteristic_t::value_init_len, at_ble_characteristic_t::value_max_len, and at_ble_characteristic_t::value_permissions.
Referenced by csc_prf_init().
at_ble_status_t csc_serv_send_data | ( | uint16_t | connhandle, |
uint8_t * | databuf, | ||
uint16_t | datalen | ||
) |
Function used for sending data to remote device.
[in] | buf | Buffer pointer for data to be send |
[in] | len | size of buffer |
Function used for sending data to remote device.
References at_ble_characteristic_value_get(), at_ble_characteristic_value_set(), at_ble_notification_send(), AT_BLE_SUCCESS, at_ble_characteristic_t::char_val_handle, at_ble_characteristic_t::client_config_handle, DBG_LOG, csc_serv::endpoint_chars, length, and status.
Referenced by csc_prf_send_data().