Microchip® Advanced Software Framework

pas_service.c File Reference

Phone Alert Status Service.

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

#include <string.h>
#include "at_ble_api.h"
#include "ble_utils.h"
#include "pas_service.h"

Functions

at_ble_status_t pas_char_set_ringer_control_point (at_ble_handle_t conn_handle, at_ble_handle_t char_handle, uint8_t data)
 sets ringer control point More...
 
at_ble_status_t pas_char_write_notification (at_ble_handle_t conn_handle, at_ble_handle_t char_handle, bool enable)
 Enable/disable the notification. More...
 
at_ble_status_t pas_read_alert_status_char (at_ble_handle_t conn_handle, at_ble_handle_t char_handle)
 triggers the read of alert status characteristic More...
 
at_ble_status_t pas_read_ringer_setting_char (at_ble_handle_t conn_handle, at_ble_handle_t char_handle)
 triggers the read of ringer setting characteristic More...
 

at_ble_status_t pas_char_set_ringer_control_point ( at_ble_handle_t  conn_handle,
at_ble_handle_t  char_handle,
uint8_t  data 
)

sets ringer control point

Parameters
[in]at_ble_handle_tconnection handle
[in]at_ble_handle-tcharacteristic handle
[in]set/clearthe notification
Returns
AT_BLE_SUCCESS for success or refer at_ble_err_status_t

References at_ble_characteristic_write(), data, and RINGER_SETTING_CHAR_LEN.

Referenced by pas_client_write_ringer_control_point().

at_ble_status_t pas_char_write_notification ( at_ble_handle_t  conn_handle,
at_ble_handle_t  char_handle,
bool  enable 
)

Enable/disable the notification.

Parameters
[in]at_ble_handle_tconnection handle
[in]at_ble_handle-tcharacteristic handle
[in]set/clearthe notification
Returns
AT_BLE_SUCCESS for success or refer at_ble_err_status_t

References at_ble_characteristic_write(), CLIENT_CONF_CHAR_DESCRIPTOR_LEN, and data.

Referenced by pas_client_enable_char_notification().

at_ble_status_t pas_read_alert_status_char ( at_ble_handle_t  conn_handle,
at_ble_handle_t  char_handle 
)

triggers the read of alert status characteristic

triggers the read of alert status characteritic

Parameters
[in]at_ble_handle_tconnection handle
[in]at_ble_handle-tcharacteristic handle
Returns
AT_BLE_SUCCESS for success AT_BLE_FAILURE for failure

References ALERT_STATUS_CHAR_LEN, and at_ble_characteristic_read().

Referenced by pas_client_read_alert_status_char().

at_ble_status_t pas_read_ringer_setting_char ( at_ble_handle_t  conn_handle,
at_ble_handle_t  char_handle 
)

triggers the read of ringer setting characteristic

Parameters
[in]at_ble_handle_tconnection handle
[in]at_ble_handle-tcharacteristic handle
Returns
AT_BLE_SUCCESS for success AT_BLE_FAILURE for failure

References at_ble_characteristic_read(), and RINGER_SETTING_CHAR_LEN.

Referenced by pas_client_read_ringer_setting_char().