periph_conf.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2014 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "macros/units.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
30 #if !defined(CLOCK_CORECLOCK) || defined(DOXYGEN)
31 # define CLOCK_CORECLOCK GHZ(1)
32 #endif
33 
37 #define NATIVE_TIMER_MIN_RES 200
38 
42 #define RANDOM_NUMOF (1U)
43 
44 /* MARK: - Timer peripheral configuration */
49 #define TIMER_NUMOF (1U)
50 #define TIMER_CHANNEL_NUMOF (1U)
53 /* MARK: - xtimer configuration */
62 #define XTIMER_BACKOFF 200
63 #define XTIMER_ISR_BACKOFF 200
69 #if !defined(UART_NUMOF) || defined(DOXYGEN)
70 # define UART_NUMOF (1U)
71 #endif
72 
76 #if !defined(PWM_NUMOF) || defined(DOXYGEN)
77 # define PWM_NUMOF (8U)
78 #endif
79 
83 #if !defined(QDEC_NUMOF) || defined(DOXYGEN)
84 # define QDEC_NUMOF (8U)
85 #endif
86 
87 /* MARK: - SPI configuration (Linux host only) */
92 #if !defined(SPI_NUMOF) || defined(DOXYGEN)
102 # define SPI_NUMOF (1U)
103 #endif
104 
105 #if !defined(SPI_MAXCS) || defined(DOXYGEN)
112 # define SPI_MAXCS (4U)
113 #endif
114 
123 #define SPI_HWCS(x) (UINT_MAX - SPI_MAXCS + x)
126 #ifdef __cplusplus
127 }
128 #endif
129 
Unit helper macros.