123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- #ifndef NRF_DRV_SPIS_H__
- #define NRF_DRV_SPIS_H__
- #include <nrfx_spis.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef nrfx_spis_t nrf_drv_spis_t;
- typedef nrfx_spis_config_t nrf_drv_spis_config_t;
- typedef nrfx_spis_evt_t nrf_drv_spis_event_t;
- #define NRF_DRV_SPIS_INSTANCE NRFX_SPIS_INSTANCE
- #define NRF_DRV_SPIS_DEFAULT_CONFIG NRFX_SPIS_DEFAULT_CONFIG
- #define NRF_DRV_SPIS_DEFAULT_CSN_PULLUP NRFX_SPIS_DEFAULT_CSN_PULLUP
- #define NRF_DRV_SPIS_DEFAULT_MISO_DRIVE NRFX_SPIS_DEFAULT_MISO_DRIVE
- #define NRF_DRV_SPIS_PIN_NOT_USED NRFX_SPIS_PIN_NOT_USED
- #define NRF_DRV_SPIS_BIT_ORDER_LSB_FIRST NRF_SPIS_BIT_ORDER_LSB_FIRST
- #define NRF_DRV_SPIS_BIT_ORDER_MSB_FIRST NRF_SPIS_BIT_ORDER_MSB_FIRST
- #define nrf_drv_spis_endian_t nrf_spis_bit_order_t
- #define NRF_DRV_SPIS_MODE_0 NRF_SPIS_MODE_0
- #define NRF_DRV_SPIS_MODE_1 NRF_SPIS_MODE_1
- #define NRF_DRV_SPIS_MODE_2 NRF_SPIS_MODE_2
- #define NRF_DRV_SPIS_MODE_3 NRF_SPIS_MODE_3
- #define nrf_drv_spis_mode_t nrf_spis_mode_t
- #define NRF_DRV_SPIS_BUFFERS_SET_DONE NRFX_SPIS_BUFFERS_SET_DONE
- #define NRF_DRV_SPIS_XFER_DONE NRFX_SPIS_XFER_DONE
- #define NRF_DRV_SPIS_EVT_TYPE_MAX NRFX_SPIS_EVT_TYPE_MAX
- #define nrf_drv_spis_event_type_t nrfx_spis_evt_type_t
- #define nrf_drv_spis_uninit nrfx_spis_uninit
- #define nrf_drv_spis_buffers_set nrfx_spis_buffers_set
- typedef void (*nrf_drv_spis_event_handler_t)(nrf_drv_spis_event_t event);
- 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);
- #ifdef __cplusplus
- }
- #endif
- #endif
|