123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- #ifndef NRF_DRV_PDM_H__
- #define NRF_DRV_PDM_H__
- #include <nrfx_pdm.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef nrfx_pdm_config_t nrf_drv_pdm_config_t;
- typedef nrfx_pdm_evt_t nrf_drv_pdm_evt_t;
- #define NRF_PDM_MAX_BUFFER_SIZE NRFX_PDM_MAX_BUFFER_SIZE
- #define NRF_DRV_PDM_DEFAULT_CONFIG NRFX_PDM_DEFAULT_CONFIG
- #define PDM_NO_ERROR NRFX_PDM_NO_ERROR
- #define PDM_ERROR_OVERFLOW NRFX_PDM_ERROR_OVERFLOW
- #define nrf_drv_pdm_error_t nrfx_pdm_error_t
- #define nrf_drv_pdm_event_handler_t nrfx_pdm_event_handler_t
- #define nrf_drv_pdm_uninit nrfx_pdm_uninit
- #define nrf_drv_pdm_task_address_get nrfx_pdm_task_address_get
- #define nrf_drv_pdm_enable_check nrfx_pdm_enable_check
- #define nrf_drv_pdm_start nrfx_pdm_start
- #define nrf_drv_pdm_stop nrfx_pdm_stop
- #define nrf_drv_pdm_buffer_set nrfx_pdm_buffer_set
- __STATIC_INLINE ret_code_t nrf_drv_pdm_init(nrf_drv_pdm_config_t const * p_config,
- nrf_drv_pdm_event_handler_t event_handler)
- {
- if (p_config == NULL)
- {
- return NRFX_ERROR_INVALID_PARAM;
- }
- return nrfx_pdm_init(p_config, event_handler);
- }
- #ifdef __cplusplus
- }
- #endif
- #endif
|