periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Freie Universit├Ąt Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef PERIPH_CPU_H
20 #define PERIPH_CPU_H
21 
22 #include "periph/dev_enums.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 #ifndef CPUID_LEN
32 #define CPUID_LEN (4U)
33 #endif
34 
38 #define PERIPH_TIMER_PROVIDES_SET
39 
44 #define PROVIDES_PM_OFF
45 #define PROVIDES_PM_SET_LOWEST
46 
48 /* Configuration for the wrapper around the Linux SPI API (periph_spidev_linux)
49  *
50  * Needs to go here, otherwise the SPI_NEEDS_ are defined after inclusion of
51  * spi.h.
52  */
53 #if defined(MODULE_PERIPH_SPIDEV_LINUX) || defined(DOXYGEN)
54 
62 #define PERIPH_SPI_NEEDS_TRANSFER_BYTE
63 
66 #define PERIPH_SPI_NEEDS_TRANSFER_REG
67 
70 #define PERIPH_SPI_NEEDS_TRANSFER_REGS
71 
72 #ifndef DOXYGEN
73 
76 #define HAVE_SPI_CLK_T
77 
84 typedef enum {
85  SPI_CLK_100KHZ = (100000U),
86  SPI_CLK_400KHZ = (400000U),
87  SPI_CLK_1MHZ = (1000000U),
88  SPI_CLK_5MHZ = (5000000U),
89  SPI_CLK_10MHZ = (10000000U)
90 } spi_clk_t;
92 #endif /* ndef DOXYGEN */
93 #endif /* MODULE_PERIPH_SPI | DOXYGEN */
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif /* PERIPH_CPU_H */
100 
drive the SPI bus with 100KHz
Definition: spi.h:174
drive the SPI bus with 400KHz
Definition: spi.h:175
Device enumerations for backward compatibility with existing peripheral driver implementations.
spi_clk_t
Available SPI clock speeds.
Definition: spi.h:173
drive the SPI bus with 5MHz
Definition: spi.h:177
drive the SPI bus with 10MHz
Definition: spi.h:178
drive the SPI bus with 1MHz
Definition: spi.h:176