Custom Serial Chat Service.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include "stddef.h"
#include "stdio.h"
#include "string.h"
#include "at_ble_api.h"
#include "ble_manager.h"
#include "cscs.h"
Functions | |
at_ble_status_t | csc_serv_init (uint8_t *buf, uint16_t len) |
service Configuration function More... | |
at_ble_status_t | csc_serv_send_data (uint16_t connhandle, uint8_t *databuf, uint16_t datalen) |
service send data function More... | |
Variables | |
csc_serv_t | csc_inst |
at_ble_status_t csc_serv_init | ( | uint8_t * | buf, |
uint16_t | len | ||
) |
service Configuration function
Initialize the csc service initialization function.
References AT_BLE_ATTR_NO_PERMISSIONS, AT_BLE_ATTR_READABLE_REQ_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, CSC_ENDPOINT_CHAR_UUID, CSC_SERVICE_UUID, CSC_UUID_128_LEN, csc_serv::endpoint_chars, at_ble_characteristic_t::init_value, 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 | ||
) |
service send data function
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, and length.
Referenced by csc_prf_send_data().
csc_serv_t csc_inst |