Microchip® Advanced Software Framework

tx_power.c File Reference

TX Service.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

#include "tx_power.h"

Functions

void init_tx_power_service (gatt_service_handler_t *tx_power_serv)
 Tx power service initialization. More...
 
at_ble_status_t txps_power_read (at_ble_handle_t conn_handle, at_ble_handle_t char_handle)
 Send the Read Request to Tx Power service. More...
 
int8_t txps_power_read_response (at_ble_characteristic_read_response_t *char_read_resp, gatt_txps_char_handler_t *txps_handler)
 Read a Tx Power. More...
 
at_ble_status_t txps_primary_service_define (gatt_service_handler_t *txps_primary_service)
 Tx power service definition. More...
 

Variables

int8_t tx_power_initial_value = DEFAULT_TX_PWR_VALUE
 

void init_tx_power_service ( gatt_service_handler_t tx_power_serv)
at_ble_status_t txps_power_read ( at_ble_handle_t  conn_handle,
at_ble_handle_t  char_handle 
)

Send the Read Request to Tx Power service.

Read value will be reported via AT_BLE_CHARACTERISTIC_READ_RESPONSE event

Parameters
[in]conn_handlehandle of the connection
[in]char_handlehandle of the characteristic
Returns
AT_BLE_SUCCESS operation completed successfully
AT_BLE_INVALID_PARAM Invalid arguments.
AT_BLE_FAILURE Generic error.

References AT_BLE_ATT_INVALID_HANDLE, at_ble_characteristic_read(), TXPS_INVALID_CHAR_HANDLE, TXPS_POWER_READ_LENGTH, and TXPS_POWER_READ_OFFSET.

Referenced by pxp_monitor_discovery_complete_handler().

at_ble_status_t txps_primary_service_define ( gatt_service_handler_t txps_primary_service)

Tx power service definition.

Defining the tx power service to the attribute data base.

References at_ble_primary_service_define(), NULL, TXPS_CHARACTERISTIC_COUNT, and TXPS_INCLUDED_SERVICE_COUNT.

Referenced by pxp_service_define().

int8_t tx_power_initial_value = DEFAULT_TX_PWR_VALUE

Referenced by init_tx_power_service().