123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #ifndef NRF_DRV_I2S_H__
- #define NRF_DRV_I2S_H__
- #include <nrfx_i2s.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef nrfx_i2s_config_t nrf_drv_i2s_config_t;
- typedef nrfx_i2s_buffers_t nrf_drv_i2s_buffers_t;
- #define NRF_DRV_I2S_PIN_NOT_USED NRFX_I2S_PIN_NOT_USED
- #define NRF_DRV_I2S_FLAG_SYNCHRONIZED_MODE NRFX_I2S_FLAG_SYNCHRONIZED_MODE
- #define NRF_DRV_I2S_DEFAULT_CONFIG NRFX_I2S_DEFAULT_CONFIG
- #define NRF_DRV_I2S_STATUS_NEXT_BUFFERS_NEEDED NRFX_I2S_STATUS_NEXT_BUFFERS_NEEDED
- #define nrf_drv_i2s_data_handler_t nrfx_i2s_data_handler_t
- #define nrf_drv_i2s_uninit nrfx_i2s_uninit
- #define nrf_drv_i2s_start nrfx_i2s_start
- #define nrf_drv_i2s_next_buffers_set nrfx_i2s_next_buffers_set
- #define nrf_drv_i2s_stop nrfx_i2s_stop
- __STATIC_INLINE ret_code_t nrf_drv_i2s_init(nrf_drv_i2s_config_t const * p_config,
- nrf_drv_i2s_data_handler_t handler)
- {
- if (p_config == NULL)
- {
- static nrfx_i2s_config_t const default_config = NRFX_I2S_DEFAULT_CONFIG;
- p_config = &default_config;
- }
- return nrfx_i2s_init(p_config, handler);
- }
- #ifdef __cplusplus
- }
- #endif
- #endif
|