Microchip® Advanced Software Framework

cmn_defs.h File Reference

Data Structures

struct  att_desired_type
 desired UUID More...
 
struct  att_info_data
 Attribute data holder. More...
 
struct  att_uuid_type
 UUID with different length Structure. More...
 

Macros

#define API_PKT_ID   0x05
 
#define ATT_CHAR_NAME_MAX_LEN   0x0030
 
#define ATT_MAX_NUM_EXT_PROFILE   0x000A
 
#define ATT_MAX_NUM_INCL_PROFILE   0x000A
 
#define ATT_NB_MULT_HDLS   0x0008
 Nb of handles for multiple handle operation. More...
 
#define ATT_SIGNATURE_LEN   0x0C
 
#define ATT_SVC_VALUE_MAX_LEN   0x0030
 Length, number, offset defines. More...
 
#define ATT_UUID_128_LEN   0x0010
 
#define ATT_UUID_16_LEN   0x0002
 
#define ATT_UUID_32_LEN   0x0004
 
#define ATTM_MAX_VALUE   (AT_DEFAULT_MTU+1)
 Maximum value length. More...
 
#define ATTM_RELIABLE_WRITE   0x10
 Maximum content of reliable write. More...
 
#define FALSE   0
 
#define HDR_LEN   9
 
#define KE_BUILD_ID(type, index)   ( (uint16_t)(((index) << 8)|(type)) )
 Builds the task identifier from the type and the index of that task. More...
 
#define KE_IDX_GET(NMI_Uint16)   (((NMI_Uint16) >> 8) & 0xFF)
 Retrieves task index number from task id. More...
 
#define KEY_LEN   0x10
 
#define NMI_CHAR_MAX_LEN   (2)
 
#define PERM(access, right)   (((PERM_RIGHT_ ## right) << (PERM_ACCESS_ ## access)) & (PERM_ACCESS_MASK_ ## access))
 
#define TASK_EXTERN   TASK_GTL
 
#define TRUE   1
 

Enumerations

enum  {
  PERM_ACCESS_RD = 0,
  PERM_ACCESS_WR = 3,
  PERM_ACCESS_IND = 6,
  PERM_ACCESS_NTF = 9,
  PERM_ACCESS_EKS = 12,
  PERM_ACCESS_HIDE = 13,
  PERM_ACCESS_WRITE_SIGNED = 14
}
 Attribute access types. More...
 
enum  {
  PERM_ACCESS_MASK_RD = 0x0007,
  PERM_ACCESS_MASK_WR = 0x0038,
  PERM_ACCESS_MASK_IND = 0x01C0,
  PERM_ACCESS_MASK_NTF = 0x0E00,
  PERM_ACCESS_MASK_EKS = 0x1000,
  PERM_ACCESS_MASK_HIDE = 0x2000,
  PERM_ACCESS_MASK_WRITE_SIGNED = 0x4000
}
 Attribute access types mask. More...
 
enum  {
  PERM_ACCESS_SVC = 0,
  PERM_ACCESS_SVC_EKS = 3,
  PERM_ACCESS_SVC_HIDE = 4
}
 Service access types. More...
 
enum  {
  PERM_ACCESS_MASK_SVC = 0x07,
  PERM_ACCESS_MASK_SVC_EKS = 0x08,
  PERM_ACCESS_MASK_SVC_HIDE = 0x10
}
 Service access types mask. More...
 
enum  {
  PERM_RIGHT_DISABLE = 0,
  PERM_RIGHT_ENABLE = 1,
  PERM_RIGHT_UNAUTH = 2,
  PERM_RIGHT_AUTH = 3,
  PERM_RIGHT_AUTHZ = 4
}
 Attribute & Service access rights. More...
 
enum  {
  PERM_RIGHT_MASK_DISABLE = 0x3,
  PERM_RIGHT_MASK_ENABLE = 0x3,
  PERM_RIGHT_MASK_UNAUTH = 0x3,
  PERM_RIGHT_MASK_AUTH = 0x3,
  PERM_RIGHT_MASK_AUTHZ = 0x4
}
 Attribute & Service access rights mask. More...
 
