Library Functions.
More...
Library Functions.
| void TM_DMA_ClearFlag |
( |
DMA_Stream_TypeDef * |
DMA_Stream, |
|
|
uint32_t |
flags |
|
) |
| |
Clears selected DMA interrupt flag.
- Parameters
-
| *DMA_Stream | Pointer to DMA_Stream_TypeDef DMA stream where you want to clear flags |
| flags | Flag(s) which you wanna clear:
- DMA_FLAG_TCIF: Transfer complete interrupt flag
- DMA_FLAG HTIF: Half transfer complete interrupt flag
- DMA_FLAG_TEIF: Transfer error interrupt flag
- DMA_FLAG_DMEIF: Direct mode error interrupt flag
- DMA_FLAG_FEIF: FIFO error interrupt flag
- DMA_FLAG_ALL: All flags
|
- Return values
-
| void TM_DMA_ClearFlags |
( |
DMA_Stream_TypeDef * |
DMA_Stream | ) |
|
Clears all flags for selected DMA stream.
- Parameters
-
| *DMA_Stream | Pointer to DMA_Stream_TypeDef DMA stream where you want to clear flags |
- Return values
-
| void TM_DMA_DeInit |
( |
DMA_Stream_TypeDef * |
Stream | ) |
|
Deinitializes DMA stream.
- Parameters
-
| *DMA_Stream | Pointer to DMA_Stream_TypeDef DMA stream to deinitialize |
- Return values
-
| void TM_DMA_DirectModeErrorHandler |
( |
DMA_Stream_TypeDef * |
DMA_Stream | ) |
|
Direct mode error callback.
- Note
- This function is called when interrupt for specific stream happens for direct mode error
- Parameters
-
| *DMA_Stream | Pointer to DMA stream where interrupt happens |
- Return values
-
- Note
- With __weak parameter to prevent link errors if not defined by user
| void TM_DMA_DisableInterrupts |
( |
DMA_Stream_TypeDef * |
DMA_Stream | ) |
|
Disables interrupts for DMA stream.
- Note
- It adds IRQ to NVIC and enables all possible DMA STREAM interrupts
- Parameters
-
| *DMA_Stream | Pointer to DMA stream where to disable interrupts |
- Return values
-
| void TM_DMA_EnableInterrupts |
( |
DMA_Stream_TypeDef * |
DMA_Stream | ) |
|
Enables interrupts for DMA stream.
- Note
- It adds IRQ to NVIC and enables all possible DMA STREAM interrupts
- Parameters
-
| *DMA_Stream | Pointer to DMA stream where to enable interrupts |
- Return values
-
| void TM_DMA_FIFOErrorHandler |
( |
DMA_Stream_TypeDef * |
DMA_Stream | ) |
|
FIFO error error callback.
- Note
- This function is called when interrupt for specific stream happens for FIFO error
- Parameters
-
| *DMA_Stream | Pointer to DMA stream where interrupt happens |
- Return values
-
- Note
- With __weak parameter to prevent link errors if not defined by user
| void TM_DMA_HalfTransferCompleteHandler |
( |
DMA_Stream_TypeDef * |
DMA_Stream | ) |
|
Half transfer complete callback.
- Note
- This function is called when interrupt for specific stream happens for hal transfer complete
- Parameters
-
| *DMA_Stream | Pointer to DMA stream where interrupt happens |
- Return values
-
- Note
- With __weak parameter to prevent link errors if not defined by user
| void TM_DMA_Init |
( |
DMA_Stream_TypeDef * |
Stream, |
|
|
DMA_HandleTypeDef * |
HDMA |
|
) |
| |
Initializes DMA stream.
- Parameters
-
| *DMA_Stream | Pointer to DMA_Stream_TypeDef DMA stream to initialize |
| *HDMA | Pointer to DMA_HandleTypeDef structure with settings. When this parameter is set to null, only click will be enabled for desired stream for DMA |
- Return values
-
| void TM_DMA_Start |
( |
DMA_HandleTypeDef * |
hdma, |
|
|
uint32_t |
Source, |
|
|
uint32_t |
Destination, |
|
|
uint16_t |
Length |
|
) |
| |
Starts DMA transmission for selected stream.
- Parameters
-
| *HDMA | Pointer to DMA_HandleTypeDef structure with settings where transmission will be started |
| Source | Source address from where data will be sent |
| Destination | Destination address where data will be sent |
| Length | Number of bytes to sent |
- Return values
-
| void TM_DMA_TransferCompleteHandler |
( |
DMA_Stream_TypeDef * |
DMA_Stream | ) |
|
Transfer complete callback.
- Note
- This function is called when interrupt for specific stream happens for transfer complete
-
This function is called immediately after DMA transfers last element from memory to your peripheral if DMA is configured as M2P (Memory 2 Peripheral). When using for example USART, DMA will transfer last byte to USART peripheral register, but USART still has to do its job. It's important to know this fact, because you can get a lot of troubles, when for ex. you are working with RS485 and you have to control Enable pin for your transceiver.
- Parameters
-
| *DMA_Stream | Pointer to DMA stream where interrupt happens |
- Return values
-
- Note
- With __weak parameter to prevent link errors if not defined by user
| void TM_DMA_TransferErrorHandler |
( |
DMA_Stream_TypeDef * |
DMA_Stream | ) |
|
Transfer error callback.
- Note
- This function is called when interrupt for specific stream happens for transfer error
- Parameters
-
| *DMA_Stream | Pointer to DMA stream where interrupt happens |
- Return values
-
- Note
- With __weak parameter to prevent link errors if not defined by user