stm32f4/include/periph_cpu.h File Reference

CPU specific definitions for internal peripheral handling. More...

Detailed Description

CPU specific definitions for internal peripheral handling.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file stm32f4/include/periph_cpu.h.

#include "periph_cpu_common.h"
+ Include dependency graph for stm32f4/include/periph_cpu.h:

Go to the source code of this file.

Data Structures

struct  adc_conf_t
 ADC device configuration. More...
 
#define CPUID_ADDR   (0x1fff7a10)
 Starting address of the CPU ID.
 
enum  {
  PORT_A = 0, PORT_B = 1, PORT_C = 2, PORT_D = 3,
  PORT_E = 4, PORT_F = 5, PORT_G = 6, PORT_H = 7,
  PORT_I = 8
}
 Available ports on the STM32F4 family. More...
 
static void dma_poweron (int stream)
 Power on the DMA device the given stream belongs to. More...
 
static DMA_TypeDef * dma_base (int stream)
 Get DMA base register. More...
 
static DMA_Stream_TypeDef * dma_stream (int stream)
 Get the DMA stream base address. More...
 
static int dma_hl (int stream)
 Select high or low DMA interrupt register based on stream number. More...
 
static uint32_t dma_ifc (int stream)
 Get the interrupt flag clear bit position in the DMA LIFCR register. More...
 
static void dma_isr_enable (int stream)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Available ports on the STM32F4 family.

Enumerator
PORT_A 

port A

PORT_B 

port B

PORT_C 

port C

PORT_D 

port D

PORT_E 

port E

PORT_F 

port F

PORT_G 

port G

PORT_H 

port H

PORT_I 

port I

Definition at line 36 of file stm32f4/include/periph_cpu.h.

Function Documentation

◆ dma_base()

static DMA_TypeDef* dma_base ( int  stream)
inlinestatic

Get DMA base register.

For simplifying DMA stream handling, we map the DMA channels transparently to one integer number, such that DMA1 stream0 equals 0, DMA2 stream0 equals 8, DMA2 stream 7 equals 15 and so on.

Parameters
[in]streamlogical DMA stream

Definition at line 107 of file stm32f4/include/periph_cpu.h.

◆ dma_hl()

static int dma_hl ( int  stream)
inlinestatic

Select high or low DMA interrupt register based on stream number.

Parameters
[in]streamlogical DMA stream
Returns
0 for streams 0-3, 1 for streams 3-7

Definition at line 133 of file stm32f4/include/periph_cpu.h.

◆ dma_ifc()

static uint32_t dma_ifc ( int  stream)
inlinestatic

Get the interrupt flag clear bit position in the DMA LIFCR register.

Parameters
[in]streamlogical DMA stream

Definition at line 143 of file stm32f4/include/periph_cpu.h.

◆ dma_poweron()

static void dma_poweron ( int  stream)
inlinestatic

Power on the DMA device the given stream belongs to.

Parameters
[in]streamlogical DMA stream

Definition at line 88 of file stm32f4/include/periph_cpu.h.

◆ dma_stream()

static DMA_Stream_TypeDef* dma_stream ( int  stream)
inlinestatic

Get the DMA stream base address.

Parameters
[in]streamlogical DMA stream
Returns
base address for the selected DMA stream

Definition at line 119 of file stm32f4/include/periph_cpu.h.