-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from mcci-catena/issue135
Fix #135: Added the Platform support for Catena 4630/4617/4618
- Loading branch information
Showing
18 changed files
with
1,028 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
Module: Catena4617.h | ||
Function: | ||
class Catena4617: CatenaBase Platform to represent a Catena 4617 | ||
Copyright notice: | ||
See accompanying LICENSE file. | ||
Author: | ||
Lakshmi Priya Natarajan, MCCI Corporation June 2019 | ||
Revision history: | ||
See https://github.com/mcci-catena/Catena-Arduino-Platform | ||
*/ | ||
|
||
#ifndef _Catena4617_H_ /* prevent multiple includes */ | ||
#define _Catena4617_H_ | ||
|
||
#pragma once | ||
|
||
#ifndef _CATENA461X_H_ | ||
# include "Catena461x.h" | ||
#endif | ||
|
||
namespace McciCatena { | ||
|
||
class Catena4617 : public Catena461x | ||
{ | ||
public: | ||
using Super = Catena461x; | ||
|
||
// no specific constructor. | ||
Catena4617() {}; | ||
|
||
// uses default destructor | ||
|
||
// neither copyable nor movable | ||
Catena4617(const Catena4617&) = delete; | ||
Catena4617& operator=(const Catena4617&) = delete; | ||
Catena4617(const Catena4617&&) = delete; | ||
Catena4617& operator=(const Catena4617&&) = delete; | ||
|
||
virtual const char *CatenaName() const override { return "Catena 4617"; }; | ||
virtual float ReadVbat(void) const override; | ||
virtual float ReadVbus(void) const override; | ||
|
||
protected: | ||
// we are required to provide a table of platforms | ||
virtual void getPlatformTable( | ||
const CATENA_PLATFORM * const * &vPlatforms, | ||
size_t &nvPlatforms | ||
) override; | ||
|
||
private: | ||
// the known platforms | ||
static const CATENA_PLATFORM(* const vPlatforms[]); | ||
static const size_t nvPlatforms; | ||
}; | ||
|
||
} // namespace McciCatena | ||
|
||
/**** end of Catena4617.h ****/ | ||
#endif /* _Catena4617_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
Module: Catena4618.h | ||
Function: | ||
class Catena4618: CatenaBase Platform to represent a Catena 4618 | ||
Copyright notice: | ||
See accompanying LICENSE file. | ||
Author: | ||
Lakshmi Priya Natarajan, MCCI Corporation June 2019 | ||
Revision history: | ||
See https://github.com/mcci-catena/Catena-Arduino-Platform | ||
*/ | ||
|
||
#ifndef _Catena4618_H_ /* prevent multiple includes */ | ||
#define _Catena4618_H_ | ||
|
||
#pragma once | ||
|
||
#ifndef _CATENA461X_H_ | ||
# include "Catena461x.h" | ||
#endif | ||
|
||
namespace McciCatena { | ||
|
||
class Catena4618 : public Catena461x | ||
{ | ||
public: | ||
using Super = Catena461x; | ||
|
||
// no specific constructor. | ||
Catena4618() {}; | ||
|
||
// uses default destructor | ||
|
||
// neither copyable nor movable | ||
Catena4618(const Catena4618&) = delete; | ||
Catena4618& operator=(const Catena4618&) = delete; | ||
Catena4618(const Catena4618&&) = delete; | ||
Catena4618& operator=(const Catena4618&&) = delete; | ||
|
||
virtual const char *CatenaName() const override { return "Catena 4618"; }; | ||
virtual float ReadVbat(void) const override; | ||
virtual float ReadVbus(void) const override; | ||
|
||
protected: | ||
// we are required to provide a table of platforms | ||
virtual void getPlatformTable( | ||
const CATENA_PLATFORM * const * &vPlatforms, | ||
size_t &nvPlatforms | ||
) override; | ||
|
||
private: | ||
// the known platforms | ||
static const CATENA_PLATFORM(* const vPlatforms[]); | ||
static const size_t nvPlatforms; | ||
}; | ||
|
||
} // namespace McciCatena | ||
|
||
/**** end of Catena4618.h ****/ | ||
#endif /* _Catena4618_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
Module: Catena4630.h | ||
Function: | ||
class Catena4630: CatenaBase Platform to represent a Catena 4630. | ||
Copyright notice: | ||
See accompanying LICENSE file. | ||
Author: | ||
Dhinesh Kumar Pitchai, MCCI Corporation April 2019 | ||
*/ | ||
|
||
#ifndef _Catena4630_H_ /* prevent multiple includes */ | ||
#define _Catena4630_H_ | ||
|
||
#pragma once | ||
|
||
#ifndef _CATENA463X_H_ | ||
# include "Catena463x.h" | ||
#endif | ||
|
||
namespace McciCatena { | ||
|
||
class Catena4630 : public Catena463x | ||
{ | ||
public: | ||
using Super = Catena463x; | ||
|
||
// no specific constructor. | ||
Catena4630() {}; | ||
|
||
// uses default destructor | ||
|
||
// neither copyable nor movable | ||
Catena4630(const Catena4630&) = delete; | ||
Catena4630& operator=(const Catena4630&) = delete; | ||
Catena4630(const Catena4630&&) = delete; | ||
Catena4630& operator=(const Catena4630&&) = delete; | ||
|
||
virtual const char *CatenaName() const override { return "Catena 4630"; }; | ||
virtual float ReadVbat(void) const override; | ||
virtual float ReadVbus(void) const override; | ||
|
||
protected: | ||
// we are required to provide a table of platforms | ||
virtual void getPlatformTable( | ||
const CATENA_PLATFORM * const * &vPlatforms, | ||
size_t &nvPlatforms | ||
) override; | ||
|
||
private: | ||
// the known platforms | ||
static const CATENA_PLATFORM(* const vPlatforms[]); | ||
static const size_t nvPlatforms; | ||
}; | ||
|
||
} // namespace McciCatena | ||
|
||
/**** end of Catena4630.h ****/ | ||
#endif /* _Catena4630_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* | ||
Module: Catena463x.h | ||
Function: | ||
class Catena463x: CatenaBase Platform to represent a Catena 463x | ||
(such as the 4630). | ||
Copyright notice: | ||
See accompanying LICENSE file. | ||
Author: | ||
Dhinesh Kumar Pitchai, MCCI Corporation April 2019 | ||
*/ | ||
|
||
#ifndef _CATENA463X_H_ /* prevent multiple includes */ | ||
#define _CATENA463X_H_ | ||
|
||
#pragma once | ||
|
||
#ifndef _CATENASTM32L0_H_ | ||
# include "CatenaStm32L0.h" | ||
#endif | ||
|
||
namespace McciCatena { | ||
|
||
class Catena463x : public CatenaStm32L0 | ||
{ | ||
public: | ||
using Super = CatenaStm32L0; | ||
|
||
// no specific constructor. | ||
Catena463x() {}; | ||
|
||
// uses default destructor | ||
|
||
// neither copyable nor movable | ||
Catena463x(const Catena463x&) = delete; | ||
Catena463x& operator=(const Catena463x&) = delete; | ||
Catena463x(const Catena463x&&) = delete; | ||
Catena463x& operator=(const Catena463x&&) = delete; | ||
|
||
// LoRaWAN binding | ||
class LoRaWAN /* forward */; | ||
|
||
enum ANALOG_PINS | ||
{ | ||
APIN_VBAT_SENSE = A1, | ||
APIN_VBUS_SENSE = A2, | ||
}; | ||
|
||
enum ANALOG_CHANNELS | ||
{ | ||
ANALOG_CHANNEL_A0 = 0, | ||
ANALOG_CHANNEL_A1 = 5, | ||
ANALOG_CHANNEL_A2 = 4, | ||
ANALOG_CHANNEL_A3 = 3, | ||
ANALOG_CHANNEL_A4 = 2, | ||
ANALOG_CHANNEL_VBAT = ANALOG_CHANNEL_A1, | ||
ANALOG_CHANNEL_VBUS = ANALOG_CHANNEL_A2, | ||
ANALOG_CHANNEL_VREF = 17, | ||
}; | ||
|
||
enum DIGITAL_PINS | ||
{ | ||
PIN_STATUS_LED = D13, | ||
PIN_SPI2_FLASH_SS = D19, | ||
PIN_SPI2_MOSI = D23, | ||
PIN_SPI2_MISO = D22, | ||
PIN_SPI2_SCK = D24, | ||
}; | ||
|
||
// methods | ||
virtual bool begin() override; | ||
|
||
protected: | ||
|
||
private: | ||
}; | ||
|
||
/* | ||
|| The LoRaWAN class for the Catena 455x. Assumes The Things Network | ||
*/ | ||
class Catena463x::LoRaWAN : public CatenaStm32L0::LoRaWAN | ||
{ | ||
public: | ||
using Super = CatenaStm32L0::LoRaWAN; | ||
|
||
/* | ||
|| the constructor. We don't do anything at this level, the | ||
|| Super constructor does most of the work. | ||
*/ | ||
LoRaWAN() {}; | ||
|
||
bool begin(Catena463x *pParent); | ||
|
||
protected: | ||
|
||
private: | ||
}; | ||
|
||
} // namespace McciCatena | ||
|
||
/**** end of Catena463x.h ****/ | ||
#endif /* _CATENA463X_H_ */ |
Oops, something went wrong.