-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathArduino_10BASE_T1S.h
52 lines (45 loc) · 1.97 KB
/
Arduino_10BASE_T1S.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* This file is part of the Arduino_10BASE_T1S library.
*
* Copyright (c) 2024 Arduino SA
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
/**************************************************************************************
* INCLUDE
**************************************************************************************/
#include "Arduino_10BASE_T1S_PHY_Interface.h"
#include "Arduino_10BASE_T1S_UDP.h"
#include "microchip/TC6_Arduino_10BASE_T1S.h"
#include "lib/liblwip/include/lwip/netif.h"
#include "lib/liblwip/include/lwip/init.h"
#include "lib/liblwip/include/lwip/timeouts.h"
#include "lib/liblwip/include/netif/etharp.h"
#include "lib/liblwip/include/lwip/mem.h"
#include "lib/liblwip/include/lwip/memp.h"
#include "lib/liblwip/include/lwip/udp.h"
/**************************************************************************************
* CONSTANTS
**************************************************************************************/
#if defined(ARDUINO_SAMD_ZERO) || defined(ARDUINO_MINIMA) || defined(ARDUINO_UNOWIFIR4) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_GIGA)
/* Those are all boards with the Arduino Uno form factor for the T1S shield. */
static int const CS_PIN = 9;
static int const RESET_PIN = 4;
static int const IRQ_PIN = 2;
#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_PORTENTA_H7_M4)
/* Pro Demo kit on MID carrier, UNO form factor */
#include "pinDefinitions.h"
static int const CS_PIN = PinNameToIndex(PH_6);
static int const RESET_PIN = PinNameToIndex(PJ_11);
static int const IRQ_PIN = PinNameToIndex(PC_7);
#elif defined(ARDUINO_PORTENTA_C33)
/* Pro Demo kit on MID carrier, UNO form factor */
static int const CS_PIN = 25;
static int const RESET_PIN = 4;
static int const IRQ_PIN = 2;
#else
# error "No pins defined for your board"
#endif