Skip to content

Commit

Permalink
Fix #135: Add support for Catena 4630, 4617 and 4618
Browse files Browse the repository at this point in the history
  • Loading branch information
dhineshkumarmcci committed Jun 25, 2019
1 parent 1d6e8a6 commit 217e7a0
Show file tree
Hide file tree
Showing 18 changed files with 540 additions and 291 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ script:
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4611) $THISLIB/examples/catena_hello/catena_hello_lora.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4612) $THISLIB/examples/catena_hello/catena_hello.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4612) $THISLIB/examples/catena_hello/catena_hello_lora.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4617) $THISLIB/examples/catena_hello/catena_hello.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4617) $THISLIB/examples/catena_hello/catena_hello_lora.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4618) $THISLIB/examples/catena_hello/catena_hello.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4618) $THISLIB/examples/catena_hello/catena_hello_lora.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4630) $THISLIB/examples/catena_hello/catena_hello.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4630) $THISLIB/examples/catena_hello/catena_hello_lora.ino
- _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4801) $THISLIB/examples/catena_hello/catena_hello.ino
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ Class | Header File | Description
`Catena4610` | `Catena4610.h` | MCCI Catena 4610 second-generation Murata-based board with LiPo charging
`Catena4611` | `Catena4611.h` | MCCI Catena 4611 second-generation Murata-based board with fixed Vdd, no charging
`Catena4612` | `Catena4612.h` | MCCI Catena 4612 second-generation Murata-based board with variable Vdd, no charging.
`Catena4617` | `Catena4617.h` | MCCI Catena 4617 second-generation Murata-based board with variable Vdd, no charging
`Catena4618` | `Catena4618.h` | MCCI Catena 4618 second-generation Murata-based board with variable Vdd, no charging.
`Catena4630` | `Catena4630.h` | MCCI Catena 4630 Murata-based board with Air Quality Sensor.
`Catena4801` | `Catena4801.h` | MCCI Catena 4801 Murata-based board with Modbus.

Expand Down
40 changes: 7 additions & 33 deletions src/Catena.h
Original file line number Diff line number Diff line change
@@ -1,46 +1,16 @@
/* Catena.h Thu Apr 11 2019 17:56:05 dhineshkumar */

/*
Module: Catena.h
Function:
class Catena: virtual CatenaBase derivative representing
class Catena: virtual CatenaBase derivative representing
the target Catena for this build.
Version:
V0.12.0 Thu Apr 11 2019 17:56:05 dhineshkumar Edit level 5
Copyright notice:
This file copyright (C) 2017-2019 by
MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 14850
An unpublished work. All rights reserved.
This file is proprietary information, and may not be disclosed or
copied without the prior permission of MCCI Corporation.
See accompanying LICENSE file.
Author:
ChaeHee Won, MCCI Corporation October 2017
Revision history:
0.6.0 Fri Oct 13 2017 15:19:30 chwon
Module created.
0.7.0 Wed Dec 13 2017 17:29:35 tmm
Refactor.
0.9.0 Sat Mar 31 2018 19:28:30 tmm
Add Catena 4460 support, use BSP symbols.
0.11.0 Thu Nov 15 2018 15:06:42 chwon
Add Catena 461x support.
0.12.0 Thu Apr 11 2019 17:56:05 dhineshkumar
Add Catena 4630 support.
ChaeHee Won, MCCI Corporation October 2017
*/

Expand Down Expand Up @@ -82,6 +52,10 @@ Revision history:
#elif defined(ARDUINO_MCCI_CATENA_4630)
# include "Catena4630.h"
# define CATENA_H_SUPER_ McciCatena::Catena4630
#elif defined(ARDUINO_MCCI_CATENA_4617)
# include "Catena4617.h"
#elif defined(ARDUINO_MCCI_CATENA_4618)
# include "Catena4618.h"
#elif defined(ARDUINO_MCCI_CATENA_4801) || defined(ARDUINO_CATENA_4801)
# include "Catena4801.h"
# define CATENA_H_SUPER_ McciCatena::Catena4801
Expand Down
66 changes: 66 additions & 0 deletions src/Catena4617.h
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_ */
66 changes: 66 additions & 0 deletions src/Catena4618.h
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_ */
24 changes: 3 additions & 21 deletions src/Catena4630.h
Original file line number Diff line number Diff line change
@@ -1,33 +1,15 @@
/* Catena4630.h Thu Apr 11 2019 18:30:10 dhineshkumar */

