periph_cpu.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 ML!PA Consulting GmbH
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 
20 #ifndef PERIPH_CPU_H
21 #define PERIPH_CPU_H
22 
23 #include <limits.h>
24 
25 #include "periph_cpu_common.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
34 #define SAM0_DFLL_FREQ_HZ (48000000U)
35 
39 #define SAM0_DPLL_FREQ_MIN_HZ (96000000U)
40 
44 #define SAM0_DPLL_FREQ_MAX_HZ (200000000U)
45 
49 static const int8_t exti_config[4][32] = {
50 #ifdef CPU_MODEL_SAMD51J20A
51  { 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
52  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, 11, -1, -1, 14, 15 },
53  { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
54  0, 1, -1, -1, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, 14, 15 },
55  {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
56  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
57  {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
58  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
59 #elif CPU_MODEL_SAME54P20A
60  { 0, 1, 2, 3, 4, 5, 6, 7, -1, 9, 10, 11, 12, 13, 14, 15,
61  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, 11, -1, -1, 14, 15 },
62  { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
63  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 14, 15 },
64  { 0, 1, 2, 3, 4, 5, 6, 9, -1, -1, 10, 11, 12, 13, 14, 15,
65  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 14, 15 },
66  { 0, 1, -1, -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, -1, -1, -1,
67  -1, -1, -1, -1, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
68 #else
69  #error Please define a proper CPU_MODEL.
70 #endif
71 };
72 
78 #define SPI_HWCS(x) (UINT_MAX - 1)
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif /* PERIPH_CPU_H */
85 
static const int8_t exti_config[4][32]
Mapping of pins to EXTI lines, -1 means not EXTI possible.
Definition: periph_cpu.h:49