uC chip interface arduino  0.9.0
A interface for async and neuromrphic IC testing
Loading...
Searching...
No Matches
uc_boards.h
Go to the documentation of this file.
1/*
2 This file is part of the Firmware project to interface with small Async or Neuromorphic chips
3 Copyright (C) 2023 Ole Richter - University of Groningen
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
17*/
18
19#ifndef UC_BOARDS_H
20#define UC_BOARDS_H
21
22enum firmware_version : uint8_t {
26};
27
28#if defined(ARDUINO_TEENSY41)
29
30#define INPUT_BUFFER_SIZE 4096
31#define OUTPUT_BUFFER_SIZE 4096
32
33#define NUMBER_OF_DIGITAL_PINS 55
34
35#define I2C_NUMBER_OF_INTERFACES 3
36enum I2C_PORTS: uint8_t {
37 I2C_SCL_PORT = 19U,
38 I2C_SDA_PORT = 18U,
39 I2C_SDA1_PORT = 17U,
40 I2C_SCL1_PORT = 16U,
41 I2C_SDA2_PORT = 25U,
42 I2C_SCL2_PORT = 24U,
43};
44#define SPI_NUMBER_OF_INTERFACES 3
45enum SPI_PORTS: uint8_t {
46 SPI_SCK_PORT = 13U,
47 SPI_COPI_PORT = 11U,
48 SPI_CIPO_PORT = 12U,
49 SPI_SCK1_PORT = 27U,
50 SPI_COPI1_PORT = 26U,
51 SPI_CIPO1_PORT = 1U,
52 SPI_SCK2_PORT = 45U,
53 SPI_COPI2_PORT = 43U,
54 SPI_CIPO2_PORT = 42U,
55};
56
57#elif defined(ARDUINO_TEENSY40)
58
59#define INPUT_BUFFER_SIZE 4096
60#define OUTPUT_BUFFER_SIZE 4096
61
62#define NUMBER_OF_DIGITAL_PINS 40
63
64#define I2C_NUMBER_OF_INTERFACES 3
65enum I2C_PORTS: uint8_t {
66 I2C_SCL_PORT = 19U,
67 I2C_SDA_PORT = 18U,
68 I2C_SDA1_PORT = 17U,
69 I2C_SCL1_PORT = 16U,
70 I2C_SDA2_PORT = 25U,
71 I2C_SCL2_PORT = 24U,
72};
73#define SPI_NUMBER_OF_INTERFACES 3
74enum SPI_PORTS: uint8_t {
75 SPI_SCK_PORT = 13U,
76 SPI_COPI_PORT = 11U,
77 SPI_CIPO_PORT = 12U,
78 SPI_SCK1_PORT = 27U,
79 SPI_COPI1_PORT = 26U,
80 SPI_CIPO1_PORT = 1U,
81 SPI_SCK2_PORT = 45U,
82 SPI_COPI2_PORT = 43U,
83 SPI_CIPO2_PORT = 42U,
84};
85
86#elif defined(USE_ARDUINO_MKR_PIN_LAYOUT)
87
88#define INPUT_BUFFER_SIZE 512
89#define OUTPUT_BUFFER_SIZE 512
90
91#define NUMBER_OF_DIGITAL_PINS 22
92
93#define I2C_NUMBER_OF_INTERFACES 1
94enum I2C_PORTS: uint8_t {
95 I2C_SCL_PORT = 12U,
96 I2C_SDA_PORT = 11U,
97};
98#define SPI_NUMBER_OF_INTERFACES 1
99enum SPI_PORTS: uint8_t {
100 SPI_SCK_PORT = 9U,
101 SPI_COPI_PORT = 8U,
102 SPI_CIPO_PORT = 10U,
103};
104
105#else // defined(ARDUINO_SAMD_ZERO)
106
107#define INPUT_BUFFER_SIZE 512
108#define OUTPUT_BUFFER_SIZE 512
109
110#define NUMBER_OF_DIGITAL_PINS 22
111
112#define I2C_NUMBER_OF_INTERFACES 1
113enum I2C_PORTS: uint8_t {
116};
117#define SPI_NUMBER_OF_INTERFACES 1
118enum SPI_PORTS: uint8_t {
122};
123#endif
124
125#endif
SPI_PORTS
Definition: uc_boards.h:118
@ SPI_SCK_PORT
Definition: uc_boards.h:119
@ SPI_COPI_PORT
Definition: uc_boards.h:120
@ SPI_CIPO_PORT
Definition: uc_boards.h:121
firmware_version
Definition: uc_boards.h:22
@ VERSION_MINOR
Definition: uc_boards.h:24
@ VERSION_PATCH
Definition: uc_boards.h:25
@ VERSION_MAJOR
Definition: uc_boards.h:23
I2C_PORTS
Definition: uc_boards.h:113
@ I2C_SDA_PORT
Definition: uc_boards.h:115
@ I2C_SCL_PORT
Definition: uc_boards.h:114