#include <stdint.h>
#include <string.h>
#include "boards.h"
#include "app_util_platform.h"
#include "app_print.h"
#include "debug.h"
#include "ptu.h"
#include "app_timer.h"
#include "softdevice_handler.h"
#include "advertiser_beacon.h"
#include "ptu_config.h"
#include "nrf_nvic.h"
#include "common_hal_buttons.h"
Go to the source code of this file.
#define CENTRAL_LINK_COUNT 7 |
Number of central links used by the application. When changing this number remember to adjust the RAM settings
Definition at line 34 of file main.c.
#define PERIPHERAL_LINK_COUNT 1 |
Number of peripheral links used by the application. When changing this number remember to adjust the RAM settings
Definition at line 35 of file main.c.
#define DEAD_BEEF 0xDEADBEEF |
Error code to signify a SoftDevice assert.
Definition at line 38 of file main.c.
#define NO_DEV_CONNECTED_LED_PATTERN 0x00 |
Status LEDs when no devices connected
Definition at line 44 of file main.c.
#define POWER_TRANSFER_LED_PATTERN 0x01 |
Status LEDs during power transfer state
Definition at line 45 of file main.c.
#define FAULT_LED_PATTERN 0x02 |
Status LEDs when in any fault state
Definition at line 46 of file main.c.
Value:0xff, 0xfe, 0x2d, 0x12, 0x1e, 0x4b, 0x0f, 0xa4,\
0x99, 0x4e, 0xce, 0xb5, 0x31, 0xf4, 0x05, 0x45
The Beacon's UUID
Definition at line 49 of file main.c.
#define BEACON_ADV_INTERVAL 400 |
The Beacon's advertising interval, in milliseconds
Definition at line 51 of file main.c.
#define BEACON_MAJOR 0x1234 |
The Beacon's Major
Definition at line 52 of file main.c.
#define BEACON_MINOR 0x5678 |
The Beacon's Minor
Definition at line 53 of file main.c.
The Beacon's measured RSSI at 1 meter distance in dBm.
Definition at line 54 of file main.c.
#define APP_COMPANY_IDENTIFIER 0x0059 |
Company identifier for Nordic Semiconductor ASA. as per www.bluetooth.org.
Definition at line 56 of file main.c.
static void m_sys_evt_dispatch |
( |
uint32_t |
sys_evt | ) |
|
|
static |
Dispatch system event, triggered by softdevice.
- Parameters
-
sys_evt | The event to handle |
Definition at line 83 of file main.c.
static void m_ble_evt_dispatch |
( |
ble_evt_t * |
p_evt | ) |
|
|
static |
Dispatch BLE event, triggered by softdevice.
- Parameters
-
[in] | p_evt | The event to handle |
Definition at line 91 of file main.c.
void ptu_on_ble_evt(ble_evt_t *p_ble_evt)
Dispatches a BLE stack event to PTU.
Beacon initializer parameters.
Definition at line 58 of file main.c.