42 #ifndef INC_LLD_OC_DMA_LLD_H_ 43 #define INC_LLD_OC_DMA_LLD_H_ 46 #include <oc_errors.h> 48 #if oC_Channel_IsModuleDefined(DMA) == false 49 #error DMA module is not defined 57 #define _________________________________________TYPES_SECTION______________________________________________________________________________ 58 #define MODULE_NAME DMA 79 oC_DMA_LLD_Priority_Low ,
80 oC_DMA_LLD_Priority_Medium ,
81 oC_DMA_LLD_Priority_High
82 } oC_DMA_LLD_Priority_t;
93 typedef void (*oC_DMA_LLD_EventHandler_t)(oC_DMA_Channel_t Channel);
102 oC_DMA_LLD_ElementSize_Byte = 0 ,
103 oC_DMA_LLD_ElementSize_HalfWord = 1 ,
104 oC_DMA_LLD_ElementSize_Word = 2
105 } oC_DMA_LLD_ElementSize_t;
114 oC_DMA_LLD_Direction_Transmit ,
115 oC_DMA_LLD_Direction_Receive
116 } oC_DMA_LLD_Direction_t;
127 oC_DMA_LLD_EventHandler_t TransferCompleteEventHandler;
128 oC_UInt_t BufferSize;
129 oC_DMA_LLD_Priority_t Priority;
130 oC_DMA_LLD_ElementSize_t ElementSize;
131 } oC_DMA_LLD_SoftwareTradeConfig_t;
141 oC_DMA_LLD_EventHandler_t TransferCompleteEventHandler;
143 void * PeripheralData;
144 oC_UInt_t BufferSize;
145 oC_DMA_LLD_Priority_t Priority;
146 oC_DMA_LLD_ElementSize_t ElementSize;
147 oC_DMA_LLD_Direction_t TransmitDirection;
149 } oC_DMA_LLD_PeripheralTradeConfig_t;
152 #undef _________________________________________TYPES_SECTION______________________________________________________________________________ 160 #define _________________________________________MACROS_SECTION_____________________________________________________________________________ 193 #define oC_DMA_LLD_ForeachChannel(Channel) oC_Channel_Foreach(DMA , Channel) 195 #undef _________________________________________MACROS_SECTION_____________________________________________________________________________ 205 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ 219 extern oC_ErrorCode_t oC_DMA_LLD_TurnOnDriver(
void );
231 extern oC_ErrorCode_t oC_DMA_LLD_TurnOffDriver(
void );
244 extern bool oC_DMA_LLD_IsChannelAvailable( oC_DMA_Channel_t Channel );
254 extern void oC_DMA_LLD_RestoreDefaultStateOnChannel( oC_DMA_Channel_t Channel );
280 extern bool oC_DMA_LLD_IsSoftwareTradeSupportedOnDmaChannel( oC_DMA_Channel_t DmaChannel );
293 extern bool oC_DMA_LLD_DoesDmaHasAccessToAddress( oC_DMA_Channel_t Channel ,
const void * Address );
306 extern oC_ErrorCode_t oC_DMA_LLD_ConfigureSoftwareTrade( oC_DMA_Channel_t Channel ,
const oC_DMA_LLD_SoftwareTradeConfig_t * Config );
319 extern oC_ErrorCode_t oC_DMA_LLD_ConfigurePeripheralTrade( oC_DMA_Channel_t Channel ,
const oC_DMA_LLD_PeripheralTradeConfig_t * Config );
331 extern bool oC_DMA_LLD_IsTransferCompleteOnChannel( oC_DMA_Channel_t Channel );
344 extern oC_ErrorCode_t oC_DMA_LLD_ReadChannelUsedReference( oC_DMA_Channel_t Channel ,
bool ** outChannelUsedFlag );
360 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________ oC_Machine_DmaSignalType_t
type with DMA signal types
#define oC_ModuleChannel_DefineType
defines module channel type
oC_Channel_t
stores machine channel
The file with interface for the machine module.