Microchip® Advanced Software Framework

gattm_task.h File Reference
#include "cmn_defs.h"
#include "gattc_task.h"

Macros

#define GATT_DB_MAX_SIZE   0x50
 Local database maximum size. More...
 
#define GATT_MAX_HDL_LIST   0x08
 maximum number of handles returned More...
 
#define GATT_UUID_16_OCTET_LEN   0x10
 size for 128-bit UUID More...
 

Enumerations

enum  {
  GATT_DISC_ALL_SVC = 0x00,
  GATT_DISC_BY_UUID_SVC,
  GATT_DISC_INCLUDED_SVC,
  GATT_DISC_ALL_CHAR,
  GATT_DISC_BY_UUID_CHAR,
  GATT_DISC_DESC_CHAR,
  GATT_READ_CHAR,
  GATT_READ_BY_UUID_CHAR,
  GATT_READ_LONG_CHAR,
  GATT_READ_MULT_LONG_CHAR,
  GATT_READ_DESC,
  GATT_READ_LONG_DESC,
  GATT_WRITE_NO_RESPONSE,
  GATT_WRITE_SIGNED,
  GATT_WRITE_CHAR,
  GATT_WRITE_LONG_CHAR,
  GATT_WRITE_RELIABLE_CHAR,
  GATT_WRITE_DESC,
  GATT_WRITE_LONG_DESC,
  GATT_WRITE_CANCEL_CHAR,
  GATT_HDL_NTF,
  GATT_HDL_IND,
  GATT_NO_OP_REQ,
  GATT_LAST
}
 request type - application interface More...
 
enum  gattm_msg_id {
  GATTM_ADD_SVC_REQ = 0x2C00,
  GATTM_ADD_SVC_RSP,
  GATTM_ADD_ATTRIBUTE_REQ,
  GATTM_ADD_ATTRIBUTE_RSP,
  GATTM_SVC_GET_PERMISSION_REQ,
  GATTM_SVC_GET_PERMISSION_RSP,
  GATTM_SVC_SET_PERMISSION_REQ,
  GATTM_SVC_SET_PERMISSION_RSP,
  GATTM_ATT_GET_PERMISSION_REQ,
  GATTM_ATT_GET_PERMISSION_RSP,
  GATTM_ATT_SET_PERMISSION_REQ,
  GATTM_ATT_SET_PERMISSION_RSP,
  GATTM_ATT_GET_VALUE_REQ,
  GATTM_ATT_GET_VALUE_RSP,
  GATTM_ATT_SET_VALUE_REQ,
  GATTM_ATT_SET_VALUE_RSP,
  GATTM_DESTROY_DB_REQ,
  GATTM_DESTROY_DB_RSP,
  GATTM_SVC_GET_LIST_REQ,
  GATTM_SVC_GET_LIST_RSP,
  GATTM_ATT_GET_INFO_REQ,
  GATTM_ATT_GET_INFO_RSP
}
 GATT Task messages. More...
 

Functions

ATT_ERR gatt_clear_attribute_req_handler (uint16_t attr_hdl)
 
void gatt_disc_char_req_handler (uint8_t u8ReqType, uint16_t u16ConHdl, uint16_t u16StartHdl, uint16_t u16EndHdl, uint16_t u16AttDesValSize, uint8_t *pu8AttDesVal)
 
void gatt_disc_svc_req_handler (uint8_t u8ReqType, uint16_t u16ConHdl, uint16_t u16StartHdl, uint16_t u16EndHdl, uint16_t u16AttDesValSize, uint8_t *pu8AttDesVal)
 
ATT_ERR gatt_indicate_req_handler (uint16_t conhdl, uint16_t charhdl)
 
ATT_ERR gatt_notify_req_handler (uint16_t conhdl, uint16_t charhdl)
 
ATT_ERR gatt_read_attribute_req_handler (uint16_t attr_hdl, uint16_t *len, uint16_t *perm, uint8_t *uuid_len, uint8_t *uuid, uint8_t *value)
 
