mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-03-28 18:06:37 +01:00
Integrate many changes from master
This commit is contained in:
23
lib/hardware/GwChannelModes.h
Normal file
23
lib/hardware/GwChannelModes.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
This code is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
This code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
defines for the channel modes(types)
|
||||
*/
|
||||
#ifndef _GWCHANNELMODES_H
|
||||
#define _GWCHANNELMODES_H
|
||||
#define GWSERIAL_TYPE_UNI 1
|
||||
#define GWSERIAL_TYPE_BI 2
|
||||
#define GWSERIAL_TYPE_RX 3
|
||||
#define GWSERIAL_TYPE_TX 4
|
||||
#define GWSERIAL_TYPE_UNK 0
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
This code is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
This code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
@@ -20,11 +20,7 @@
|
||||
#endif
|
||||
#ifndef _GWHARDWARE_H
|
||||
#define _GWHARDWARE_H
|
||||
#define GWSERIAL_TYPE_UNI 1
|
||||
#define GWSERIAL_TYPE_BI 2
|
||||
#define GWSERIAL_TYPE_RX 3
|
||||
#define GWSERIAL_TYPE_TX 4
|
||||
#define GWSERIAL_TYPE_UNK 0
|
||||
#include "GwChannelModes.h"
|
||||
#include <GwConfigItem.h>
|
||||
#include <HardwareSerial.h>
|
||||
#include "GwAppInfo.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
This code is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
This code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
@@ -35,7 +35,12 @@
|
||||
#ifdef M5_GPS_KIT
|
||||
GWRESOURCE_USE(BASE,M5_GPS_KIT)
|
||||
GWRESOURCE_USE(SERIAL1,M5_GPS_KIT)
|
||||
#define _GWI_SERIAL1 BOARD_LEFT1,-1,GWSERIAL_TYPE_UNI,9600
|
||||
#define _GWI_SERIAL1 BOARD_LEFT1,-1,GWSERIAL_TYPE_RX,9600
|
||||
#endif
|
||||
#ifdef M5_GPSV2_KIT
|
||||
GWRESOURCE_USE(BASE,M5_GPSV2_KIT)
|
||||
GWRESOURCE_USE(SERIAL1,M5_GPSV2_KIT)
|
||||
#define _GWI_SERIAL1 BOARD_LEFT1,-1,GWSERIAL_TYPE_RX,115200
|
||||
#endif
|
||||
|
||||
//M5 ProtoHub
|
||||
@@ -61,11 +66,11 @@
|
||||
#endif
|
||||
|
||||
//can kit for M5 Atom
|
||||
#ifdef M5_CAN_KIT
|
||||
#if defined (M5_CAN_KIT)
|
||||
GWRESOURCE_USE(BASE,M5_CAN_KIT)
|
||||
GWRESOURCE_USE(CAN,M5_CANKIT)
|
||||
#define ESP32_CAN_TX_PIN BOARD_LEFT1
|
||||
#define ESP32_CAN_RX_PIN BOARD_LEFT2
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
This code is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
This code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
This code is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
This code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
@@ -43,6 +43,13 @@
|
||||
#define _GWI_SERIAL_GROOVE$GS$ GWSERIAL_TYPE_RX,9600
|
||||
#endif
|
||||
|
||||
#GROVE
|
||||
//https://docs.m5stack.com/en/unit/Unit-GPS%20v1.1
|
||||
#ifdef M5_GPSV11_UNIT$GS$
|
||||
GWRESOURCE_USE(GROOVE$G$,M5_GPSV11_UNIT$GS$)
|
||||
#define _GWI_SERIAL_GROOVE$GS$ GWSERIAL_TYPE_RX,115200
|
||||
#endif
|
||||
|
||||
#GROVE
|
||||
//CAN via groove
|
||||
#ifdef M5_CANUNIT$GS$
|
||||
@@ -64,15 +71,15 @@
|
||||
#endif
|
||||
|
||||
#GROVE
|
||||
//#ifdef M5_ENV4$GS$
|
||||
// #ifndef M5_GROOVEIIC$GS$
|
||||
// #define M5_GROOVEIIC$GS$
|
||||
// #endif
|
||||
// GROOVE_IIC(SHT3X,$Z$,1)
|
||||
// GROOVE_IIC(BMP280,$Z$,1)
|
||||
// #define _GWSHT3X
|
||||
// #define _GWBMP280
|
||||
//#endif
|
||||
#ifdef M5_ENV4$GS$
|
||||
#ifndef M5_GROOVEIIC$GS$
|
||||
#define M5_GROOVEIIC$GS$
|
||||
#endif
|
||||
GROOVE_IIC(SHT4X,$Z$,1)
|
||||
GROOVE_IIC(BMP280,$Z$,1)
|
||||
#define _GWSHT4X
|
||||
#define _GWBMP280
|
||||
#endif
|
||||
|
||||
#GROVE
|
||||
//example: -DSHT3XG1_A : defines STH3Xn1 on grove A - x depends on the other devices
|
||||
@@ -93,6 +100,25 @@
|
||||
#define _GWSHT3X
|
||||
#endif
|
||||
|
||||
#GROVE
|
||||
//example: -DSHT4XG1_A : defines STH4Xn1 on grove A - x depends on the other devices
|
||||
#ifdef GWSHT4XG1$GS$
|
||||
#ifndef M5_GROOVEIIC$GS$
|
||||
#define M5_GROOVEIIC$GS$
|
||||
#endif
|
||||
GROOVE_IIC(SHT4X,$Z$,1)
|
||||
#define _GWSHT4X
|
||||
#endif
|
||||
|
||||
#GROVE
|
||||
#ifdef GWSHT4XG2$GS$
|
||||
#ifndef M5_GROOVEIIC$GS$
|
||||
#define M5_GROOVEIIC$GS$
|
||||
#endif
|
||||
GROOVE_IIC(SHT4X,$Z$,2)
|
||||
#define _GWSHT4X
|
||||
#endif
|
||||
|
||||
#GROVE
|
||||
#ifdef GWQMP6988G1$GS$
|
||||
#ifndef M5_GROOVEIIC$GS$
|
||||
|
||||
Reference in New Issue
Block a user