~aleteoryx/muditaos

ref: 6f05514068f3a1cd70d535da1407a1fd12650b82 muditaos/module-bsp/board/linux/eink/fsl_edma.h -rw-r--r-- 1.7 KiB
6f055140 — Wojtek Cichoń [EGD-7462] Fixed wording and more 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#ifndef MODULE_BSP_BOARD_LINUX_FSL_DRIVERS_FSL_EDMA_H_
#define MODULE_BSP_BOARD_LINUX_FSL_DRIVERS_FSL_EDMA_H_

#if defined(__cplusplus)
extern "C"
{
#endif /* __cplusplus */

    /*! @brief Callback for eDMA */
    struct _edma_handle;

    typedef void (*edma_callback)(struct _edma_handle *handle, void *userData, bool transferDone, uint32_t tcds);

    /*! @brief eDMA transfer handle structure */
    typedef struct _edma_handle
    {
        edma_callback callback; /*!< Callback function for major count exhausted. */
        void *userData;         /*!< Callback function parameter. */
                                //    DMA_Type *base;         /*!< eDMA peripheral base address. */
                                //    edma_tcd_t *tcdPool;    /*!< Pointer to memory stored TCDs. */
        uint8_t channel;        /*!< eDMA channel number. */
        volatile int8_t
            header; /*!< The first TCD index. Should point to the next TCD to be loaded into the eDMA engine. */
        volatile int8_t
            tail; /*!< The last TCD index. Should point to the next TCD to be stored into the memory pool. */
        volatile int8_t tcdUsed; /*!< The number of used TCD slots. Should reflect the number of TCDs can be used/loaded
                                    in the memory. */
        volatile int8_t tcdSize; /*!< The total number of TCD slots in the queue. */
        uint8_t flags;           /*!< The status of the current channel. */
    } edma_handle_t;

#if defined(__cplusplus)
}
#endif /* __cplusplus */

#endif /* MODULE_BSP_BOARD_LINUX_FSL_DRIVERS_FSL_EDMA_H_ */