|
| 1 | +/* |
| 2 | +
|
| 3 | +Module: Catena4916_getPlatformTable.cpp |
| 4 | +
|
| 5 | +Function: |
| 6 | + Catena4916::getPlatformTable() |
| 7 | +
|
| 8 | +Copyright notice: |
| 9 | + See accompanying LICENSE file. |
| 10 | +
|
| 11 | +Author: |
| 12 | + Pranau R, MCCI Corporation November 2022 |
| 13 | +
|
| 14 | +*/ |
| 15 | + |
| 16 | +#ifdef ARDUINO_ARCH_STM32 |
| 17 | + |
| 18 | +#include "Catena4916.h" |
| 19 | + |
| 20 | +#include "Catena_Log.h" |
| 21 | +#include "Catena_Platforms.h" |
| 22 | +#include "Catena_Guids.h" |
| 23 | + |
| 24 | +/****************************************************************************\ |
| 25 | +| |
| 26 | +| Read-only data. |
| 27 | +| |
| 28 | +\****************************************************************************/ |
| 29 | + |
| 30 | +namespace McciCatena { |
| 31 | + |
| 32 | +const CATENA_PLATFORM gkPlatformCatena4916 = |
| 33 | + { |
| 34 | + Guid: GUID_HW_CATENA_4916_BASE(WIRE), |
| 35 | + pParent: &gkPlatformCatena4916, |
| 36 | + PlatformFlags: |
| 37 | + CatenaBase::fHasLoRa | |
| 38 | + CatenaBase::fHasTtnNycLoRa | |
| 39 | + CatenaBase::fHasSHT3x | |
| 40 | + CatenaBase::fHasBme680 | |
| 41 | + CatenaBase::fHasADS131M04 | |
| 42 | + CatenaBase::fHasSAMM8Q | |
| 43 | + CatenaBase::fHasFRAM | |
| 44 | + CatenaBase::fHasFlash |
| 45 | + }; |
| 46 | + |
| 47 | +const CATENA_PLATFORM (* const Catena4916::vPlatforms[]) = |
| 48 | + { |
| 49 | + // entry 0 is the default |
| 50 | + &gkPlatformCatena4916, |
| 51 | + }; |
| 52 | + |
| 53 | +const size_t Catena4916::nvPlatforms = sizeof(Catena4916::vPlatforms) / sizeof(Catena4916::vPlatforms[0]); |
| 54 | + |
| 55 | +/* |
| 56 | +
|
| 57 | +Name: Catena4916::getPlatformTable() |
| 58 | +
|
| 59 | +Function: |
| 60 | + Get the known platform table. |
| 61 | +
|
| 62 | +Definition: |
| 63 | + public: virtual |
| 64 | + void Catena4916::getPlatformTable( |
| 65 | + const CATENA_PLATFORM * const * &vPlatforms, |
| 66 | + size_t &nvPlatforms |
| 67 | + ) override; |
| 68 | +
|
| 69 | +Description: |
| 70 | + This override for getPlatformTable() returns the vector of platform |
| 71 | + GUIDs for this Catena. |
| 72 | +
|
| 73 | +Returns: |
| 74 | + vPlatforms is set to the base of the array of pointers to platform |
| 75 | + stuctures; and nvPlatforms is set to the number of entries in |
| 76 | + the table. |
| 77 | +
|
| 78 | +*/ |
| 79 | + |
| 80 | +/* public virtual override */ |
| 81 | +void |
| 82 | +Catena4916::getPlatformTable( |
| 83 | + const CATENA_PLATFORM * const * &result_vPlatforms, |
| 84 | + size_t &result_nvPlatforms |
| 85 | + ) |
| 86 | + { |
| 87 | + result_vPlatforms = vPlatforms; |
| 88 | + result_nvPlatforms = nvPlatforms; |
| 89 | + } |
| 90 | + |
| 91 | +} /* namespace McciCatena */ |
| 92 | + |
| 93 | +#endif // ARDUINO_ARCH_STM32 |
0 commit comments