enum  {
  TASK_NONE = 0xFF,
  TASK_LM = 56,
  TASK_LC = 57,
  TASK_LB = 58,
  TASK_LD = 59,
  TASK_LLM = 0,
  TASK_LLC = 1,
  TASK_LLD = 2,
  TASK_HCI = 60,
  TASK_HCIH = 61,
  TASK_DBG = 3,
  TASK_L2CM = 4,
  TASK_L2CC = 5,
  TASK_SMPM = 6,
  TASK_SMPC = 7,
  TASK_ATTM = 8,
  TASK_ATTC = 9,
  TASK_ATTS = 10,
  TASK_GATTM = 11,
  TASK_GATTC = 12,
  TASK_GAPM = 13,
  TASK_GAPC = 14,
  TASK_PROXM = 15,
  TASK_PROXR = 16,
  TASK_FINDL = 17,
  TASK_FINDT = 18,
  TASK_HTPC = 19,
  TASK_HTPT = 20,
  TASK_ACCEL = 21,
  TASK_BLPS = 22,
  TASK_BLPC = 23,
  TASK_HRPS = 24,
  TASK_HRPC = 25,
  TASK_TIPS = 26,
  TASK_TIPC = 27,
  TASK_DISS = 28,
  TASK_DISC = 29,
  TASK_SCPPS = 30,
  TASK_SCPPC = 31,
  TASK_BASS = 32,
  TASK_BASC = 33,
  TASK_HOGPD = 34,
  TASK_HOGPBH = 35,
  TASK_HOGPRH = 36,
  TASK_GLPS = 37,
  TASK_GLPC = 38,
  TASK_NBPS = 39,
  TASK_NBPC = 40,
  TASK_RSCPS = 41,
  TASK_RSCPC = 42,
  TASK_CSCPS = 43,
  TASK_CSCPC = 44,
  TASK_ANPS = 45,
  TASK_ANPC = 46,
  TASK_PASPS = 47,
  TASK_PASPC = 48,
  TASK_CPPS = 49,
  TASK_CPPC = 50,
  TASK_DISPLAY = 51,
  TASK_APP = 52,
  TASK_LANS = 53,
  TASK_LANC = 54,
  TASK_WIFIPROV = 55,
  TASK_GTL = 63,
  TASK_MAX = 64
}
 Tasks types. More...
 
enum  adv_filter_policy {
  ADV_ALLOW_SCAN_ANY_CON_ANY = 0x00,
  ADV_ALLOW_SCAN_WLST_CON_ANY,
  ADV_ALLOW_SCAN_ANY_CON_WLST,
  ADV_ALLOW_SCAN_WLST_CON_WLST,
  ADV_ALLOW_SCAN_END
}
 Advertising filter policy. More...
 

#define API_PKT_ID   0x05
#define ATT_CHAR_NAME_MAX_LEN   0x0030
#define ATT_MAX_NUM_EXT_PROFILE   0x000A
#define ATT_MAX_NUM_INCL_PROFILE   0x000A
#define ATT_NB_MULT_HDLS   0x0008

Nb of handles for multiple handle operation.

#define ATT_SIGNATURE_LEN   0x0C
#define ATT_SVC_VALUE_MAX_LEN   0x0030

Length, number, offset defines.

#define ATT_UUID_128_LEN   0x0010
#define ATT_UUID_16_LEN   0x0002
#define ATT_UUID_32_LEN   0x0004
#define ATTM_MAX_VALUE   (AT_DEFAULT_MTU+1)

Maximum value length.

#define ATTM_RELIABLE_WRITE   0x10

Maximum content of reliable write.

