From 60018c0397c92fd2ec9ac1eb647d3fec3efce4d7 Mon Sep 17 00:00:00 2001 From: Twilight-Logic Date: Fri, 16 Feb 2024 19:34:07 +0000 Subject: [PATCH] Added layouts for ESP32 boards --- src/AR488/AR488.ino | 2 +- src/AR488/AR488_Config.h | 13 ++-- src/AR488/AR488_Layouts.cpp | 2 +- src/AR488/AR488_Layouts.h | 137 ++++++++++++++++++++++++++++++++++-- 4 files changed, 142 insertions(+), 12 deletions(-) diff --git a/src/AR488/AR488.ino b/src/AR488/AR488.ino index 0f1f2a8..086e3c4 100644 --- a/src/AR488/AR488.ino +++ b/src/AR488/AR488.ino @@ -14,7 +14,7 @@ #include "AR488_Eeprom.h" -/***** FWVER "AR488 GPIB controller, ver. 0.51.26, 24/12/2023" *****/ +/***** FWVER "AR488 GPIB controller, ver. 0.51.28, 16/02/2024" *****/ /* Arduino IEEE-488 implementation by John Chajecki diff --git a/src/AR488/AR488_Config.h b/src/AR488/AR488_Config.h index 40770cb..2ff6596 100644 --- a/src/AR488/AR488_Config.h +++ b/src/AR488/AR488_Config.h @@ -7,7 +7,7 @@ /***** Firmware version *****/ -#define FWVER "AR488 GPIB controller, ver. 0.51.26, 24/12/2023" +#define FWVER "AR488 GPIB controller, ver. 0.51.28, 16/02/2024" @@ -65,10 +65,15 @@ /* Board/layout selection */ #define AR488_MEGA644P_MCGRAW -/***** ESP 32 VROOM-32 *****/ +/***** ESP32 boards *****/ #elif defined(ESP32) - #define NON_ARDUINO - #define ESP32_WROOM_32 + #define NON_ARDUINO // MUST BE DEFINED! + #define ESP32_DEVKIT1_WROOM_32 + // David Douard / Johann Wilhelm board layouts + //#define ESP32_TTGO_T8_161 + //#define ESP32_ESP32DEV + //#define ESP32_LOLIN32_161 // ESP32_LOLIN32_161_V2 profile has the same pin assigments + //#define ESP32_S2_161 /***** RPI PIco and Pico W *****/ //#elif defined(ARDUINO_ARCH_RP2040) diff --git a/src/AR488/AR488_Layouts.cpp b/src/AR488/AR488_Layouts.cpp index c9d1435..cb5454e 100644 --- a/src/AR488/AR488_Layouts.cpp +++ b/src/AR488/AR488_Layouts.cpp @@ -3,7 +3,7 @@ #include "AR488_Config.h" #include "AR488_Layouts.h" -/***** AR488_Hardware.cpp, ver. 0.51.26, 24/12/2023 *****/ +/***** AR488_Hardware.cpp, ver. 0.51.28, 16/02/2024 *****/ /* * Hardware layout function definitions */ diff --git a/src/AR488/AR488_Layouts.h b/src/AR488/AR488_Layouts.h index f83ecb3..586734d 100644 --- a/src/AR488/AR488_Layouts.h +++ b/src/AR488/AR488_Layouts.h @@ -6,7 +6,7 @@ #include "AR488_Config.h" -/***** AR488_Hardware.h, ver. 0.51.26, 24/12/2023 *****/ +/***** AR488_Hardware.h, ver. 0.51.28, 16/02/2024 *****/ /* * Hardware pin layout definitions */ @@ -316,7 +316,7 @@ uint8_t getMcpIntAReg(); /***********************************/ /***** ESP32 LAYOUT DEFINITION *****/ /***** vvvvvvvvvvvvvvvvvvvvvvv *****/ -#ifdef ESP32_WROOM_32 +#ifdef ESP32_DEVKIT1_WROOM_32 #define DIO1_PIN 32 /* GPIB 1 */ #define DIO2_PIN 33 /* GPIB 2 */ @@ -327,9 +327,9 @@ uint8_t getMcpIntAReg(); #define DIO7_PIN 4 /* GPIB 15 */ #define DIO8_PIN 13 /* GPIB 16 */ -#define IFC_PIN 23 /* GPIB 9 */ -#define NDAC_PIN 22 /* GPIB 8 */ -#define NRFD_PIN 21 /* GPIB 7 */ +#define IFC_PIN 23 /* GPIB 9 */ +#define NDAC_PIN 22 /* GPIB 8 */ +#define NRFD_PIN 21 /* GPIB 7 */ #define DAV_PIN 19 /* GPIB 6 */ #define EOI_PIN 18 /* GPIB 5 */ @@ -337,13 +337,138 @@ uint8_t getMcpIntAReg(); #define REN_PIN 17 /* GPIB 17 */ #define ATN_PIN 16 /* GPIB 11 */ -#endif // ESP32_WROOM_32 +#endif // ESP32_DEVKIT1_WROOM_32 /***** ^^^^^^^^^^^^^^^^^^^^^^^ *****/ /***** ESP32 LAYOUT DEFINITION *****/ /***********************************/ +/***********************************************/ +/***** ESP32_TTGO_T8_161 LAYOUT DEFINITION *****/ +/***** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv *****/ +#ifdef ESP32_TTGO_T8_161 + +#define DIO1_PIN 34 /* GPIB 1 */ +#define DIO2_PIN 35 /* GPIB 2 */ +#define DIO3_PIN 32 /* GPIB 3 */ +#define DIO4_PIN 33 /* GPIB 4 */ +#define DIO5_PIN 25 /* GPIB 13 */ +#define DIO6_PIN 26 /* GPIB 14 */ +#define DIO7_PIN 27 /* GPIB 15 */ +#define DIO8_PIN 14 /* GPIB 16 */ + +#define IFC_PIN 15 /* GPIB 9 */ +#define NDAC_PIN 22 /* GPIB 8 */ +#define NRFD_PIN 19 /* GPIB 7 */ +#define DAV_PIN 23 /* GPIB 6 */ +#define EOI_PIN 18 /* GPIB 5 */ + +#define SRQ_PIN 2 /* GPIB 10 */ +#define REN_PIN 13 /* GPIB 17 */ +#define ATN_PIN 5 /* GPIB 11 */ + +#endif // ESP32_TTGO_T8_161 +/***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *****/ +/***** ESP32_TTGO_T8_161 LAYOUT DEFINITION *****/ +/****************************************************/ + + + +/********************************************/ +/***** ESP32_ESP32DEV LAYOUT DEFINITION *****/ +/***** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv *****/ +#ifdef ESP32_ESP32DEV + +#define DIO1_PIN 33 /* GPIB 1 */ +#define DIO2_PIN 32 /* GPIB 2 */ +#define DIO3_PIN 26 /* GPIB 3 */ +#define DIO4_PIN 25 /* GPIB 4 */ +#define DIO5_PIN 14 /* GPIB 13 */ +#define DIO6_PIN 27 /* GPIB 14 */ +#define DIO7_PIN 13 /* GPIB 15 */ +#define DIO8_PIN 12 /* GPIB 16 */ + +#define IFC_PIN 22 /* GPIB 9 */ +#define NDAC_PIN 21 /* GPIB 8 */ +#define NRFD_PIN 19 /* GPIB 7 */ +#define DAV_PIN 18 /* GPIB 6 */ +#define EOI_PIN 17 /* GPIB 5 */ + +#define SRQ_PIN 16 /* GPIB 10 */ +#define REN_PIN 23 /* GPIB 17 */ +#define ATN_PIN 4 /* GPIB 11 */ + +#endif // ESP32_ESP32DEV +/***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *****/ +/***** ESP32_ESP32DEV LAYOUT DEFINITION *****/ +/********************************************/ + + + +/***********************************************/ +/***** ESP32_LOLIN32_161 LAYOUT DEFINITION *****/ +/***** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv *****/ +#ifdef ESP32_LOLIN32_161 + +#define DIO1_PIN 32 /* GPIB 1 */ +#define DIO2_PIN 33 /* GPIB 2 */ +#define DIO3_PIN 25 /* GPIB 3 */ +#define DIO4_PIN 26 /* GPIB 4 */ +#define DIO5_PIN 27 /* GPIB 13 */ +#define DIO6_PIN 14 /* GPIB 14 */ +#define DIO7_PIN 12 /* GPIB 15 */ +#define DIO8_PIN 13 /* GPIB 16 */ + +#define IFC_PIN 21 /* GPIB 9 */ +#define NDAC_PIN 19 /* GPIB 8 */ +#define NRFD_PIN 23 /* GPIB 7 */ +#define DAV_PIN 18 /* GPIB 6 */ +#define EOI_PIN 17 /* GPIB 5 */ + +#define SRQ_PIN 4 /* GPIB 10 */ +#define REN_PIN 22 /* GPIB 17 */ +#define ATN_PIN 16 /* GPIB 11 */ + +#endif // ESP32_LOLIN32_161 +/***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *****/ +/***** ESP32_LOLIN32_161 LAYOUT DEFINITION *****/ +/***********************************************/ + + + +/***********************************************/ +/***** ESP32_S2_161 LAYOUT DEFINITION *****/ +/***** vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv *****/ +#ifdef ESP32_S2_161 + +#define DIO1_PIN 1 /* GPIB 1 */ +#define DIO2_PIN 2 /* GPIB 2 */ +#define DIO3_PIN 3 /* GPIB 3 */ +#define DIO4_PIN 4 /* GPIB 4 */ +#define DIO5_PIN 5 /* GPIB 13 */ +#define DIO6_PIN 6 /* GPIB 14 */ +#define DIO7_PIN 7 /* GPIB 15 */ +#define DIO8_PIN 8 /* GPIB 16 */ + +#define IFC_PIN 10 /* GPIB 9 */ +#define NDAC_PIN 11 /* GPIB 8 */ +#define NRFD_PIN 12 /* GPIB 7 */ +#define DAV_PIN 13 /* GPIB 6 */ +#define EOI_PIN 14 /* GPIB 5 */ + +#define SRQ_PIN 16 /* GPIB 10 */ +#define REN_PIN 9 /* GPIB 17 */ +#define ATN_PIN 15 /* GPIB 11 */ + +#endif // ESP32_S2_161 +/***** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ *****/ +/***** ESP32_S2_161 LAYOUT DEFINITION *****/ +/***********************************************/ + + + + /*************************************/ /***** PI PICO LAYOUT DEFINITION *****/ /***** vvvvvvvvvvvvvvvvvvvvvvvvv *****/