void gatt_read_char_req_handler (uint8_t u8ReqType, uint16_t u16Offset, uint16_t u16ConHdl, uint16_t u16StartHdl, uint16_t u16EndHdl, uint16_t u16NbOfUUID, uint8_t u8UUIDSize, uint8_t u8RespSize, uint16_t u16UUID)
 
void gatt_resource_access_req_handler (uint16_t con_hdl)
 
void gatt_resource_access_resp_handler (uint16_t con_hdl)
 
ATT_ERR gatt_write_attribute_req_handler (uint16_t length, uint16_t attr_hdl, uint16_t perm, uint8_t *val)
 
uint8_t gatt_write_char_req_handler (uint16_t u16ConHdl, uint16_t u16CharHdl, uint16_t u16WrOffset, uint16_t u16ValLen, uint8_t u8ReqType, uint8_t u8AutoExec, uint8_t *pu8Val)
 
ATT_ERR gattm_add_attribute_req_handler (uint16_t start_hdl, uint16_t max_data_size, uint16_t perm, uint8_t uuid_len, uint8_t *uuid, uint16_t *handle)
 
ATT_ERR gattm_add_svc_req_handler (uint16_t *start_hdl, uint16_t total_size, uint8_t nb_att_uuid_16, uint8_t nb_att_uuid_32, uint8_t nb_att_uuid_128)
 
ATT_ERR gattm_att_get_value_req_handler (uint16_t handle, uint16_t *length, uint8_t *value)
 
ATT_ERR gattm_att_set_value_req_handler (uint16_t handle, uint16_t length, uint8_t *value)
 

#define GATT_DB_MAX_SIZE   0x50

Local database maximum size.

#define GATT_MAX_HDL_LIST   0x08

maximum number of handles returned

#define GATT_UUID_16_OCTET_LEN   0x10

size for 128-bit UUID

anonymous enum

request type - application interface

Enumerator
GATT_DISC_ALL_SVC 

Discover all services.

GATT_DISC_BY_UUID_SVC 

Discover services by UUID.

GATT_DISC_INCLUDED_SVC 

Discover included services.

GATT_DISC_ALL_CHAR 

Discover all characteristics.

GATT_DISC_BY_UUID_CHAR 

Discover characteristic by UUID.

GATT_DISC_DESC_CHAR 

Discover characteristic descriptor.

GATT_READ_CHAR 

Read characteristic.

GATT_READ_BY_UUID_CHAR 

Read characteristic by UUID.

GATT_READ_LONG_CHAR 

Read long characteristic.

GATT_READ_MULT_LONG_CHAR 

Read multiple long characteristic.

GATT_READ_DESC 

Read descriptor.

GATT_READ_LONG_DESC 

Read long descriptor.

GATT_WRITE_NO_RESPONSE 

Write no response.

GATT_WRITE_SIGNED 

Write signed.

GATT_WRITE_CHAR 

Write characteristic.

GATT_WRITE_LONG_CHAR 

Write long characteristic.

GATT_WRITE_RELIABLE_CHAR 

Write reliable characteristic.

GATT_WRITE_DESC 

Write descriptor.

GATT_WRITE_LONG_DESC 

Write long descriptor.

GATT_WRITE_CANCEL_CHAR 

Write cancel characteristic.

GATT_HDL_NTF 

Handle notification: signed or unsigned.

GATT_HDL_IND 

Handle indication.

GATT_NO_OP_REQ 

No operation.

GATT_LAST 

Last GATT flag.

GATT Task messages.

Enumerator
GATTM_ADD_SVC_REQ 

Add service in database request.

GATTM_ADD_SVC_RSP 

Add service in database response.

GATTM_ADD_ATTRIBUTE_REQ 

Add attribute in service database request.

GATTM_ADD_ATTRIBUTE_RSP 

Add attribute in service database response.

GATTM_SVC_GET_PERMISSION_REQ 

Get permission settings of service request.