/*
Module: Catena4630.h
Function:
class Catena4630: CatenaBase Platform to represent a Catena 4630
Version:
V0.11.0 Thu Apr 11 2019 18:30:10 dhineshkumar Edit level 1
class Catena4630: CatenaBase Platform to represent a Catena 4630.
Copyright notice:
This file copyright (C) 2019 by
MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 14850
An unpublished work. All rights reserved.
This file is proprietary information, and may not be disclosed or
copied without the prior permission of MCCI Corporation
See accompanying LICENSE file.
Author:
Dhinesh Kumar Pitchai, MCCI Corporation April 2019
Revision history:
0.11.0 Thu Apr 11 2019 18:30:10 dhineshkumar
Module created.
Dhinesh Kumar Pitchai, MCCI Corporation April 2019
*/

Expand Down
26 changes: 4 additions & 22 deletions src/Catena463x.h
Original file line number Diff line number Diff line change
@@ -1,34 +1,16 @@
/* Catena463x.h Thu Apr 11 2019 18:04:36 dhineshkumar */

/*
Module: Catena463x.h
Function:
class Catena463x: CatenaBase Platform to represent a Catena 463x
(4630.)
Version:
V0.11.0 Thu Apr 11 2019 18:04:36 dhineshkumar Edit level 1
class Catena463x: CatenaBase Platform to represent a Catena 463x
(4630).
Copyright notice:
This file copyright (C) 2019 by
MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 14850
An unpublished work. All rights reserved.
This file is proprietary information, and may not be disclosed or
copied without the prior permission of MCCI Corporation
See accompanying LICENSE file.
Author:
Dhinesh Kumar Pitchai, MCCI Corporation April 2019
Revision history:
0.11.0 Thu Apr 11 2019 18:04:36 dhineshkumar
Module created.
Dhinesh Kumar Pitchai, MCCI Corporation April 2019
*/

Expand Down
45 changes: 5 additions & 40 deletions src/CatenaBase.h
Original file line number Diff line number Diff line change
@@ -1,55 +1,16 @@
/* CatenaBase.h Thu Apr 11 2019 18:40:42 dhineshkumar */

/*
Module: CatenaBase.h
Function:
class CatenaBase interfaces.
Version:
V0.13.0 Thu Apr 11 2019 18:40:42 dhineshkumar Edit level 7
Copyright notice:
This file copyright (C) 2016-2019 by
MCCI Corporation
3520 Krums Corners Road
Ithaca, NY 14850
An unpublished work. All rights reserved.
This file is released under terms of the accompanying LICENSE file.
See accompanying LICENSE file.
Author:
Terry Moore, MCCI Corporation October 2016
Revision history:
0.1.0 Tue Oct 25 2016 01:58:25 tmm
Module created.
0.3.0 Thu Oct 27 2016 22:46:30 tmm
Change buffer types away from array, types are just not intuitive.
0.5.0 Sun Mar 19 2017 15:00:21 tmm
Major update for comamand support, etc.
0.9.0 Sat Mar 31 2018 19:28:30 tmm
Add fHasBme680.
0.9.1 Sat Apr 28 2018 16:52:31 tmm
Add support for RS485 (for Catena 4470).
0.11.0 Mon Nov 19 2018 12:07:02 chwon
Add Sleep() virtual method.
0.12.0 Wed Dec 05 2018 14:01:29 chwon
Add getFram() method and FRAM access methods. Move CPUID_PLATFORM_MAP
structure and related methods.
0.13.0 Thu Apr 11 2019 18:40:42 dhineshkumar
Add support for ZMOD4410 (for Catena 4630).
*/

#ifndef _CATENABASE_H_ /* prevent multiple includes */
Expand Down Expand Up @@ -198,6 +159,10 @@ class CatenaBase
fHasVout1 = 1 << 17,
// platform has ZMOD4410 Air Quality sensor
fHasZMOD4410 = 1 << 18,
//platform has IDT HS001
fHasHS001 = 1 << 19,
//platform has SHT3x sensirion
fHasSHT3x = 1 << 20,

// special wiring variants all are offsets from M100...
// we support up to 127 variants, becuase we have 7
Expand Down
Loading

0 comments on commit 217e7a0

Please sign in to comment.