思澈科技软件开发工具包  2.20

Data Structures

struct  sibles_adv_connect_mode_config_t
 Configuration of connectable advertising. More...
 
struct  sibles_adv_broadcast_mode_config_t
 Configuration of non-connectable advertising. More...
 
struct  sibles_adv_directed_connect_mode_config_t
 Configuration of directed connectable advertising. More...
 
struct  sibles_adv_extended_mode_config_t
 
union  sibles_adv_mode_config_t
 Configuration of different advertising mode (. More...
 
struct  sibles_adv_config_t
 
struct  sibles_adv_type_name_t
 The structure of device local name in advertising data. More...
 
struct  sibles_adv_uuid_t
 The structure of service uuid. More...
 
struct  sibles_adv_type_srv_uuid_t
 The structure of service uuid list in advertising data. More...
 
struct  sibles_adv_type_srv_data_t
 The structure of service data in advertising data. More...
 
struct  sibles_adv_type_conn_interval_t
 The structure of perferred slave conneciton interval in advertising data. More...
 
struct  sibles_adv_type_manufacturer_data_t
 The structure of manufacturer specific dat in advertising data. More...
 
struct  sibles_adv_type_customize_t
 The structure of customized advertising data. More...
 
struct  sibles_adv_data_t
 The structure of advertising data filed defined in Supplement to the Bluetooth Core Spec. More...
 
struct  sibles_advertising_para_t
 The structure of advertising configure. More...
 
struct  sibles_gap_adv_data_t
 
struct  sibles_advertising_context_t
 The structure of advertising configure. More...
 
struct  sibles_adv_evt_startted_t
 The structure of SIBLES_ADV_EVT_ADV_STARTED. More...
 
struct  sibles_adv_evt_stopped_t
 The structure of SIBLES_ADV_EVT_ADV_STOPPED. More...
 

Macros

#define SIBLES_ADVERTISING_CONTEXT_DECLAR(context)
 Declar sibles advertising context. More...
 

Typedefs

typedef uint8_t(* sibles_advertising_event) (uint8_t event, void *context, void *data)
 The structure of advertising configure.
 
typedef ble_gap_addr_t sibles_adv_evt_request_peer_addr_t
 The structure of SIBLES_ADV_EVT_REQUEST_PEER_DEVICE_ADDR.
 

Enumerations

enum  sibles_adv_mode_t {
  SIBLES_ADV_CONNECT_MODE,
  SIBLES_ADV_BROADCAST_MODE,
  SIBLES_ADV_DIRECTED_CONNECT_MODE
}
 Advertising mode. More...
 
enum  sibles_adv_running_mode_t {
  SIBLES_ADV_MODE_FAST_CONNECT,
  SIBLES_ADV_MODE_BACKGROUD_CONNECT,
  SIBLES_ADV_MODE_BROADCAST,
  SIBLES_ADV_MODE_HIGH_DUTY_DIRECTED,
  SIBLES_ADV_MODE_LOW_DUTY_DIRECTED
}
 Advertising running mode. More...
 
enum  sibles_adv_err_t {
  SIBLES_ADV_NO_ERR,
  SIBLES_ADV_NOT_ALLOWED,
  SIBLES_ADV_PARAM_INVALID,
  SIBLES_ADV_DATA_LENGTH_EXCEED
}
 Advertising error code. More...
 
enum  sibles_adv_event_t {
  SIBLES_ADV_EVT_ADV_STARTED,
  SIBLES_ADV_EVT_ADV_STOPPED,
  SIBLES_ADV_EVT_REQUEST_PEER_DEVICE_ADDR,
  SIBLES_ADV_EVT_REQUEST_SET_WHITE_LIST
}
 Advertising event. More...
 

Functions

uint8_t sibles_advertising_init (sibles_advertising_context_t *context, sibles_advertising_para_t *para)
 Advertising configuration init. More...
 
uint8_t sibles_advertising_start (sibles_advertising_context_t *context)
 Start advertising. More...
 
uint8_t sibles_advertising_stop (sibles_advertising_context_t *context)
 Stop advertising. More...
 
uint8_t sibles_advertising_reconfig (sibles_advertising_context_t *context, sibles_adv_config_t *config)
 Reconfigure parameter of advertising, only could be called init completed but advertising not started. More...
 
uint8_t sibles_advertising_delete (sibles_advertising_context_t *context)
 
uint8_t sibles_advertising_update_adv_and_scan_rsp_data (sibles_advertising_context_t *context, sibles_adv_data_t *adv_data, sibles_adv_data_t *rsp_data)
 Update advertising and scan response data, only could be called init completed and not starting or stopping advertsing.. More...
 
int sibles_advertising_evt_handler (uint16_t event_id, uint8_t *data, uint16_t len, uint32_t context)
 

Detailed Description

Macro Definition Documentation

◆ SIBLES_ADVERTISING_CONTEXT_DECLAR

#define SIBLES_ADVERTISING_CONTEXT_DECLAR (   context)
Value:
sibles_advertising_context_t * context = &_##context; \
static int sibles_advertising_evt_handler##_##context(uint16_t event_id, uint8_t *data, uint16_t len, uint32_t context) \
{ \
return sibles_advertising_evt_handler(event_id, data, len, context); \
} \
BLE_EVENT_REGISTER(sibles_advertising_evt_handler##_##context, &_##context);

Declar sibles advertising context.

Enumeration Type Documentation

◆ sibles_adv_err_t

Advertising error code.

Enumerator
SIBLES_ADV_NO_ERR 

No error.

SIBLES_ADV_NOT_ALLOWED 

Action is not allowed due to state wrongly.

SIBLES_ADV_PARAM_INVALID 

Parameter error.

SIBLES_ADV_DATA_LENGTH_EXCEED 

Data length exceed maximum value.

◆ sibles_adv_event_t

Advertising event.

Enumerator
SIBLES_ADV_EVT_ADV_STARTED 

Advertising started.

SIBLES_ADV_EVT_ADV_STOPPED 

Advertising stopped.

SIBLES_ADV_EVT_REQUEST_PEER_DEVICE_ADDR 

Request user provide peer device addr for directed advertising.

SIBLES_ADV_EVT_REQUEST_SET_WHITE_LIST 

Request user set while list for advertising filter policy. No data as input parameter

◆ sibles_adv_mode_t

Advertising mode.

Enumerator
SIBLES_ADV_CONNECT_MODE 

Connected mode use connectable and scannable undirected advertising to expect a peer device to connect .

SIBLES_ADV_BROADCAST_MODE 

Broadcast mode use non-connectable and non-scannable undirected advertising to broadcast data.

SIBLES_ADV_DIRECTED_CONNECT_MODE 

Directed Connect mode use connectable directed advertising to expect the directed peer device to connect.

◆ sibles_adv_running_mode_t

Advertising running mode.

Enumerator
SIBLES_ADV_MODE_FAST_CONNECT 

Normal connectable advertising in SIBLES_ADV_CONNECT_MODE.

SIBLES_ADV_MODE_BACKGROUD_CONNECT 

Bakcground connectable advertising in SIBLES_ADV_CONNECT_MODE.

SIBLES_ADV_MODE_BROADCAST 

Non- connectable advertising in SIBLES_ADV_BROADCAST_MODE.

SIBLES_ADV_MODE_HIGH_DUTY_DIRECTED 

High duty cycle directed advertising in SIBLES_ADV_DIRECTED_CONNECT_MODE.

SIBLES_ADV_MODE_LOW_DUTY_DIRECTED 

Low duty cycle advertising in SIBLES_ADV_DIRECTED_CONNECT_MODE.

Function Documentation

◆ sibles_advertising_init()

uint8_t sibles_advertising_init ( sibles_advertising_context_t context,
sibles_advertising_para_t para 
)

Advertising configuration init.

Parameters
[in]contextservice context defined by SIBLES_ADVERTISING_CONTEXT_DECLAR.
[in]paraconfigure advertising behavior.
Return values
resultresult(
See also
enum sibles_adv_err_t).

◆ sibles_advertising_reconfig()

uint8_t sibles_advertising_reconfig ( sibles_advertising_context_t context,
sibles_adv_config_t config 
)

Reconfigure parameter of advertising, only could be called init completed but advertising not started.

Parameters
[in]contextservice context defined by SIBLES_ADVERTISING_CONTEXT_DECLAR.
[in]configto cofingure adveritsing parameters.
Return values
resultresult(
See also
sibles_adv_err_t).

◆ sibles_advertising_start()

uint8_t sibles_advertising_start ( sibles_advertising_context_t context)

Start advertising.

Parameters
[in]contextservice context defined by SIBLES_ADVERTISING_CONTEXT_DECLAR.
Return values
resultresult(
See also
enum sibles_adv_err_t).

◆ sibles_advertising_stop()

uint8_t sibles_advertising_stop ( sibles_advertising_context_t context)

Stop advertising.

Parameters
[in]contextservice context defined by SIBLES_ADVERTISING_CONTEXT_DECLAR.
Return values
resultresult(
See also
sibles_adv_err_t).

◆ sibles_advertising_update_adv_and_scan_rsp_data()

uint8_t sibles_advertising_update_adv_and_scan_rsp_data ( sibles_advertising_context_t context,
sibles_adv_data_t adv_data,
sibles_adv_data_t rsp_data 
)

Update advertising and scan response data, only could be called init completed and not starting or stopping advertsing..

Parameters
[in]contextservice context defined by SIBLES_ADVERTISING_CONTEXT_DECLAR.
[in]adv_dataadvertising data.
[in]rsp_datascan response data.
Return values
resultresult(
See also
sibles_adv_err_t).
len
uint16_t len
Definition: bf0_ble_ancs.h:226
data
uint8_t data[]
Definition: bf0_ble_ancs.h:227
sibles_advertising_context_t
The structure of advertising configure.
Definition: bf0_sibles_advertising.h:323