GATTM_SVC_GET_PERMISSION_RSP 

Get permission settings of service response.

GATTM_SVC_SET_PERMISSION_REQ 

Set permission settings of service request.

GATTM_SVC_SET_PERMISSION_RSP 

Set permission settings of service response.

GATTM_ATT_GET_PERMISSION_REQ 

Get permission settings of attribute request.

GATTM_ATT_GET_PERMISSION_RSP 

Get permission settings of attribute response.

GATTM_ATT_SET_PERMISSION_REQ 

Set permission settings of attribute request.

GATTM_ATT_SET_PERMISSION_RSP 

Set permission settings of attribute response.

GATTM_ATT_GET_VALUE_REQ 

Get attribute value request.

GATTM_ATT_GET_VALUE_RSP 

Get attribute value response.

GATTM_ATT_SET_VALUE_REQ 

Set attribute value request.

GATTM_ATT_SET_VALUE_RSP 

Set attribute value response.

GATTM_DESTROY_DB_REQ 

DEBUG ONLY: Destroy Attribute database request.

GATTM_DESTROY_DB_RSP 

DEBUG ONLY: Destroy Attribute database response.

GATTM_SVC_GET_LIST_REQ 

DEBUG ONLY: Retrieve list of services request.

GATTM_SVC_GET_LIST_RSP 

DEBUG ONLY: Retrieve list of services response.

GATTM_ATT_GET_INFO_REQ 

DEBUG ONLY: Retrieve information of attribute request.

GATTM_ATT_GET_INFO_RSP 

DEBUG ONLY: Retrieve information of attribute response.

ATT_ERR gatt_clear_attribute_req_handler ( uint16_t  attr_hdl)
void gatt_disc_char_req_handler ( uint8_t  u8ReqType,
uint16_t  u16ConHdl,
uint16_t  u16StartHdl,
uint16_t  u16EndHdl,
uint16_t  u16AttDesValSize,
uint8_t *  pu8AttDesVal 
)
void gatt_disc_svc_req_handler ( uint8_t  u8ReqType,
uint16_t  u16ConHdl,
uint16_t  u16StartHdl,
uint16_t  u16EndHdl,
uint16_t  u16AttDesValSize,
uint8_t *  pu8AttDesVal 
)
ATT_ERR gatt_indicate_req_handler ( uint16_t  conhdl,
uint16_t  charhdl 
)
ATT_ERR gatt_notify_req_handler ( uint16_t  conhdl,
uint16_t  charhdl 
)
ATT_ERR gatt_read_attribute_req_handler ( uint16_t  attr_hdl,
uint16_t *  len,
uint16_t *  perm,
uint8_t *  uuid_len,
uint8_t *  uuid,
uint8_t *  value 
)
void gatt_read_char_req_handler ( uint8_t  u8ReqType,
uint16_t  u16Offset,
uint16_t  u16ConHdl,
uint16_t  u16StartHdl,
uint16_t  u16EndHdl,
uint16_t  u16NbOfUUID,
uint8_t  u8UUIDSize,
uint8_t  u8RespSize,
uint16_t  u16UUID 
)
void gatt_resource_access_req_handler ( uint16_t  con_hdl)
void gatt_resource_access_resp_handler ( uint16_t  con_hdl)
ATT_ERR gatt_write_attribute_req_handler ( uint16_t  length,
uint16_t  attr_hdl,
uint16_t  perm,
uint8_t *  val 
)
uint8_t gatt_write_char_req_handler ( uint16_t  u16ConHdl,
uint16_t  u16CharHdl,
uint16_t  u16WrOffset,
uint16_t  u16ValLen,
uint8_t  u8ReqType,
uint8_t  u8AutoExec,
uint8_t *  pu8Val 
)
ATT_ERR gattm_add_svc_req_handler ( uint16_t *  start_hdl,
uint16_t  total_size,
uint8_t  nb_att_uuid_16,
uint8_t  nb_att_uuid_32,
uint8_t  nb_att_uuid_128 
)