stm32l0/include/periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2017 Freie Universit├Ąt Berlin
3  * 2017 Inria
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
22 #ifndef PERIPH_CPU_H
23 #define PERIPH_CPU_H
24 
25 #include "periph_cpu_common.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
34 #define CPUID_ADDR (0x1ff80050)
35 
39 enum {
40  PORT_A = 0,
41  PORT_B = 1,
42  PORT_C = 2,
43  PORT_D = 3,
44  PORT_E = 4,
45  PORT_H = 7,
46 };
47 
48 #ifndef DOXYGEN
49 
53 #define HAVE_ADC_RES_T
54 typedef enum {
55  ADC_RES_6BIT = (0x3 << 3),
56  ADC_RES_8BIT = (0x2 << 3),
57  ADC_RES_10BIT = (0x1 << 3),
58  ADC_RES_12BIT = (0x0 << 3),
59  ADC_RES_14BIT = (0xfe),
60  ADC_RES_16BIT = (0xff)
61 } adc_res_t;
63 #endif /* ndef DOXYGEN */
64 
68 typedef struct {
69  gpio_t pin;
70  uint8_t chan;
71 } adc_conf_t;
72 
76 typedef struct {
77  I2C_TypeDef *dev;
78  gpio_t scl;
79  gpio_t sda;
82  uint8_t ev_irqn;
83 } i2c_conf_t;
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* PERIPH_CPU_H */
90 
I2C configuration options.
ADC resolution: 12 bit.
gpio_t scl
scl pin number
gpio_af_t
Available MUX values for configuring a pin&#39;s alternate function.
gpio_mode_t pin_mode
with or without pull resistor
not supported by hardware
ADC resolution: 10 bit.
gpio_t adc_conf_t
ADC configuration wrapper.
not supported by hardware
not supported by hardware
not supported by hardware
gpio_t sda
sda pin number
uint8_t ev_irqn
event IRQ
gpio_af_t af
I2C alternate function value.