diff --git a/README.md b/README.md index a4a0a86..a2d5de7 100644 --- a/README.md +++ b/README.md @@ -1448,6 +1448,7 @@ This sketch demonstrates the use of the Catena FSM class to implement the `Turns - HEAD includes the following changes + - fix [#342](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/342): add support to Catena4610 version-2 (v0.22.0-pre5). - fix [#319](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/319): accomodate missing two-arg `UsbSerial::begin()` (v0.21.3-pre1). - fix [#321](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/321): add 24-bit float encoding support (v0.22.0-pre1). diff --git a/library.properties b/library.properties index 41be3ee..506045f 100644 --- a/library.properties +++ b/library.properties @@ -9,4 +9,4 @@ architectures=samd,stm32 url=https://github.com/mcci-catena/Catena-Arduino-Platform dot_a_linkage=true includes=Catena.h -depends=MCCI LoRaWAN LMIC library,MCCI Arduino LoRaWAN Library,MCCI Arduino Development Kit ADK,MCCI FRAM I2C +depends=MCCI LoRaWAN LMIC library,MCCI Arduino LoRaWAN Library,MCCI Arduino Development Kit ADK,MCCI FRAM I2C,MCCI LTR 329ALS diff --git a/src/CatenaBase.h b/src/CatenaBase.h index d53120a..1415b69 100644 --- a/src/CatenaBase.h +++ b/src/CatenaBase.h @@ -57,7 +57,7 @@ Copyright notice: (((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local)) #define CATENA_ARDUINO_PLATFORM_VERSION \ - CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 22, 0, 4) /* v0.22.0-pre4 */ + CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 22, 0, 5) /* v0.22.0-pre5 */ #define CATENA_ARDUINO_PLATFORM_VERSION_GET_MAJOR(v) \ (((v) >> 24u) & 0xFFu) @@ -210,6 +210,8 @@ class CatenaBase fHasSHT3x = 1 << 20, //platform has I2C Level Shifter fHasI2cLevelShifter = 1 << 21, + //platform has LTR329 Lux sensor + fHasLuxLtr329 = 1 << 22, // special wiring variants all are offsets from M100... // we support up to 127 variants, becuase we have 7 diff --git a/src/Catena_Guids.h b/src/Catena_Guids.h index 30f6d1a..1f5eae9 100644 --- a/src/Catena_Guids.h +++ b/src/Catena_Guids.h @@ -173,6 +173,10 @@ Copyright notice: #define GUID_HW_CATENA_4610_M104(f) \ MCCIADK_GUID_GEN_INIT(f, 0xbfed4740, 0xa58a, 0x4ef6, 0x93, 0x3a, 0x09, 0xcb, 0x22, 0xe9, 0x3d, 0x00) +// {5a600501-c3cd-4c3f-bdcc-cd6502abe95a} +#define GUID_HW_CATENA_4610_V2_BASE(f) \ + MCCIADK_GUID_GEN_INIT(f, 0x5a600501, 0xc3cd, 0x4c3f, 0xbd, 0xcc, 0xcd, 0x65, 0x02, 0xab, 0xe9, 0x5a) + // {9bb29dca-0685-4837-8182-3dfa309d279f} #define GUID_HW_CATENA_4611_BASE(f) \ MCCIADK_GUID_GEN_INIT(f, 0x9bb29dca, 0x0685, 0x4837, 0x81, 0x82, 0x3d, 0xfa, 0x30, 0x9d, 0x27, 0x9f) diff --git a/src/Catena_Platforms.h b/src/Catena_Platforms.h index b641f61..19eda00 100644 --- a/src/Catena_Platforms.h +++ b/src/Catena_Platforms.h @@ -61,6 +61,7 @@ extern const CATENA_PLATFORM gkPlatformCatena4610_m101; extern const CATENA_PLATFORM gkPlatformCatena4610_m102; extern const CATENA_PLATFORM gkPlatformCatena4610_m103; extern const CATENA_PLATFORM gkPlatformCatena4610_m104; +extern const CATENA_PLATFORM gkPlatformCatena4610_v2; extern const CATENA_PLATFORM gkPlatformCatena4611; extern const CATENA_PLATFORM gkPlatformCatena4611_m101; extern const CATENA_PLATFORM gkPlatformCatena4611_m102; diff --git a/src/lib/stm32/catena461x/Catena4610_getPlatformTable.cpp b/src/lib/stm32/catena461x/Catena4610_getPlatformTable.cpp index dbaf7ba..6f3ef88 100644 --- a/src/lib/stm32/catena461x/Catena4610_getPlatformTable.cpp +++ b/src/lib/stm32/catena461x/Catena4610_getPlatformTable.cpp @@ -114,9 +114,23 @@ const CATENA_PLATFORM gkPlatformCatena4610_m104 = CatenaBase::fM104 }; +const CATENA_PLATFORM gkPlatformCatena4610_v2 = + { + Guid: GUID_HW_CATENA_4610_V2_BASE(WIRE), + pParent: &gkPlatformCatena4610, + PlatformFlags: + CatenaBase::fHasLoRa | + CatenaBase::fHasTtnNycLoRa | + CatenaBase::fHasSHT3x | + CatenaBase::fHasLuxLtr329 | + CatenaBase::fHasFRAM | + CatenaBase::fHasFlash + }; + const CATENA_PLATFORM (* const Catena4610::vPlatforms[]) = { // entry 0 is the default + &gkPlatformCatena4610_v2, &gkPlatformCatena4610, &gkPlatformCatena4610_m101, &gkPlatformCatena4610_m102,