nrfxlib API 3.3.99
Loading...
Searching...
No Matches
nrf_scan.h File Reference
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  nrf_scan_context_t
 sCAN context structure. , More...
 
struct  nrf_scan_timing_t
 sCAN timing configuration structure. , More...
 
struct  nrf_scan_frame_t
 sCAN TX/RX frame structure. , More...
 
struct  nrf_scan_rx_filter_t
 sCAN RX filter structure. , More...
 
struct  nrf_scan_rx_mailbox_t
 sCAN RX mailbox structure. , More...
 
struct  nrf_scan_t
 sCAN driver instance structure. , More...
 
struct  nrf_scan_status_t
 sCAN status structure. , More...
 

Typedefs

typedef void(* nrf_scan_event_handler_t) (nrf_scan_event_type_t const *p_event, void *p_context)
 sCAN event handler function pointer
 

Enumerations

enum  nrf_scan_event_type_t { NRF_SCAN_EVT_TX_COMPLETE , NRF_SCAN_EVT_RX_COMPLETE , NRF_SCAN_EVT_ERROR , NRF_SCAN_EVT_STATE_CHANGED }
 sCAN event definitions More...
 
enum  nrf_scan_mode_type_t { NRF_SCAN_MODE_NORMAL = 0 , NRF_SCAN_MODE_LOOPBACK , NRF_SCAN_MODE_LISTENONLY , NRF_SCAN_MODE_ONESHOT }
 sCAN operation mode definitions More...
 
enum  nrf_scan_error_t {
  NRF_SCAN_SUCCESS = 0 , NRF_SCAN_ERROR_PROTOCOL , NRF_SCAN_ERROR_BIT_STUFFING_ERROR , NRF_SCAN_ERROR_BIT0_ERROR ,
  NRF_SCAN_ERROR_BIT1_ERROR , NRF_SCAN_ERROR_FORM_ERROR , NRF_SCAN_ERROR_ACK_ERROR , NRF_SCAN_ERROR_CRC_ERROR ,
  NRF_SCAN_ERROR_BUSY , NRF_SCAN_ERROR_UNSUPPORTED , NRF_SCAN_ERROR_INVALID_PARAM , NRF_SCAN_ERROR_INVALID_STATE
}
 sCAN error code definitions More...
 
enum  nrf_scan_state_t {
  NRF_SCAN_STATE_ERROR_ACTIVE = 0 , NRF_SCAN_STATE_ERROR_WARNING , NRF_SCAN_STATE_ERROR_PASSIVE , NRF_SCAN_STATE_BUS_OFF ,
  NRF_SCAN_STATE_STOPPED
}
 sCAN state definitions More...
 

Functions

nrf_scan_status_t nrf_scan_get_status (nrf_scan_t const *p_scan)
 Get sCAN state and errors.
 
nrf_scan_error_t nrf_scan_init (nrf_scan_t const *p_scan, nrf_scan_event_handler_t handler, void *p_context)
 Initialize the sCAN driver for a given instance.
 
void nrf_scan_uninit (nrf_scan_t const *p_scan)
 Uninitialize the sCAN driver instance.
 
nrf_scan_error_t nrf_scan_enable (nrf_scan_t const *p_scan)
 Explicitly power up and configure the controller.
 
nrf_scan_error_t nrf_scan_disable (nrf_scan_t const *p_scan)
 Explicitly power down the controller.
 
nrf_scan_error_t nrf_scan_timing (nrf_scan_t const *p_scan, nrf_scan_timing_t const *p_timing)
 Configure sCAN timing.
 
nrf_scan_error_t nrf_scan_mode (nrf_scan_t const *p_scan, nrf_scan_mode_type_t *p_mode)
 Configure sCAN mode.
 
nrf_scan_error_t nrf_scan_set_rx_filter (nrf_scan_t const *p_scan, nrf_scan_rx_filter_t const *p_rxfilter, uint8_t index)
 Configure a sCAN RX filter.
 
nrf_scan_error_t nrf_scan_disable_rx_filter (nrf_scan_t const *p_scan, uint8_t index)
 Disable a sCAN RX filter.
 
nrf_scan_error_t nrf_scan_enable_rx_filter (nrf_scan_t const *p_scan, uint8_t index)
 Enable a sCAN RX filter.
 
nrf_scan_error_t nrf_scan_unlock_rx_mailbox (nrf_scan_t const *p_scan, uint8_t index)
 Unlock sCAN RX mailbox[index].
 
nrf_scan_error_t nrf_scan_send (nrf_scan_t const *p_scan, nrf_scan_frame_t *p_tx_frame)
 sCAN send function.
 
nrf_scan_error_t nrf_scan_abort (nrf_scan_t const *p_scan)
 Abort any ongoing sCAN operation.
 
void nrf_scan_irq_handler (void)
 IRQ handler to be called from the sCAN interrupt vector.
 

Variables

nrf_scan_rx_mailbox_t m_scan_rx_mailbox []
 sCAN RX mailbox.