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

BLE Connectivity application. More...

Macros

#define APP_TIMER_PRESCALER   0
 
#define APP_TIMER_MAX_TIMERS   1
 
#define APP_TIMER_OP_QUEUE_SIZE   1
 
#define APP_GPIOTE_MAX_USERS   1
 
#define SCHED_QUEUE_SIZE   10u
 
#define SCHED_MAX_EVENT_DATA_SIZE
 
#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 handling an error, 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 power_manage (void)
 Function for managing power.
 
void transport_evt_handle (hci_transport_evt_t event)
 Function for scheduling a transport layer event. More...
 
static void leds_init (void)
 Function for initializing the LEDs. More...
 
void transport_tx_complete_handle (hci_transport_tx_done_result_t result)
 Callback function for transport layer to indicate when it is finished transmitting the bytes from the TX buffer. More...
 
int main (void)
 Function for application main entry.
 

Detailed Description

Macro Definition Documentation

#define APP_TIMER_PRESCALER   0

Value of the RTC1 PRESCALER register.

#define APP_TIMER_MAX_TIMERS   1

Maximum number of simultaneously created timers.

#define APP_TIMER_OP_QUEUE_SIZE   1

Size of timer operation queues.

#define APP_GPIOTE_MAX_USERS   1

Maximum number of users of the GPIOTE handler. In this example the GPIOTE user is: UART Module used by HCI Transport layer.

#define SCHED_QUEUE_SIZE   10u

Maximum number of events in the scheduler queue.

#define SCHED_MAX_EVENT_DATA_SIZE
Value:
MAX(sizeof(app_timer_event_t),\

Maximum size of scheduler events.

#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 
)

Function for error handling, which is called when an error has occurred.

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 if the ASSERT macro fails.

Parameters
[in]line_numLine number of the failing ASSERT call.
[in]p_file_nameFile name of the failing ASSERT call.
void transport_evt_handle ( hci_transport_evt_t  event)

Transfer the given event to the scheduler to be processed in thread mode.

Parameters
[in]eventRPC transport layer event.
static void leds_init ( void  )
static

Initializes all LEDs used by this application.

void transport_tx_complete_handle ( hci_transport_tx_done_result_t  result)
Parameters
[in]resultTX done event result code.