BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Macros | Typedefs
dma.h File Reference

Hardware presentation/abstraction for DMA (DMA/DMAX) More...

#include <bsp430/periph.h>

Go to the source code of this file.

Data Structures

struct  sBSP430hplDMAchannel
 
struct  sBSP430hplDMA
 
struct  sBSP430halDMA
 

Macros

#define BSP430_MODULE_DMAX
 
#define BSP430_MODULE_DMA
 
#define BSP430_DMA_HAL_HPL_VARIANT_DMA   1
 
#define BSP430_DMA_HAL_HPL_VARIANT_DMAX   2
 
#define BSP430_DMA_NUM_CHANNELS   3
 
#define configBSP430_HAL_DMA   0
 
#define BSP430_HAL_DMA   (&xBSP430hal_DMA_)
 
#define configBSP430_HPL_DMA   (configBSP430_HAL_DMA - 0)
 
#define BSP430_PERIPH_DMA   ((tBSP430periphHandle)(BSP430_PERIPH_DMA_BASEADDRESS_))
 
#define BSP430_HPL_DMA   ((volatile sBSP430hplDMA *)BSP430_PERIPH_DMA)
 
#define configBSP430_HAL_DMA_ISR   (configBSP430_HAL_DMA - 0)
 

Typedefs

typedef struct sBSP430hplDMAchannel sBSP430hplDMAchannel
 
typedef struct sBSP430hplDMA sBSP430hplDMA
 
typedef struct sBSP430halDMA sBSP430halDMA
 
typedef struct sBSP430halDMAhBSP430halDMA
 

Detailed Description

Hardware presentation/abstraction for DMA (DMA/DMAX)

The Direct Memory Access (DMA) module is present on certain MCUs in all MSP430 families. The functionality is essentially the same across the line, but the register layout is different on CPUX-based devices where addresses require 20 bits.

Module Configuration Options

None supported.

Hardware Presentation Layer

There is only one instance of DMA on any MCU, but because that instance can support multiple channels the sBSP430hplDMA structure is defined to simplify access to the sBSP430hplDMAchannel registers for a channel index.

Hardware Adaptation Layer

The sBSP430halDMA structure exists primarily to enable sharing the DMA interrupt infrastructure among independently maintained modules.

There are no value-added functions for this peripheral.

Homepage
http://github.com/pabigot/bsp430

Macro Definition Documentation

#define BSP430_DMA_HAL_HPL_VARIANT_DMA   1

Field value for sBSP430halDMA.hal_state.cflags when using a DMA peripheral.

This is informational only and can be used to distinguish the MCU from those with the later DMAX peripheral.

#define BSP430_DMA_HAL_HPL_VARIANT_DMAX   2

Field value for sBSP430halDMA.hal_state.cflags when using a DMAX peripheral.

This is informational only and can be used to distinguish the MCU from those with the earlier DMA peripheral.

#define BSP430_DMA_NUM_CHANNELS   3

Number of DMA channels supported.

This is an MCU-specific value.

#define BSP430_HAL_DMA   (&xBSP430hal_DMA_)

sBSP430halDMA HAL handle for BSP430_PERIPH_DMA.

This pointer may be used only if configBSP430_HAL_DMA is defined to a true value.

Dependency:
configBSP430_HAL_DMA
#define BSP430_HPL_DMA   ((volatile sBSP430hplDMA *)BSP430_PERIPH_DMA)

sBSP430hplDMA HPL pointer for BSP430_PERIPH_DMA.

This pointer to a volatile structure overlaying the DMA peripheral register map may be used only if configBSP430_HPL_DMA is defined to a true value.

Dependency:
configBSP430_HPL_DMA
#define BSP430_MODULE_DMA
Value:
(defined(__MSP430_HAS_DMA_1__) \
|| defined(__MSP430_HAS_DMA_6__) \
#define BSP430_MODULE_DMAX
Definition: dma.h:76

Defined to true if any DMA peripheral is supported.

Defined on inclusion of <bsp430/periph/dma.h> based on MCU-specific flags. The value evaluates to true if the target MCU supports the DMA or DMAX peripheral, and false if it does not.

C Preprocessor Only:
This macro may have a value that restricts its use to C preprocessor conditional directives.
#define BSP430_MODULE_DMAX
Value:
(defined(__MSP430_HAS_DMAX_3__) \
|| defined(__MSP430_HAS_DMAX_6__))

Defined to true if DMAX peripheral is supported.

Defined on inclusion of <bsp430/periph/dma.h> based on MCU-specific flags. The value evaluates to true if the target MCU supports the DMAX peripheral, and false if it does not.

C Preprocessor Only:
This macro may have a value that restricts its use to C preprocessor conditional directives.
#define BSP430_PERIPH_DMA   ((tBSP430periphHandle)(BSP430_PERIPH_DMA_BASEADDRESS_))

Handle for the raw DMA device.

The handle may be used only if configBSP430_HPL_DMA is defined to a true value.

Dependency:
configBSP430_HPL_DMA

Typedef Documentation

typedef struct sBSP430halDMA* hBSP430halDMA

Mild obscuration of the HAL internal structure

typedef struct sBSP430halDMA sBSP430halDMA

Structure holding hardware abstraction layer for the DMA peripheral.

typedef struct sBSP430hplDMA sBSP430hplDMA

Peripheral register map for 2xx/4xx MCUs with DMAX capability.

Peripheral map for DMAX channel register sets.

These are only used on CPUX MCUs, and support 20-bit addresses.