stm32f1/include/periph_cpu.h File Reference

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

Detailed Description

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

Go to the source code of this file.

Data Structures

struct  adc_conf_t
 CPU specific ADC configuration. More...
 
struct  dac_conf_t
 CPU specific DAC configuration. More...
 

Enumerations

enum  {
  PORT_A = 0, PORT_B = 1, PORT_C = 2, PORT_D = 3,
  PORT_E = 4, PORT_F = 5, PORT_G = 6
}
 Available ports on the STM32F1 family. More...
 
#define ADC_DEVS   (2U)
 Available number of ADC devices.
 
#define TIMER_CHANNELS   (4U)
 All timers for the STM32F1 have 4 CC channels.
 
#define TIMER_MAXVAL   (0xffff)
 All timers have a width of 16-bit.
 
#define GPIO_MODE(mode, cnf, odr)   (mode | (cnf << 2) | (odr << 4))
 Generate GPIO mode bitfields. More...
 
#define PM_NUM_MODES   (2U)
 Define the number of available PM modes.
 
#define PM_BLOCKER_INITIAL   { .val_u32 = 0x01010101 }
 Override the default initial PM blocker. More...
 
#define HAVE_GPIO_PP_T
 Override values for pull register configuration.
 
enum  gpio_pp_t { GPIO_NOPULL = 4, GPIO_PULLUP = 9, GPIO_PULLDOWN = 8 }
 

Macro Definition Documentation

◆ GPIO_MODE

#define GPIO_MODE (   mode,
  cnf,
  odr 
)    (mode | (cnf << 2) | (odr << 4))

We use 4 bit to determine the pin functions:

  • bit 4: ODR value
  • bit 2+3: in/out
  • bit 1: PU enable
  • bit 2: OD enable

Definition at line 52 of file stm32f1/include/periph_cpu.h.

◆ PM_BLOCKER_INITIAL

#define PM_BLOCKER_INITIAL   { .val_u32 = 0x01010101 }
Todo:
we block all modes per default, until PM is cleanly implemented

Definition at line 63 of file stm32f1/include/periph_cpu.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
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

Definition at line 113 of file stm32f1/include/periph_cpu.h.

◆ gpio_pp_t

enum gpio_pp_t
Enumerator
GPIO_NOPULL 

do not use internal pull resistors

GPIO_PULLUP 

enable internal pull-up resistor

GPIO_PULLDOWN 

enable internal pull-down resistor

Definition at line 89 of file stm32f1/include/periph_cpu.h.