nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Multiprotocol Sample Application main file. More...

Macros

#define DEAD_BEEF   0xDEADBEEF
 

Functions

void app_error_handler (uint32_t error_code, uint32_t line_num, const uint8_t *p_file_name)
 Function for error handling, which is called when an error has occurred. More...
 
void assert_nrf_callback (uint16_t line_num, const uint8_t *p_file_name)
 Callback function for asserts in the SoftDevice. More...
 
static void timers_init (void)
 Function for the Timer module initialization.
 
static void gpiote_init (void)
 Function for initializing GPIOTE module.
 
static void power_manage (void)
 Function for the Power Management.
 
int main (void)
 Function for application main entry.
 

Variables

volatile radio_mode_t running_mode = BLE
 External reference to the current radio mode.
 

Detailed Description

This file contains the source code for a sample application using both Nordic Gazell proprietary radio protocol and Bluetooth Low Energy radio protocol. In Bluetooth mode, it behave as a Heart Rate sensor, in Gazell mode it behaves as a 'device'.

Macro Definition Documentation

#define DEAD_BEEF   0xDEADBEEF

Value used as error code on stack dump, can be used to identify stack location on stack unwind.

Function Documentation

void app_error_handler ( uint32_t  error_code,
uint32_t  line_num,
const uint8_t *  p_file_name 
)
Warning
This handler is an example only and does not fit a final product. You need to analyze how your product is supposed to react in case of error.
Parameters
[in]error_codeError code supplied to the handler.
[in]line_numLine number where the handler is called.
[in]p_file_namePointer to the file name.
void assert_nrf_callback ( uint16_t  line_num,
const uint8_t *  p_file_name 
)

This function will be called in case of an assert in the SoftDevice.

Warning
This handler is an example only and does not fit a final product. You need to analyze how your product is supposed to react in case of Assert.
On assert from the SoftDevice, the system can only recover on reset.
Parameters
[in]line_numLine number of the failing ASSERT call.
[in]file_nameFile name of the failing ASSERT call.