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)
56 #if !defined(UART_NUMOF) || defined(DOXYGEN)
57 # define UART_NUMOF (1U)
58 #endif
59 
63 #if !defined(PWM_NUMOF) || defined(DOXYGEN)
64 # define PWM_NUMOF (8U)
65 #endif
66 
70 #if !defined(QDEC_NUMOF) || defined(DOXYGEN)
71 # define QDEC_NUMOF (8U)
72 #endif
73 
74 /* MARK: - SPI configuration (Linux host only) */
79 #if !defined(SPI_NUMOF) || defined(DOXYGEN)
89 # define SPI_NUMOF (1U)
90 #endif
91 
92 #if !defined(SPI_MAXCS) || defined(DOXYGEN)
99 # define SPI_MAXCS (4U)
100 #endif
101 
110 #define SPI_HWCS(x) (UINT_MAX - SPI_MAXCS + x)
113 #ifdef __cplusplus
114 }
115 #endif
116 
Unit helper macros.