RTEMS 6.1-rc2
Loading...
Searching...
No Matches
fsl_pdm_sdma.h
1/*
2 * Copyright (c) 2018, Freescale Semiconductor, Inc.
3 * Copyright 2019 - 2020, NXP
4 * All rights reserved.
5 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef _FSL_PDM_SDMA_H_
10#define _FSL_PDM_SDMA_H_
11
12#include "fsl_pdm.h"
13#include "fsl_sdma.h"
14
21/*******************************************************************************
22 * Definitions
23 ******************************************************************************/
24
27#define FSL_PDM_SDMA_DRIVER_VERSION (MAKE_VERSION(2, 7, 0))
29
31
33typedef void (*pdm_sdma_callback_t)(PDM_Type *base, pdm_sdma_handle_t *handle, status_t status, void *userData);
34
37{
38 sdma_handle_t *dmaHandle;
39 uint8_t nbytes;
40 uint8_t fifoWidth;
41 uint8_t endChannel;
42 uint8_t channelNums;
43 uint32_t count;
44 uint32_t state;
45 uint32_t eventSource;
47 void *userData;
48 sdma_buffer_descriptor_t bdPool[PDM_XFER_QUEUE_SIZE];
51 volatile uint8_t queueUser;
52 volatile uint8_t queueDriver;
53};
54
55/*******************************************************************************
56 * APIs
57 ******************************************************************************/
58#if defined(__cplusplus)
59extern "C" {
60#endif
61
81 pdm_sdma_handle_t *handle,
82 pdm_sdma_callback_t callback,
83 void *userData,
84 sdma_handle_t *dmaHandle,
85 uint32_t eventSource);
86
101
109
119 pdm_sdma_handle_t *handle,
120 uint32_t channel,
122
130
133#if defined(__cplusplus)
134}
135#endif
136
140#endif
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
#define PDM_XFER_QUEUE_SIZE
PDM XFER QUEUE SIZE.
Definition: fsl_pdm.h:29
void PDM_TransferCreateHandleSDMA(PDM_Type *base, pdm_sdma_handle_t *handle, pdm_sdma_callback_t callback, void *userData, sdma_handle_t *dmaHandle, uint32_t eventSource)
Initializes the PDM eDMA handle.
void PDM_TransferTerminateReceiveSDMA(PDM_Type *base, pdm_sdma_handle_t *handle)
Terminate all the PDM sdma receive transfer.
void PDM_TransferAbortReceiveSDMA(PDM_Type *base, pdm_sdma_handle_t *handle)
Aborts a PDM receive using eDMA.
status_t PDM_TransferReceiveSDMA(PDM_Type *base, pdm_sdma_handle_t *handle, pdm_transfer_t *xfer)
Performs a non-blocking PDM receive using eDMA.
void PDM_SetChannelConfigSDMA(PDM_Type *base, pdm_sdma_handle_t *handle, uint32_t channel, const pdm_channel_config_t *config)
PDM channel configurations.
void(* pdm_sdma_callback_t)(PDM_Type *base, pdm_sdma_handle_t *handle, status_t status, void *userData)
PDM eDMA transfer callback function for finish and error.
Definition: fsl_pdm_sdma.h:33
Definition: MIMXRT1166_cm4.h:65557
PDM channel configurations.
Definition: fsl_pdm.h:250
PDM DMA transfer handle, users should not touch the content of the handle.
Definition: fsl_pdm_sdma.h:37
volatile uint8_t queueUser
Definition: fsl_pdm_sdma.h:51
pdm_sdma_callback_t callback
Definition: fsl_pdm_sdma.h:46
uint8_t nbytes
Definition: fsl_pdm_sdma.h:39
uint32_t state
Definition: fsl_pdm_sdma.h:44
volatile uint8_t queueDriver
Definition: fsl_pdm_sdma.h:52
sdma_handle_t * dmaHandle
Definition: fsl_pdm_sdma.h:38
uint8_t endChannel
Definition: fsl_pdm_sdma.h:41
pdm_transfer_t pdmQueue[PDM_XFER_QUEUE_SIZE]
Definition: fsl_pdm_sdma.h:49
uint32_t count
Definition: fsl_pdm_sdma.h:43
uint8_t fifoWidth
Definition: fsl_pdm_sdma.h:40
uint32_t eventSource
Definition: fsl_pdm_sdma.h:45
sdma_buffer_descriptor_t bdPool[PDM_XFER_QUEUE_SIZE]
Definition: fsl_pdm_sdma.h:48
void * userData
Definition: fsl_pdm_sdma.h:47
size_t transferSize[PDM_XFER_QUEUE_SIZE]
Definition: fsl_pdm_sdma.h:50
uint8_t channelNums
Definition: fsl_pdm_sdma.h:42
PDM SDMA transfer structure.
Definition: fsl_pdm.h:349
Definition: deflate.c:114