Skip to content

Commit

Permalink
fix #346: added support for Catena 4612 V2
Browse files Browse the repository at this point in the history
  • Loading branch information
dhineshkumarmcci committed Jun 26, 2023
1 parent 9983509 commit 7c71f21
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +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 with LTR329 sensor (v0.22.0-pre6)
- 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, 6) /* v0.22.0-pre6 */
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
6 changes: 5 additions & 1 deletion 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 @@ -226,7 +230,7 @@ Copyright notice:
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) \
#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}
Expand Down
1 change: 1 addition & 0 deletions src/Catena_Platforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ 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;
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

0 comments on commit 7c71f21

Please sign in to comment.