pass.h File Reference

Phone Alert Status Service API. More...

#include "gr_includes.h"
#include "custom_config.h"
#include <stdint.h>
#include <stdbool.h>
+ Include dependency graph for pass.h:

Go to the source code of this file.

Classes

struct  pass_evt_t
 Phone Alert Status Service event. More...
 
struct  pass_init_t
 Phone Alert Status Service init stucture. More...
 

Macros

#define PASS_CONNECTION_MAX   10
 Maximum number of Phone Alert Status Service connections. More...
 
#define PASS_ALERT_STATUS_VAL_LEN   1
 Length of Alert Status value. More...
 
#define PASS_RINGER_SET_VAL_LEN   1
 Length of Ringer Setting value. More...
 
#define PASS_RINGER_CTRL_PT_VAL_LEN   1
 Length of Ringer Control Point value. More...
 
#define PASS_CHAR_MANDATORY   0x003f
 Bit mask for mandatory characteristic in PASS. More...
 
#define PASS_CHAR_RING_CTRL_PT_SUP   0x0180
 Bit mask for Ringer Control Point characteristic in PASS. More...
 
#define PASS_CHAR_FULL   0x01ff
 Bit mask of the full characteristic. More...
 
#define PASS_NO_STATE_ACTIVE   (0x00)
 Bit for no state active. More...
 
#define PASS_RINGER_ACTIVE   (0x01 << 0)
 Bit for ringer State active. More...
 
#define PASS_VIBRATE_ACTIVE   (0x01 << 1)
 Bit for vibrate State active. More...
 
#define PASS_DISPLAY_ALERT_ACTIVE   (0x01 << 2)
 Bit for display Alert Status State active. More...
 
#define PASS_ALL_STATE_ACTIVE   (0x07)
 Bit for no state active. More...
 
#define PASS_RINGER_SET_SILENT   0
 Ringer Silent. More...
 
#define PASS_RINGER_SET_NORMAL   1
 Ringer Normal. More...
 

Typedefs

typedef void(* pass_evt_handler_t) (pass_evt_t *p_evt)
 Phone Alert Status Service event handler type. More...
 

Enumerations

enum  pass_ringer_ctrl_pt_t { PASS_CTRL_PT_SILENT_MODE = 0x01, PASS_CTRL_PT_MUTE_ONCE, PASS_CTRL_PT_CANCEL_SLIENT_MODE }
 Phone Alert Status Service Ringer Control Point. More...
 
enum  pass_evt_type_t {
  PASS_EVT_INVALID, PASS_EVT_ALERT_STATUS_NTF_ENABLE, PASS_EVT_ALERT_STATUS_NTF_DISABLE, PASS_EVT_RINGER_SET_NTF_ENABLE,
  PASS_EVT_RINGER_SET_NTF_DISABLE, PASS_EVT_SILENT_MODE_SET, PASS_EVT_MUTE_ONCE_SET, PASS_EVT_SILENT_MODE_CANCEL
}
 Phone Alert Status Service event type. More...
 

Functions

sdk_err_t pass_service_init (pass_init_t *p_pass_init)
 Initialize a Phone Alert Status Service instance and add in the DB. More...
 
uint8_t pass_ringer_setting_get (void)
 Get Ringer Setting value. More...
 
void pass_ringer_setting_set (uint8_t conn_idx, uint8_t new_setting)
 Set Ringer Setting value. More...
 
void pass_alert_status_set (uint8_t conn_idx, uint8_t new_status)
 Set Alert Status value. More...
 

Detailed Description

Phone Alert Status Service 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.

Definition in file pass.h.