Data Structures | Macros | Typedefs | Enumerations | Functions
pass_c.h File Reference

API. More...

`#include "ble_prf_types.h"`
`#include "gr55xx_sys.h"`
`#include "custom_config.h"`
`#include <stdint.h>`
`#include <stdbool.h>`

Go to the source code of this file.

## Data Structures
struct | pass_c_handles_t
| Handles on the connected peer device needed to interact with it. More...
struct | pass_c_evt_t
| Phone Alert Status Client Service event. More...

## Macros
#define | PASS_C_CONNECTION_MAX
#define | PASS_C_NO_STATE_ACTIVE (0x00)
#define | PASS_C_RINGER_ACTIVE (0x01 << 0)
#define | PASS_C_VIBRATE_ACTIVE (0x01 << 1)
#define | PASS_C_DISPLAY_ALERT_ACTIVE (0x01 << 2)
#define | PASS_C_ALL_STATE_ACTIVE (0x07)
#define | PASS_C_RINGER_CTRL_PT_VAL_LEN 1
#define | PASS_C_RINGER_SET_SILENT 0
#define | PASS_C_RINGER_SET_NORMAL 1

## Typedefs
typedef void(* | pass_c_evt_handler_t) (pass_c_evt_t *p_evt)
| Phone Alert Status Service Client event handler type.

## Enumerations
enum | pass_c_ringer_ctrl_pt_t { PASS_C_CTRL_PT_SILENT_MODE = 0x01, PASS_C_CTRL_PT_MUTE_ONCE, PASS_C_CTRL_PT_CANCEL_SLIENT_MODE }
| Phone Alert Status Service Client Ringer Control Point. More...
enum | pass_c_evt_type_t { PASS_C_EVT_INVALID, PASS_C_EVT_DISCOVERY_COMPLETE, PASS_C_EVT_DISCOVERY_FAIL, PASS_C_EVT_ALERT_STATUS_NTF_SET_SUCCESS, PASS_C_EVT_RINGER_SET_NTF_SET_SUCCESS, PASS_C_EVT_ALERT_STATUS_RECEIVE, PASS_C_EVT_RINGER_SET_RECEIVE, PASS_C_EVT_CTRL_POINT_SET_SUCCESS, PASS_C_EVT_WRITE_OP_ERR }
| Phone Alert Status Service Client event type. More...

## Functions
sdk_err_t | pass_client_init (pass_c_evt_handler_t evt_handler)
| Register PASS Client event handler. More...
sdk_err_t | pass_c_disc_srvc_start (uint8_t conn_idx)
| Discovery Phone Alert Status Service on peer. More...
sdk_err_t | pass_c_alert_status_notify_set (uint8_t conn_idx, bool is_enable)
| Enable or disable peer Alert Status characteristic notify. More...
sdk_err_t | pass_c_ringer_set_notify_set (uint8_t conn_idx, bool is_enable)
| Enable or disable peer Ringer Setting characteristic notify. More...
sdk_err_t | pass_c_alert_status_read (uint8_t conn_idx)
| Read Alert Status characteristic value. More...
sdk_err_t | pass_c_ringer_set_read (uint8_t conn_idx)
| Read Ringer Setting characteristic value. More...
sdk_err_t | pass_c_ctrl_point_set (uint8_t conn_idx, uint8_t ctrl_value)
| Set Control Point characteristic value. More...

## Detailed Description

API.

Attention

  ##### Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.