Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #342: added support to Catena 4610 Version 2 #343

Merged
merged 5 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion src/CatenaBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/Catena_Guids.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/Catena_Platforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
14 changes: 14 additions & 0 deletions src/lib/stm32/catena461x/Catena4610_getPlatformTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down