nRF5 SDK v17.1.0
Macros | Typedefs | Functions
Events handlers in the Connectivity Chip

Events handlers used to process high level events in the connectivity application. More...

Macros

#define SER_CONN_SCHED_QUEUE_SIZE   16u
 
#define STACK_EVENT_MAX_SIZE   MAX(NRF_SDH_BLE_EVT_BUF_SIZE, NRF_SDH_ANT_EVT_BUF_SIZE)
 
#define SER_CONN_SCHED_MAX_EVENT_DATA_SIZE
 

Typedefs

typedef void(* ser_conn_on_no_mem_t )(void)
 Prototype for function called when there is no free TX buffer and system is blocked.
 

Functions

void ser_conn_on_no_mem_handler_set (ser_conn_on_no_mem_t handler)
 A function for setting handler which should be called when serialization is blocked waiting for TX buffer. More...
 
void ser_conn_on_no_mem_handler (void)
 A function called when TX buffer allocation failed. Serialization is always allocating TX buffer in main context expecting that it will be freed from interrupt context.
 
void ser_conn_hal_transport_event_handle (ser_hal_transport_evt_t event)
 A function for processing the HAL Transport layer events. More...
 
uint32_t ser_conn_rx_process (void)
 A function to call the function to process a packet when it is fully received. More...
 
void ser_conn_reset (void)
 Reset serialization state.
 
void ser_conn_ble_event_handle (ble_evt_t const *p_ble_evt, void *p_context)
 A function for processing BLE SoftDevice events. More...
 
void ser_conn_ant_event_handle (ant_evt_t *p_ant_evt, void *p_context)
 A function for processing ANT SoftDevice events. More...
 

Detailed Description

Events handlers used to process high level events in the connectivity application.

This file contains functions: processing the HAL Transport layer events, processing BLE SoftDevice events, starting processing received packets.

Macro Definition Documentation

#define SER_CONN_SCHED_MAX_EVENT_DATA_SIZE
Value:
sizeof(uint32_t)), \
sizeof(uint32_t))) * \
sizeof(uint32_t))
#define SER_CONN_SCHED_QUEUE_SIZE   16u

Maximum number of events in the application scheduler queue.

#define STACK_EVENT_MAX_SIZE   MAX(NRF_SDH_BLE_EVT_BUF_SIZE, NRF_SDH_ANT_EVT_BUF_SIZE)

Maximum size of events data in the application scheduler queue aligned to 32 bits - this is size of the buffers of the SoftDevice handler, which stores events pulled from the SoftDevice.

Function Documentation

void ser_conn_ant_event_handle ( ant_evt_t p_ant_evt,
void *  p_context 
)

A function for processing ANT SoftDevice events.

ANT events are put into application scheduler queue to be processed at a later time.

Parameters
[in]p_ant_evtA pointer to a BLE event.
[in]p_contextA parameter to the handler. Not used.
void ser_conn_ble_event_handle ( ble_evt_t const *  p_ble_evt,
void *  p_context 
)

A function for processing BLE SoftDevice events.

BLE events are put into application scheduler queue to be processed at a later time.

Parameters
[in]p_ble_evtA pointer to a BLE event.
[in]p_contextA parameter to the handler. Not used.
void ser_conn_hal_transport_event_handle ( ser_hal_transport_evt_t  event)

A function for processing the HAL Transport layer events.

Parameters
[in]eventHAL Transport layer event.
void ser_conn_on_no_mem_handler_set ( ser_conn_on_no_mem_t  handler)

A function for setting handler which should be called when serialization is blocked waiting for TX buffer.

Parameters
handlerHandler to be called whenever serialization failed to allocate TX buffer
uint32_t ser_conn_rx_process ( void  )

A function to call the function to process a packet when it is fully received.

Return values
NRF_SUCCESSOperation success.
NRF_ERROR_NULLOperation failure. NULL pointer supplied.
NRF_ERROR_INTERNALOperation failure. Internal error ocurred.

Documentation feedback | Developer Zone | Subscribe | Updated