STM8L15x Standard Peripherals Drivers: stm8l15x_dma.h File Reference

STM8L15x/16x Standard Peripherals Drivers

STM8L15x Standard Peripherals Drivers

stm8l15x_dma.h File Reference

This file contains all the functions prototypes for the DMA firmware library. More...

#include "stm8l15x.h"

Go to the source code of this file.

Defines

#define IS_DMA_BUFFER_SIZE(SIZE)   ((SIZE) > (uint8_t)0x0)
#define IS_DMA_CHANNEL(PERIPH)
#define IS_DMA_CLEAR_FLAG(FLAG)
#define IS_DMA_CLEAR_IT(IT)
#define IS_DMA_CONFIG_ITX(IT)   ((((IT) & 0xF9) == 0x00) && ((IT) != 0x00))
#define IS_DMA_DATA_SIZE(SIZE)
#define IS_DMA_DIR(DIR)
#define IS_DMA_GET_FLAG(FLAG)
#define IS_DMA_GET_IT(IT)
#define IS_DMA_MEMORY_INC_MODE(MODE)
#define IS_DMA_MODE(MODE)
#define IS_DMA_PRIORITY(PRIORITY)
#define IS_DMA_TIMEOUT(TIME)   ((TIME) < (uint8_t)0x40)

Enumerations

enum  DMA_DIR_TypeDef { DMA_DIR_PeripheralToMemory = ((uint8_t)0x00), DMA_DIR_MemoryToPeripheral = ((uint8_t)0x08), DMA_DIR_Memory0ToMemory1 = ((uint8_t)0x40) }
enum  DMA_FLAG_TypeDef {
  DMA1_FLAG_GB = ((uint16_t)0x0002), DMA1_FLAG_IFC0 = ((uint16_t)0x1001), DMA1_FLAG_IFC1 = ((uint16_t)0x1002), DMA1_FLAG_IFC2 = ((uint16_t)0x1004),
  DMA1_FLAG_IFC3 = ((uint16_t)0x1008), DMA1_FLAG_TC0 = ((uint16_t)0x0102), DMA1_FLAG_TC1 = ((uint16_t)0x0202), DMA1_FLAG_TC2 = ((uint16_t)0x0402),
  DMA1_FLAG_TC3 = ((uint16_t)0x0802), DMA1_FLAG_HT0 = ((uint16_t)0x0104), DMA1_FLAG_HT1 = ((uint16_t)0x0204), DMA1_FLAG_HT2 = ((uint16_t)0x0404),
  DMA1_FLAG_HT3 = ((uint16_t)0x0804), DMA1_FLAG_PEND0 = ((uint16_t)0x0140), DMA1_FLAG_PEND1 = ((uint16_t)0x0240), DMA1_FLAG_PEND2 = ((uint16_t)0x0440),
  DMA1_FLAG_PEND3 = ((uint16_t)0x0840), DMA1_FLAG_BUSY0 = ((uint16_t)0x0180), DMA1_FLAG_BUSY1 = ((uint16_t)0x0280), DMA1_FLAG_BUSY2 = ((uint16_t)0x0480),
  DMA1_FLAG_BUSY3 = ((uint16_t)0x0880)
}
enum  DMA_IT_TypeDef {
  DMA1_IT_TC0 = ((uint8_t)0x12), DMA1_IT_TC1 = ((uint8_t)0x22), DMA1_IT_TC2 = ((uint8_t)0x42), DMA1_IT_TC3 = ((uint8_t)0x82),
  DMA1_IT_HT0 = ((uint8_t)0x14), DMA1_IT_HT1 = ((uint8_t)0x24), DMA1_IT_HT2 = ((uint8_t)0x44), DMA1_IT_HT3 = ((uint8_t)0x84)
}
enum  DMA_ITx_TypeDef { DMA_ITx_TC = ((uint8_t)0x02), DMA_ITx_HT = ((uint8_t)0x04) }
enum  DMA_MemoryDataSize_TypeDef { DMA_MemoryDataSize_Byte = ((uint8_t)0x00), DMA_MemoryDataSize_HalfWord = ((uint8_t)0x08) }
enum  DMA_MemoryIncMode_TypeDef { DMA_MemoryIncMode_Dec = ((uint8_t)0x00), DMA_MemoryIncMode_Inc = ((uint8_t)0x20) }
enum  DMA_Mode_TypeDef { DMA_Mode_Normal = ((uint8_t)0x00), DMA_Mode_Circular = ((uint8_t)0x10) }
enum  DMA_Priority_TypeDef { DMA_Priority_Low = ((uint8_t)0x00), DMA_Priority_Medium = ((uint8_t)0x10), DMA_Priority_High = ((uint8_t)0x20), DMA_Priority_VeryHigh = ((uint8_t)0x30) }

Functions

void DMA_ClearFlag (DMA_FLAG_TypeDef DMA_FLAG)
 Clears the DMA Channels selected flags.
void DMA_ClearITPendingBit (DMA_IT_TypeDef DMA_IT)
 Clears the DMA Channelx�s interrupt pending bits.
void DMA_Cmd (DMA_Channel_TypeDef *DMA_Channelx, FunctionalState NewState)
 Enables or disables the specified DMA Channelx.
void DMA_DeInit (DMA_Channel_TypeDef *DMA_Channelx)
 Deinitializes the DMA Channelx registers to their default reset values.
uint8_t DMA_GetCurrDataCounter (DMA_Channel_TypeDef *DMA_Channelx)
 Returns the number of remaining data units in the current DMA Channelx transfer.
FlagStatus DMA_GetFlagStatus (DMA_FLAG_TypeDef DMA_FLAG)
 Checks whether the specified DMA Channelx flag is set or not.
ITStatus DMA_GetITStatus (DMA_IT_TypeDef DMA_IT)
 Checks whether the specified DMA Channelx interrupt has occurred or not.
void DMA_GlobalCmd (FunctionalState NewState)
 Enables or disables All the DMA.
void DMA_GlobalDeInit (void)
 Deinitializes the DMA Global Status register to its default reset values.
void DMA_Init (DMA_Channel_TypeDef *DMA_Channelx, uint32_t DMA_Memory0BaseAddr, uint16_t DMA_PeripheralMemory1BaseAddr, uint8_t DMA_BufferSize, DMA_DIR_TypeDef DMA_DIR, DMA_Mode_TypeDef DMA_Mode, DMA_MemoryIncMode_TypeDef DMA_MemoryIncMode, DMA_Priority_TypeDef DMA_Priority, DMA_MemoryDataSize_TypeDef DMA_MemoryDataSize)
 Initializes the DMA Channelx according to the specified parameters.
void DMA_ITConfig (DMA_Channel_TypeDef *DMA_Channelx, DMA_ITx_TypeDef DMA_ITx, FunctionalState NewState)
 Enables or disables the specified DMA Channelx interrupts.
void DMA_SetCurrDataCounter (DMA_Channel_TypeDef *DMA_Channelx, uint8_t DataNumber)
 Set the number of data units to transfer for DMA Channelx.
void DMA_SetTimeOut (uint8_t DMA_TimeOut)
 Sets the Time out Value.

Detailed Description

This file contains all the functions prototypes for the DMA firmware library.

Author:
MCD Application Team
Version:
V1.5.0
Date:
13-May-2011
Attention:

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2011 STMicroelectronics

Definition in file stm8l15x_dma.h.

STM8S Firmware Library: Overview

 

 

 

For complete documentation on STM8L15x 8-bit microcontrollers platform visit www.st.com