Microchip® Advanced Software Framework

simple_broadcaster_app.h File Reference

Simple Broadcaster Application declarations.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

#include <asf.h>
#include "platform.h"
#include "at_ble_api.h"
#include "profiles.h"
#include "console_serial.h"
#include "timer_hw.h"
#include "conf_extint.h"
#include "ble_utils.h"
#include "conf_serialdrv.h"
#include "ble_manager.h"

Macros

#define ADV_TYPE_LEN   (0x01)
 
#define ADV_TYPE_NONCONN_UNDIRECTED   AT_BLE_ADV_TYPE_NONCONN_UNDIRECTED
 
#define ADV_TYPE_SCANNABLE_UNDIRECTED   AT_BLE_ADV_TYPE_SCANNABLE_UNDIRECTED
 
#define APP_BROADCAST_ADV_TIMEOUT   (655)
 
#define APP_BROADCAST_FAST_ADV   (1600)
 
#define BRD_ADV_DATA_APPEARANCE_DATA   "\x80\x00"
 
#define BRD_ADV_DATA_APPEARANCE_LEN   (2)
 
#define BRD_ADV_DATA_MANUFACTURER_DATA   "\x00\x06\xd6\xb2\xf0\x05\xf0\xf8"
 
#define BRD_ADV_DATA_MANUFACTURER_LEN   (0x08)
 
#define BRD_ADV_DATA_NAME_DATA   "ATMEL-BROADCAST"
 
#define BRD_ADV_DATA_NAME_LEN   (0x0f)
 
#define BRD_ADV_DATA_UUID_DATA   "\x00\x18"
 
#define BRD_ADV_DATA_UUID_LEN   (2)
 
#define MAX_ADV_LEN   (28)
 
#define MAX_SCAN_LEN   MAX_ADV_LEN
 

Enumerations

enum  adv_data_type_t {
  ADV_DATA_TYPE_INCOMPLETE_SERVICE_UUID16 = 2,
  ADV_DATA_TYPE_COMPLETE_SERVICE_UUID16,
  ADV_DATA_TYPE_INCOMPLETE_SERVICE_UUID32,
  ADV_DATA_TYPE_COMPLETE_SERVICE_UUID32,
  ADV_DATA_TYPE_INCOMPLETE_SERVICE_UUID128,
  ADV_DATA_TYPE_COMPLETE_SERVICE_UUID128,
  ADV_DATA_TYPE_SHORTENED_LOCAL_NAME,
  ADV_DATA_TYPE_COMPLETE_LOCAL_NAME,
  ADV_DATA_TYPE_APPEARANCE = 0x019,
  ADV_DATA_TYPE_MANUFACTURER_DATA = 0xff
}
 Advertisement data types. More...
 
enum  data_type_t {
  ADVERTISEMENT_DATA = 0,
  SCAN_RESP_DATA
}
 data type, configurable by app to specify which part of the data(scan response or advertisement) should contain the data given by app. More...
 
enum  status_t {
  STATUS_SUCCESS = 0,
  STATUS_MAX_LENGTH_REACHED,
  STATUS_INVALID_PARAM,
  STATUS_OPERATION_NOT_SUPPORTED,
  STATUS_FAILED
}
 Return status to app from the APIs provided. More...
 

#define ADV_TYPE_LEN   (0x01)
#define ADV_TYPE_NONCONN_UNDIRECTED   AT_BLE_ADV_TYPE_NONCONN_UNDIRECTED
#define ADV_TYPE_SCANNABLE_UNDIRECTED   AT_BLE_ADV_TYPE_SCANNABLE_UNDIRECTED
#define APP_BROADCAST_ADV_TIMEOUT   (655)

Referenced by brd_start_broadcast().

#define APP_BROADCAST_FAST_ADV   (1600)

Referenced by brd_start_broadcast().

#define BRD_ADV_DATA_APPEARANCE_DATA   "\x80\x00"

Referenced by brd_adv_init().

#define BRD_ADV_DATA_APPEARANCE_LEN   (2)

Referenced by brd_adv_init().

#define BRD_ADV_DATA_MANUFACTURER_DATA   "\x00\x06\xd6\xb2\xf0\x05\xf0\xf8"

Referenced by brd_adv_init().

#define BRD_ADV_DATA_MANUFACTURER_LEN   (0x08)

Referenced by brd_adv_init().

#define BRD_ADV_DATA_NAME_DATA   "ATMEL-BROADCAST"
#define BRD_ADV_DATA_NAME_LEN   (0x0f)
#define BRD_ADV_DATA_UUID_DATA   "\x00\x18"

Referenced by brd_adv_init().

#define BRD_ADV_DATA_UUID_LEN   (2)

Referenced by brd_adv_init().

Advertisement data types.

Enumerator
ADV_DATA_TYPE_INCOMPLETE_SERVICE_UUID16 
ADV_DATA_TYPE_COMPLETE_SERVICE_UUID16 
ADV_DATA_TYPE_INCOMPLETE_SERVICE_UUID32 
ADV_DATA_TYPE_COMPLETE_SERVICE_UUID32 
ADV_DATA_TYPE_INCOMPLETE_SERVICE_UUID128 
ADV_DATA_TYPE_COMPLETE_SERVICE_UUID128 
ADV_DATA_TYPE_SHORTENED_LOCAL_NAME 
ADV_DATA_TYPE_COMPLETE_LOCAL_NAME 
ADV_DATA_TYPE_APPEARANCE 
ADV_DATA_TYPE_MANUFACTURER_DATA 

data type, configurable by app to specify which part of the data(scan response or advertisement) should contain the data given by app.

Enumerator
ADVERTISEMENT_DATA 
SCAN_RESP_DATA 
enum status_t

Return status to app from the APIs provided.

Enumerator
STATUS_SUCCESS 
STATUS_MAX_LENGTH_REACHED 
STATUS_INVALID_PARAM 
STATUS_OPERATION_NOT_SUPPORTED 
STATUS_FAILED