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

Added support to Catena 4618 and Catena 4612 Vesrion 2 #347

Merged
merged 2 commits into from
Jun 26, 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 [#346](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/346): add support to Catena4618 and Catena 4612 with LTR329 sensor (v0.22.0-pre7)
- 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 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, 5) /* v0.22.0-pre5 */
CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 22, 0, 7) /* v0.22.0-pre7 */

#define CATENA_ARDUINO_PLATFORM_VERSION_GET_MAJOR(v) \
(((v) >> 24u) & 0xFFu)
Expand Down
8 changes: 8 additions & 0 deletions src/Catena_Guids.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ Copyright notice:
#define GUID_HW_CATENA_4612_M104(f) \
MCCIADK_GUID_GEN_INIT(f, 0xdea48489, 0xcdac, 0x43f4, 0xb8, 0xad, 0xed, 0xb0, 0x8c, 0xe2, 0x15, 0x46)

// {4330325d-4be8-410a-9b55-0fda4fbd1977}
#define GUID_HW_CATENA_4612_V2_BASE(f) \
MCCIADK_GUID_GEN_INIT(f, 0x4330325d, 0x4be8, 0x410a, 0x9b, 0x55, 0x0f, 0xda, 0x4f, 0xbd, 0x19, 0x77)

// {6767c2f6-d5d5-43f4-81af-db0d4d08815a}
#define GUID_HW_CATENA_4617_BASE(f) \
MCCIADK_GUID_GEN_INIT(f, 0x6767c2f6, 0xd5d5, 0x43f4, 0x81, 0xaf, 0xdb, 0x0d, 0x4d, 0x08, 0x81, 0x5a)
Expand All @@ -225,6 +229,10 @@ Copyright notice:
#define GUID_HW_CATENA_4618_BASE(f) \
MCCIADK_GUID_GEN_INIT(f, 0xb75ed77b, 0xb06e, 0x4b26, 0xa9, 0x68, 0x9c, 0x15, 0xf2, 0x22, 0xdf, 0xb2)

// {5a3dbd81-0fd4-428a-93e6-5862b0b35130}
#define GUID_HW_CATENA_4618_V2_BASE(f) \
MCCIADK_GUID_GEN_INIT(f, 0x5a3dbd81, 0x0fd4, 0x428a, 0x93, 0xe6, 0x58, 0x62, 0xb0, 0xb3, 0x51, 0x30)

// {17281c12-d78a-4e4f-9c42-c8bbc5499c91}
#define GUID_HW_CATENA_4630_BASE(f) \
MCCIADK_GUID_GEN_INIT(f, 0x17281c12, 0xd78a, 0x4e4f, 0x9c, 0x42, 0xc8, 0xbb, 0xc5, 0x49, 0x9c, 0x91)
Expand Down
2 changes: 2 additions & 0 deletions src/Catena_Platforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ extern const CATENA_PLATFORM gkPlatformCatena4612_m101;
extern const CATENA_PLATFORM gkPlatformCatena4612_m102;
extern const CATENA_PLATFORM gkPlatformCatena4612_m103;
extern const CATENA_PLATFORM gkPlatformCatena4612_m104;
extern const CATENA_PLATFORM gkPlatformCatena4612_v2;
extern const CATENA_PLATFORM gkPlatformCatena4617;
extern const CATENA_PLATFORM gkPlatformCatena4618;
extern const CATENA_PLATFORM gkPlatformCatena4618_v2;

extern const CATENA_PLATFORM gkPlatformCatena4630;

Expand Down
14 changes: 14 additions & 0 deletions src/lib/stm32/catena461x/Catena4612_getPlatformTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ const CATENA_PLATFORM gkPlatformCatena4612_m104 =
CatenaBase::fM104
};

const CATENA_PLATFORM gkPlatformCatena4612_v2 =
{
Guid: GUID_HW_CATENA_4612_V2_BASE(WIRE),
pParent: &gkPlatformCatena4612,
PlatformFlags:
CatenaBase::fHasLoRa |
CatenaBase::fHasTtnNycLoRa |
CatenaBase::fHasBme280 |
CatenaBase::fHasLuxLtr329 |
CatenaBase::fHasFRAM |
CatenaBase::fHasFlash
};

const CATENA_PLATFORM (* const Catena4612::vPlatforms[]) =
{
// entry 0 is the default
Expand All @@ -122,6 +135,7 @@ const CATENA_PLATFORM (* const Catena4612::vPlatforms[]) =
&gkPlatformCatena4612_m102,
&gkPlatformCatena4612_m103,
&gkPlatformCatena4612_m104,
&gkPlatformCatena4612_v2,
};

const size_t Catena4612::nvPlatforms = sizeof(Catena4612::vPlatforms) / sizeof(Catena4612::vPlatforms[0]);
Expand Down
14 changes: 14 additions & 0 deletions src/lib/stm32/catena461x/Catena4618_getPlatformTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,24 @@ const CATENA_PLATFORM gkPlatformCatena4618 =
CatenaBase::fHasFlash
};

const CATENA_PLATFORM gkPlatformCatena4618_v2 =
{
Guid: GUID_HW_CATENA_4618_V2_BASE(WIRE),
pParent: &gkPlatformCatena4618,
PlatformFlags:
CatenaBase::fHasLoRa |
CatenaBase::fHasTtnNycLoRa |
CatenaBase::fHasSHT3x |
CatenaBase::fHasLuxLtr329 |
CatenaBase::fHasFRAM |
CatenaBase::fHasFlash
};

const CATENA_PLATFORM (* const Catena4618::vPlatforms[]) =
{
// entry 0 is the default
&gkPlatformCatena4618,
&gkPlatformCatena4618_v2,
};

const size_t Catena4618::nvPlatforms = sizeof(Catena4618::vPlatforms) / sizeof(Catena4618::vPlatforms[0]);
Expand Down