Lines Matching +full:ram +full:- +full:up
2 * Copyright (c) 2015 - 2018, Nordic Semiconductor ASA
57 typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */
67 typedef enum /*lint -save -e30 -esym(628,__INTADDR__) */
71 …le specified by SAMPLE.MAXCNT (or the last sample after a STOP task has been received) to Data RAM.
101 …DE_OPERATION_Stereo, ///< Sample and store one pair (Left + Right) of 16-bit samples per RAM word.
102 …DE_OPERATION_Mono ///< Sample and store two successive Left samples (16 bit each) per RAM word.
268 * @brief Function for setting up the PDM pins.
299 * @param[in] p_buffer Pointer to the RAM address where samples should be written with EasyDMA.
302 * The amount of allocated RAM depends on the operation mode.
303 * - For stereo mode: N 32-bit words.
304 * - For mono mode: Ceil(N/2) 32-bit words.
347 NRF_PDM->INTENSET = pdm_int_mask; in nrf_pdm_int_enable()
352 return (bool)(NRF_PDM->INTENSET & pdm_int_mask); in nrf_pdm_int_enable_check()
357 NRF_PDM->INTENCLR = pdm_int_mask; in nrf_pdm_int_disable()
388 NRF_PDM->ENABLE = (PDM_ENABLE_ENABLE_Enabled << PDM_ENABLE_ENABLE_Pos); in nrf_pdm_enable()
393 NRF_PDM->ENABLE = (PDM_ENABLE_ENABLE_Disabled << PDM_ENABLE_ENABLE_Pos); in nrf_pdm_disable()
398 return (NRF_PDM->ENABLE == (PDM_ENABLE_ENABLE_Enabled << PDM_ENABLE_ENABLE_Pos)); in nrf_pdm_enable_check()
403 NRF_PDM->MODE = ((pdm_mode << PDM_MODE_OPERATION_Pos) & PDM_MODE_OPERATION_Msk) in nrf_pdm_mode_set()
409 uint32_t mode = NRF_PDM->MODE; in nrf_pdm_mode_get()
416 NRF_PDM->PDMCLKCTRL = ((pdm_freq << PDM_PDMCLKCTRL_FREQ_Pos) & PDM_PDMCLKCTRL_FREQ_Msk); in nrf_pdm_clock_set()
421 …return (nrf_pdm_freq_t) ((NRF_PDM->PDMCLKCTRL << PDM_PDMCLKCTRL_FREQ_Pos) & PDM_PDMCLKCTRL_FREQ_Ms… in nrf_pdm_clock_get()
426 NRF_PDM->PSEL.CLK = psel_clk; in nrf_pdm_psel_connect()
427 NRF_PDM->PSEL.DIN = psel_din; in nrf_pdm_psel_connect()
432 NRF_PDM->PSEL.CLK = ((PDM_PSEL_CLK_CONNECT_Disconnected << PDM_PSEL_CLK_CONNECT_Pos) in nrf_pdm_psel_disconnect()
434 NRF_PDM->PSEL.DIN = ((PDM_PSEL_DIN_CONNECT_Disconnected << PDM_PSEL_DIN_CONNECT_Pos) in nrf_pdm_psel_disconnect()
440 NRF_PDM->GAINL = gain_l; in nrf_pdm_gain_set()
441 NRF_PDM->GAINR = gain_r; in nrf_pdm_gain_set()
446 *p_gain_l = NRF_PDM->GAINL; in nrf_pdm_gain_get()
447 *p_gain_r = NRF_PDM->GAINR; in nrf_pdm_gain_get()
452 NRF_PDM->SAMPLE.PTR = (uint32_t)p_buffer; in nrf_pdm_buffer_set()
453 NRF_PDM->SAMPLE.MAXCNT = num; in nrf_pdm_buffer_set()
458 return (uint32_t *)NRF_PDM->SAMPLE.PTR; in nrf_pdm_buffer_get()