#define FALSE   0
#define HDR_LEN   9
#define NMI_CHAR_MAX_LEN   (2)
#define PERM (   access,
  right 
)    (((PERM_RIGHT_ ## right) << (PERM_ACCESS_ ## access)) & (PERM_ACCESS_MASK_ ## access))
#define TASK_EXTERN   TASK_GTL
#define TRUE   1

anonymous enum

Attribute access types.

Enumerator
PERM_ACCESS_RD 

Read Access.

PERM_ACCESS_WR 

Write Access.

PERM_ACCESS_IND 

Indication Access.

PERM_ACCESS_NTF 

Notification Access.

PERM_ACCESS_EKS 

Check Encryption key size.

PERM_ACCESS_HIDE 

Hide/Show attribute.

PERM_ACCESS_WRITE_SIGNED 

Write Signed Enabled attribute.

anonymous enum

Attribute access types mask.

Enumerator
PERM_ACCESS_MASK_RD 

Read Access Mask.

PERM_ACCESS_MASK_WR 

Write Access Mask.

PERM_ACCESS_MASK_IND 

Indication Access Mask.

PERM_ACCESS_MASK_NTF 

Notification Access Mask.

PERM_ACCESS_MASK_EKS 

Check Encryption key size Mask.

PERM_ACCESS_MASK_HIDE 

Hide/Show attribute Mask.

PERM_ACCESS_MASK_WRITE_SIGNED 

Write Signed Enabled attribute Mask.

anonymous enum

Service access types.

Enumerator
PERM_ACCESS_SVC 

Service Access.

PERM_ACCESS_SVC_EKS 

Check Encryption key size for service Access.

PERM_ACCESS_SVC_HIDE 

Hide/Show service Access.

anonymous enum

Service access types mask.

Enumerator
PERM_ACCESS_MASK_SVC 

Service Access Mask.

PERM_ACCESS_MASK_SVC_EKS 

Check Encryption key size for service Access Mask.

PERM_ACCESS_MASK_SVC_HIDE 

Hide/Show service Access Mask.

anonymous enum

Attribute & Service access rights.

Enumerator
PERM_RIGHT_DISABLE 

Disable access.

PERM_RIGHT_ENABLE 

Enable access.

PERM_RIGHT_UNAUTH 

Access Requires Unauthenticated link.

PERM_RIGHT_AUTH 

Access Requires Authenticated link.

PERM_RIGHT_AUTHZ 

Access Requires authorization.

anonymous enum

Attribute & Service access rights mask.

Enumerator
PERM_RIGHT_MASK_DISABLE 

Disable access mask.

PERM_RIGHT_MASK_ENABLE 

Enable access mask.

PERM_RIGHT_MASK_UNAUTH 

Access Requires Unauthenticated lin kmask.

PERM_RIGHT_MASK_AUTH 

Access Requires Authenticated link mask.

PERM_RIGHT_MASK_AUTHZ 

Access Requires authorization mask.

anonymous enum

Tasks types.

Enumerator
TASK_NONE 
TASK_LM 
TASK_LC 
TASK_LB 
TASK_LD 
TASK_LLM 
TASK_LLC 
TASK_LLD 
TASK_HCI 
TASK_HCIH 
TASK_DBG 
TASK_L2CM 
TASK_L2CC 
TASK_SMPM 
TASK_SMPC 
TASK_ATTM 
TASK_ATTC 
TASK_ATTS 
TASK_GATTM 
TASK_GATTC 
TASK_GAPM 
TASK_GAPC 
TASK_PROXM 
TASK_PROXR 
TASK_FINDL 
TASK_FINDT 
TASK_HTPC 
TASK_HTPT 
TASK_ACCEL 
TASK_BLPS 
TASK_BLPC 
TASK_HRPS 
TASK_HRPC 
TASK_TIPS 
TASK_TIPC 
TASK_DISS 
TASK_DISC 
TASK_SCPPS 
TASK_SCPPC 
TASK_BASS 
TASK_BASC 
TASK_HOGPD 
TASK_HOGPBH 
TASK_HOGPRH 
TASK_GLPS 
TASK_GLPC 
TASK_NBPS 
TASK_NBPC 
TASK_RSCPS 
TASK_RSCPC 
TASK_CSCPS 
TASK_CSCPC 
TASK_ANPS 
TASK_ANPC 
TASK_PASPS 
TASK_PASPC 
TASK_CPPS 
TASK_CPPC 
TASK_DISPLAY 
TASK_APP 
TASK_LANS 
TASK_LANC 
TASK_WIFIPROV 
TASK_GTL 
TASK_MAX 

Advertising filter policy.

Enumerator
ADV_ALLOW_SCAN_ANY_CON_ANY 

Allow both scan and connection requests from anyone.

ADV_ALLOW_SCAN_WLST_CON_ANY 

Allow both scan req from White List devices only and connection req from anyone.

ADV_ALLOW_SCAN_ANY_CON_WLST 

Allow both scan req from anyone and connection req from White List devices only.

ADV_ALLOW_SCAN_WLST_CON_WLST 

Allow scan and connection requests from White List devices only.

ADV_ALLOW_SCAN_END 

Enumeration end value for advertising filter policy value check.