nRF5 SDK v17.1.0
Modules | Macros | Typedefs | Functions
SPIS driver - legacy layer

Layer providing compatibility with the former API. More...

Modules

 SPIS peripheral driver - legacy layer configuration
 

Macros

#define NRF_DRV_SPIS_INSTANCE   NRFX_SPIS_INSTANCE
 Macro for forwarding the new implementation.
 
#define NRF_DRV_SPIS_DEFAULT_CONFIG   NRFX_SPIS_DEFAULT_CONFIG
 Macro for forwarding the new implementation.
 
#define NRF_DRV_SPIS_DEFAULT_CSN_PULLUP   NRFX_SPIS_DEFAULT_CSN_PULLUP
 Macro for forwarding the new implementation.
 
#define NRF_DRV_SPIS_DEFAULT_MISO_DRIVE   NRFX_SPIS_DEFAULT_MISO_DRIVE
 Macro for forwarding the new implementation.
 
#define NRF_DRV_SPIS_PIN_NOT_USED   NRFX_SPIS_PIN_NOT_USED
 Macro for forwarding the new implementation.
 
#define NRF_DRV_SPIS_BIT_ORDER_LSB_FIRST   NRF_SPIS_BIT_ORDER_LSB_FIRST
 Macro for providing API backward compatibility.
 
#define NRF_DRV_SPIS_BIT_ORDER_MSB_FIRST   NRF_SPIS_BIT_ORDER_MSB_FIRST
 Macro for providing API backward compatibility.
 
#define nrf_drv_spis_endian_t   nrf_spis_bit_order_t
 Macro for providing API backward compatibility.
 
#define NRF_DRV_SPIS_MODE_0   NRF_SPIS_MODE_0
 Macro for providing API backward compatibility.
 
#define NRF_DRV_SPIS_MODE_1   NRF_SPIS_MODE_1
 Macro for providing API backward compatibility.
 
#define NRF_DRV_SPIS_MODE_2   NRF_SPIS_MODE_2
 Macro for providing API backward compatibility.
 
#define NRF_DRV_SPIS_MODE_3   NRF_SPIS_MODE_3
 Macro for providing API backward compatibility.
 
#define nrf_drv_spis_mode_t   nrf_spis_mode_t
 Macro for providing API backward compatibility.
 
#define NRF_DRV_SPIS_BUFFERS_SET_DONE   NRFX_SPIS_BUFFERS_SET_DONE
 Macro for forwarding the new implementation.
 
#define NRF_DRV_SPIS_XFER_DONE   NRFX_SPIS_XFER_DONE
 Macro for forwarding the new implementation.
 
#define NRF_DRV_SPIS_EVT_TYPE_MAX   NRFX_SPIS_EVT_TYPE_MAX
 Macro for forwarding the new implementation.
 
#define nrf_drv_spis_event_type_t   nrfx_spis_evt_type_t
 Macro for forwarding the new implementation.
 
#define nrf_drv_spis_uninit   nrfx_spis_uninit
 Macro for forwarding the new implementation.
 
#define nrf_drv_spis_buffers_set   nrfx_spis_buffers_set
 Macro for forwarding the new implementation.
 

Typedefs

typedef nrfx_spis_t nrf_drv_spis_t
 Type definition for forwarding the new implementation.
 
typedef nrfx_spis_config_t nrf_drv_spis_config_t
 Type definition for forwarding the new implementation.
 
typedef nrfx_spis_evt_t nrf_drv_spis_event_t
 Type definition for forwarding the new implementation.
 
typedef void(* nrf_drv_spis_event_handler_t )(nrf_drv_spis_event_t event)
 SPI slave event callback function type. More...
 

Functions

ret_code_t nrf_drv_spis_init (nrf_drv_spis_t const *const p_instance, nrf_drv_spis_config_t const *p_config, nrf_drv_spis_event_handler_t event_handler)
 Function for initializing the SPI slave driver instance. More...
 

Detailed Description

Layer providing compatibility with the former API.

Typedef Documentation

typedef void(* nrf_drv_spis_event_handler_t)(nrf_drv_spis_event_t event)

SPI slave event callback function type.

Parameters
[in]eventSPI slave driver event.

Function Documentation

ret_code_t nrf_drv_spis_init ( nrf_drv_spis_t const *const  p_instance,
nrf_drv_spis_config_t const *  p_config,
nrf_drv_spis_event_handler_t  event_handler 
)

Function for initializing the SPI slave driver instance.

Note
When the nRF52 Anomaly 109 workaround for SPIS is enabled, this function initializes the GPIOTE driver as well, and uses one of GPIOTE channels to detect falling edges on CSN pin.
Parameters
[in]p_instancePointer to the driver instance structure.
[in]p_configPointer to the structure with the initial configuration. If NULL, the default configuration will be used.
[in]event_handlerFunction to be called by the SPI slave driver upon event.
Return values
NRF_SUCCESSIf the initialization was successful.
NRF_ERROR_INVALID_PARAMIf an invalid parameter is supplied.
NRFX_ERROR_INVALID_STATEIf the instance is already initialized.
NRF_ERROR_BUSYIf some other peripheral with the same instance ID is already in use. This is possible only if PERIPHERAL_RESOURCE_SHARING_ENABLED is set to a value other than zero.
NRF_ERROR_INTERNALGPIOTE channel for detecting falling edges on CSN pin cannot be initialized. Possible only when using nRF52 Anomaly 109 workaround.

Documentation feedback | Developer Zone | Subscribe | Updated