123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- #ifndef BROADCASTER_H
- #define BROADCASTER_H
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #define GAPROLE_PROFILEROLE 0x300
- #define GAPROLE_BD_ADDR 0x301
- #define GAPROLE_ADVERT_ENABLED 0x302
- #define GAPROLE_ADVERT_OFF_TIME 0x303
- #define GAPROLE_ADVERT_DATA 0x304
- #define GAPROLE_SCAN_RSP_DATA 0x305
- #define GAPROLE_ADV_EVENT_TYPE 0x306
- #define GAPROLE_ADV_DIRECT_TYPE 0x307
- #define GAPROLE_ADV_DIRECT_ADDR 0x308
- #define GAPROLE_ADV_CHANNEL_MAP 0x309
- #define GAPROLE_ADV_FILTER_POLICY 0x30A
- typedef enum
- {
- GAPROLE_INIT = 0,
- GAPROLE_STARTED,
- GAPROLE_ADVERTISING,
- GAPROLE_WAITING,
- GAPROLE_ERROR
- } gaprole_States_t;
- typedef void (*gapRolesStateNotify_t)( gaprole_States_t newState );
- typedef void (*gapRolesRssiRead_t)( int8 newRSSI );
- typedef struct
- {
- gapRolesStateNotify_t pfnStateChange;
- gapRolesRssiRead_t pfnRssiRead;
- } gapRolesCBs_t;
-
- extern bStatus_t GAPRole_SetParameter( uint16 param, uint8 len, void *pValue );
-
- extern bStatus_t GAPRole_GetParameter( uint16 param, void *pValue );
- extern bStatus_t GAPRole_StartDevice( gapRolesCBs_t *pAppCallbacks );
-
-
- extern void GAPRole_Init( uint8 task_id );
- extern uint16 GAPRole_ProcessEvent( uint8 task_id, uint16 events );
- #ifdef __cplusplus
- }
- #endif
- #endif
|