TI BLE-Stack for Bluetooth 4.2 API Documentation  3.01.00.07
Data Structures | Macros | Typedefs | Functions
ugap.h File Reference

Detailed Description

Micro BLE GAP API.

This file contains the interface to the Micro GAP Layer.

Go to the source code of this file.

Data Structures

struct  ugapBcastCBs_t
 Set of Broadcaster callbacks - must be setup by the application. More...
 
struct  ugapMonitorCBs_t
 Set of Observer callbacks - must be setup by the application. More...
 

Macros

#define UGAP_BCAST_STATE_ADVERTISING   3
 Advertising.
 
#define UGAP_BCAST_STATE_IDLE   2
 Advertising or Waiting stopped.
 
#define UGAP_BCAST_STATE_INITIALIZED   1
 Initialized. Waiting for start request.
 
#define UGAP_BCAST_STATE_INVALID   0
 Invalid state. Not even initialized.
 
#define UGAP_BCAST_STATE_SUSPENDED   5
 Advertising or Waiting is suspended.
 
#define UGAP_BCAST_STATE_WAITING   4
 Advertising paused during duty off period.
 
#define UGAP_DUTY_TIME_UNIT   100L
 Duty Control Time Unit. More...
 
#define UGAP_MONITOR_EVT_MONITOR_COMPLETE   9
 Monitor completed.
 
#define UGAP_MONITOR_EVT_MONITOR_INDICATION   8
 Monitor indication.
 
#define UGAP_MONITOR_EVT_STATE_CHANGE   7
 Monitor's state has changed.
 
#define UGAP_MONITOR_STATE_IDLE   2
 Monitoring stopped.
 
#define UGAP_MONITOR_STATE_INITIALIZED   1
 Initialized. Waiting for start request.
 
#define UGAP_MONITOR_STATE_INVALID   0
 Invalid state. Not even initialized.
 
#define UGAP_MONITOR_STATE_MONITORING   3
 Monitor scanning.
 
#define UGB_EVT_ADV_POSTPROCESS   3
 Adv has just been done. Do post processing if necessary.
 
#define UGB_EVT_ADV_PREPARE   2
 About to issue the next adv. Prepare adv payload.
 
#define UGB_EVT_STATE_CHANGE   1
 Broadcaster's state has changed.
 

Typedefs

typedef void(* ugapBcastAdvDoneCb_t) (bStatus_t status)
 Callback of when an Advertising Event has just been done. More...
 
typedef void(* ugapBcastAdvPrepareCb_t) (void)
 Callback of when the next Advertising Event is about to start. More...
 
typedef uint8 ugapBcastState_t
 Broadcaster state.
 
typedef void(* ugapBcastStateChangeCb_t) (ugapBcastState_t state)
 Callback of when the Broadcaster's state changes. More...
 
typedef void(* ugapMonitorCompleteCb_t) (bStatus_t status, uint8_t sessionId)
 Callback of when a scan monitoring has just been done. More...
 
typedef void(* ugapMonitorIndicationCb_t) (bStatus_t status, uint8_t sessionId, uint8_t len, uint8_t *pPayload)
 Callback of when a packet is received. More...
 
typedef uint8 ugapMonitorState_t
 Monitor state.
 
typedef void(* ugapMonitorStateChangeCb_t) (ugapMonitorState_t state)
 Callback of when the Monitor's state changes. More...
 

Functions

bStatus_t ugap_bcastInit (ugapBcastCBs_t *pCBs)
 Initialize Micro Broadcaster. More...
 
bStatus_t ugap_bcastSetDuty (uint16 dutyOnTime, uint16 dutyOffTime)
 Set Broadcaster Duty On/Off time. More...
 
bStatus_t ugap_bcastStart (uint16 numAdvEvent)
 Start Broadcaster. Proceed the state from either Initialized or IDLE to Advertising. More...
 
bStatus_t ugap_bcastStop (void)
 Stop Broadcaster. Proceed the state from either Advertising or Waiting to IDLE. More...
 
bStatus_t ugap_monitorInit (ugapMonitorCBs_t *pCBs)
 Initialize Micro Monitor. More...
 
bStatus_t ugap_monitorRequest (uint8_t channel, uint32_t accessAddr, uint32_t startTime, uint16_t duration)
 uGAP monitor request More...
 
bStatus_t ugap_monitorStart (void)
 Start Monitor scanning. Proceed the state from either Initialized or Idle to Monitoring. More...
 
bStatus_t ugap_monitorStop (void)
 Stop Monitor scanning. Proceed the state from Monitoring to Idle. More...
 
Copyright 2017, Texas Instruments Incorporated