From 1ea4a8dfc95a06ff3988a6f26c6ff8158bbf255e Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Wed, 18 Nov 2020 01:08:32 +0530 Subject: [PATCH 01/18] added platform support for Catena 4802 --- src/Catena.h | 3 + src/Catena4802.h | 61 +++++++++++++ src/Catena_Platforms.h | 1 + .../Catena4802_getPlatformTable.cpp | 86 +++++++++++++++++++ 4 files changed, 151 insertions(+) create mode 100644 src/Catena4802.h create mode 100644 src/lib/stm32/catena480x/Catena4802_getPlatformTable.cpp diff --git a/src/Catena.h b/src/Catena.h index 011ebb7..8b9012f 100644 --- a/src/Catena.h +++ b/src/Catena.h @@ -61,6 +61,9 @@ Copyright notice: #elif defined(ARDUINO_MCCI_CATENA_4801) || defined(ARDUINO_CATENA_4801) # include "Catena4801.h" # define CATENA_H_SUPER_ McciCatena::Catena4801 +#elif defined(ARDUINO_MCCI_CATENA_4802) || defined(ARDUINO_CATENA_4802) +# include "Catena4802.h" +# define CATENA_H_SUPER_ McciCatena::Catena4802 /* fallback in case it's SAMD but not what we expect */ #elif defined(ARDUINO_ARCH_SAMD) # include "CatenaSamd21.h" diff --git a/src/Catena4802.h b/src/Catena4802.h new file mode 100644 index 0000000..f363ea4 --- /dev/null +++ b/src/Catena4802.h @@ -0,0 +1,61 @@ +/* + +Module: Catena4802.h + +Function: + class Catena4802: CatenaBase Platform to represent a Catena 4802. + +Copyright notice: + See accompanying LICENSE file. + +Author: + Dhinesh Kumar Pitchai, MCCI Corporation November 2020 + +*/ + +#ifndef _Catena4802_H_ /* prevent multiple includes */ +#define _Catena4802_H_ + +#pragma once + +#ifndef _CATENA480X_H_ +# include "Catena480x.h" +#endif + +namespace McciCatena { + +class Catena4802 : public Catena480x + { +public: + using Super = Catena480x; + + // no specific constructor. + Catena4802() {}; + + // uses default destructor + + // neither copyable nor movable + Catena4802(const Catena4802&) = delete; + Catena4802& operator=(const Catena4802&) = delete; + Catena4802(const Catena4802&&) = delete; + Catena4802& operator=(const Catena4802&&) = delete; + + virtual const char *CatenaName() const override { return "Catena 4802"; }; + +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 Catena4802.h ****/ +#endif /* _Catena4802_H_ */ diff --git a/src/Catena_Platforms.h b/src/Catena_Platforms.h index ff231a9..b641f61 100644 --- a/src/Catena_Platforms.h +++ b/src/Catena_Platforms.h @@ -77,6 +77,7 @@ extern const CATENA_PLATFORM gkPlatformCatena4618; extern const CATENA_PLATFORM gkPlatformCatena4630; extern const CATENA_PLATFORM gkPlatformCatena4801; +extern const CATENA_PLATFORM gkPlatformCatena4802; } /* namespace McciCatena */ diff --git a/src/lib/stm32/catena480x/Catena4802_getPlatformTable.cpp b/src/lib/stm32/catena480x/Catena4802_getPlatformTable.cpp new file mode 100644 index 0000000..f41a18b --- /dev/null +++ b/src/lib/stm32/catena480x/Catena4802_getPlatformTable.cpp @@ -0,0 +1,86 @@ +/* + +Module: Catena4802_getPlatformTable.cpp + +Function: + Catena4802::getPlatformTable() + +Copyright notice: + See accompanying LICENSE file. + +Author: + Dhinesh Kumar Pitchai, MCCI Corporation November 2020 + +*/ + +#ifdef ARDUINO_ARCH_STM32 + +#include "Catena4802.h" + +#include "Catena_Log.h" +#include "Catena_Platforms.h" +#include "Catena_Guids.h" + +namespace McciCatena { + +const CATENA_PLATFORM gkPlatformCatena4802 = + { + Guid: GUID_HW_CATENA_4802_BASE(WIRE), + pParent: &gkPlatformCatena4802, + PlatformFlags: + CatenaBase::fHasLoRa | + CatenaBase::fHasTtnNycLoRa | + CatenaBase::fHasFRAM | + CatenaBase::fHasFlash | + CatenaBase::fHasRS485 | + CatenaBase::fHasSHT3x | + CatenaBase::fHasI2cLevelShifter + }; + +const CATENA_PLATFORM (* const Catena4802::vPlatforms[]) = + { + // entry 0 is the default + &gkPlatformCatena4802, + }; + +const size_t Catena4802::nvPlatforms = sizeof(Catena4802::vPlatforms) / sizeof(Catena4802::vPlatforms[0]); + +/* + +Name: Catena4802::getPlatformTable() + +Function: + Get the known platform table. + +Definition: + public: virtual + void Catena4802::getPlatformTable( + const CATENA_PLATFORM * const * &vPlatforms, + size_t &nvPlatforms + ) override; + +Description: + This override for getPlatformTable() returns the vector of platform + GUIDs for this Catena. + +Returns: + vPlatforms is set to the base of the array of pointers to platform + stuctures; and nvPlatforms is set to the number of entries in + the table. + +*/ + +/* public virtual override */ +void +Catena4802::getPlatformTable( + const CATENA_PLATFORM * const * &result_vPlatforms, + size_t &result_nvPlatforms + ) + { + result_vPlatforms = vPlatforms; + result_nvPlatforms = nvPlatforms; + } + +} /* namespace McciCatena */ + +#endif // ARDUINO_ARCH_STM32 From c1a75949152426fd0a9c0806a2f96dec6005cd34 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Wed, 18 Nov 2020 01:11:09 +0530 Subject: [PATCH 02/18] added platform flag for external i2c level shifter --- src/CatenaBase.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CatenaBase.h b/src/CatenaBase.h index df96e4f..5e9534b 100644 --- a/src/CatenaBase.h +++ b/src/CatenaBase.h @@ -178,6 +178,8 @@ class CatenaBase fHasHS001 = 1 << 19, //platform has SHT3x sensirion fHasSHT3x = 1 << 20, + //platform has I2C Level Shifter + fHasI2cLevelShifter = 1 << 21, // special wiring variants all are offsets from M100... // we support up to 127 variants, becuase we have 7 From a82621b47ced29f5f5dcd13e7fe3487d314332f8 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Wed, 18 Nov 2020 01:12:10 +0530 Subject: [PATCH 03/18] added GUID for Catena 4802 base --- src/Catena_Guids.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Catena_Guids.h b/src/Catena_Guids.h index 3e050ca..30f6d1a 100644 --- a/src/Catena_Guids.h +++ b/src/Catena_Guids.h @@ -229,5 +229,9 @@ Copyright notice: #define GUID_HW_CATENA_4801_BASE(f) \ MCCIADK_GUID_GEN_INIT(f, 0x10ea7e25, 0xa4a4, 0x45fd, 0x89, 0x59, 0xc0, 0x4a, 0x6a, 0x5d, 0x7f, 0x95) +// {daaf345e-b5d5-4a32-a303-3ac70b81d260} +#define GUID_HW_CATENA_4802_BASE(f) \ + MCCIADK_GUID_GEN_INIT(f, 0xdaaf345e, 0xb5d5, 0x4a32, 0xa3, 0x03, 0x3a, 0xc7, 0x0b, 0x81, 0xd2, 0x60) + /**** end of catena_guids.h ****/ #endif /* _CATENA_GUIDS_H_ */ From 36235656222d3b893f23e9a9024b9f6bbd4d99c3 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Sat, 21 Nov 2020 02:17:44 +0530 Subject: [PATCH 04/18] removed the inconsistent naming added --- src/Catena.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Catena.h b/src/Catena.h index 8b9012f..6cb10ce 100644 --- a/src/Catena.h +++ b/src/Catena.h @@ -61,7 +61,7 @@ Copyright notice: #elif defined(ARDUINO_MCCI_CATENA_4801) || defined(ARDUINO_CATENA_4801) # include "Catena4801.h" # define CATENA_H_SUPER_ McciCatena::Catena4801 -#elif defined(ARDUINO_MCCI_CATENA_4802) || defined(ARDUINO_CATENA_4802) +#elif defined(ARDUINO_MCCI_CATENA_4802) # include "Catena4802.h" # define CATENA_H_SUPER_ McciCatena::Catena4802 /* fallback in case it's SAMD but not what we expect */ From 775a9618a3285dd5087728c442701f7e512f4248 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Sat, 21 Nov 2020 02:19:36 +0530 Subject: [PATCH 05/18] added support to read Vbin value --- src/Catena4802.h | 1 + src/CatenaStm32L0.h | 1 + .../catena480x/Catena4802_ReadVoltage.cpp | 88 +++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp diff --git a/src/Catena4802.h b/src/Catena4802.h index f363ea4..7442f73 100644 --- a/src/Catena4802.h +++ b/src/Catena4802.h @@ -41,6 +41,7 @@ class Catena4802 : public Catena480x Catena4802& operator=(const Catena4802&&) = delete; virtual const char *CatenaName() const override { return "Catena 4802"; }; + virtual float ReadVin(void) const override; protected: // we are required to provide a table of platforms diff --git a/src/CatenaStm32L0.h b/src/CatenaStm32L0.h index 3b50c40..02b0a90 100644 --- a/src/CatenaStm32L0.h +++ b/src/CatenaStm32L0.h @@ -71,6 +71,7 @@ class CatenaStm32L0 : public CatenaStm32 // read the current battery voltage, in engineering units virtual float ReadVbat(void) const = 0; virtual float ReadVbus(void) const = 0; + virtual float ReadVin(void) const = 0; virtual void Sleep(uint32_t howLongInSeconds) override; diff --git a/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp b/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp new file mode 100644 index 0000000..07e44c2 --- /dev/null +++ b/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp @@ -0,0 +1,88 @@ +/* Catena4802_ReadVoltage.cpp Wed Jan 16 2019 10:40:07 chwon */ + +/* + +Module: Catena4802_ReadVoltage.cpp + +Function: + Catena4802::ReadVin() + +Version: + V0.13.0 Wed Jan 16 2019 10:40:07 chwon Edit level 2 + +Copyright notice: + This file copyright (C) 2018-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 + +Author: + ChaeHee Won, MCCI Corporation November 2018 + +Revision history: + 0.12.0 Mon Nov 26 2018 16:18:29 chwon + Module created. + + 0.13.0 Wed Jan 16 2019 10:40:07 chwon + Use CatenaStm32L0::ReadAnalog() method. + +*/ + +#ifdef ARDUINO_ARCH_STM32 + +#include "Catena4802.h" + +#include +using namespace McciCatena; + +/****************************************************************************\ +| +| Manifest constants & typedefs. +| +| This is strictly for private types and constants which will not +| be exported. +| +\****************************************************************************/ + + + +/****************************************************************************\ +| +| Read-only data. +| +| If program is to be ROM-able, these must all be tagged read-only +| using the ROM storage class; they may be global. +| +\****************************************************************************/ + + + +/****************************************************************************\ +| +| VARIABLES: +| +| If program is to be ROM-able, these must be initialized +| using the BSS keyword. (This allows for compilers that require +| every variable to have an initializer.) Note that only those +| variables owned by this module should be declared here, using the BSS +| keyword; this allows for linkers that dislike multiple declarations +| of objects. +| +\****************************************************************************/ + +float +Catena4802::ReadVin(void) const + { + float volt = this->ReadAnalog(Catena480x::ANALOG_CHANNEL_VBAT, 1, 3); + return volt / 1000; + } + +#endif // ARDUINO_ARCH_STM32 + +/**** end of Catena480x_ReadVoltage.cpp ****/ From 4b712fa5123954146817f268b1158052fdf2934e Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 12:20:07 +0530 Subject: [PATCH 06/18] added missing KEYWORDs to keywords.txt --- keywords.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/keywords.txt b/keywords.txt index 773df52..4baa106 100644 --- a/keywords.txt +++ b/keywords.txt @@ -19,8 +19,13 @@ Catena455x KEYWORD1 Catena4610 KEYWORD1 Catena4611 KEYWORD1 Catena4612 KEYWORD1 +Catena4617 KEYWORD1 +Catena4618 KEYWORD1 Catena461x KEYWORD1 +Catena4630 KEYWORD1 +Catena463x KEYWORD1 Catena4801 KEYWORD1 +Catena4802 KEYWORD1 Catena480x KEYWORD1 CatenaBase KEYWORD1 CatenaFeatherM0 KEYWORD1 @@ -99,6 +104,7 @@ PollAlarmState KEYWORD2 ReadAnalog KEYWORD2 ReadVbat KEYWORD2 ReadVbus KEYWORD2 +ReadVin KEYWORD2 SECTOR_BASE KEYWORD2 SPICLOCK KEYWORD2 SafePrintf KEYWORD2 From d632d7ff00ce3d46e4062d84aea2a7acf56c7fb1 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 12:23:23 +0530 Subject: [PATCH 07/18] added 4802 to CI test --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bb06f0e..d8b7e87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -136,7 +136,7 @@ script: - _notsamd || arduino --verify $(_samdopts '' in866) $THISLIB/examples/catena_hello_lora/catena_hello_lora.ino # - # *** TESTS FOR STM32L0 / Catena 4551. 46xx boards **** + # *** TESTS FOR STM32L0 / Catena 4551. 46xx. 480x boards **** # test each of the STM32L0 boards - _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4551) $THISLIB/examples/catena_hello/catena_hello.ino - _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4551) $THISLIB/examples/catena_hello/catena_hello_lora.ino @@ -154,6 +154,8 @@ script: - _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 - _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4801) $THISLIB/examples/catena_hello/catena_hello_lora.ino + - _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4802) $THISLIB/examples/catena_hello/catena_hello.ino + - _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4802) $THISLIB/examples/catena_hello/catena_hello_lora.ino # # test the user-command and fsm examples on the 4610 From 1c58aeb0a8f8f7b0e723f777f33b0fdef9b791a7 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 12:41:48 +0530 Subject: [PATCH 08/18] added 4802 and updated version details --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0ca91f9..15d010c 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ _Apologies_: This document is a work in progress, and is published in this inter - [Catena 4450](#catena-4450) - [Catena 4460](#catena-4460) - [Catena 4470](#catena-4470) - - [GUIDs for the Catena 4801 family](#guids-for-the-catena-4801-family) + - [GUIDs for the Catena 480x family](#guids-for-the-catena-480x-family) + - [Catena 4801](#catena-4801) + - [Catena 4802](#catena-4802) - [GUIDs for Adafruit Feather M0s](#guids-for-adafruit-feather-m0s) - [Polling Framework](#polling-framework) - [Making a class pollable](#making-a-class-pollable) @@ -161,6 +163,7 @@ Class | Header File | Description `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. +`Catena4802` | `Catena4802.h` | MCCI Catena 4802 Murata-based board with Modbus and Temperature sensor. ### Class derivation @@ -341,12 +344,20 @@ Name | GUID | Description `CATENA_4470_BASE` | `ea8568ec-5dae-46ee-929a-a3f6b00a565e` | Base Catena 4470, assuming no modifications or customizations. `CATENA_4470_M101` | `dd0a37a6-e469-43ec-b173-fed795129455` | Catena 4470 M101, configured for power monitoring and other pulse-input applications. -#### GUIDs for the Catena 4801 family +#### GUIDs for the Catena 480x family + +##### Catena 4801 Name | GUID | Description -----|------|------------ `CATENA_4801_BASE` | `10ea7e25-a4a4-45fd-8959-c04a6a5d7f95` | Base Catena 4801, assuming no modifications or customizations. +##### Catena 4802 + +Name | GUID | Description +-----|------|------------ +`CATENA_4802_BASE` | `daaf345e-b5d5-4a32-a303-3ac70b81d260` | Base Catena 4802, assuming no modifications or customizations. + #### GUIDs for Adafruit Feather M0s MCCI also uses this library with Feather M0s without MCCI hardware. These GUIDs are useful in that situation. @@ -1422,6 +1433,7 @@ This sketch demonstrates the use of the Catena FSM class to implement the `Turns - HEAD includes the following changes. + - Fix [#268](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/268): adds support to the new board Catena 4802 (version 0.19.10.0). - Fix [#266](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/266): clear EOC flag after every analog read (version 0.19.0.30). - Fix [#261](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/261): add support for low level FRAM driver `Catena_Mb85rc64ta::read()` and `write()` to read/write > 255 bytes (version 0.19.0.30). - Fix [#260](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/269): add more control to the Si1133 library (version 0.19.0.20). From 8f04791139c58134bd9af7ab4695e75f88e6098a Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 12:44:29 +0530 Subject: [PATCH 09/18] updated version number --- src/CatenaBase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CatenaBase.h b/src/CatenaBase.h index 5e9534b..57cf64f 100644 --- a/src/CatenaBase.h +++ b/src/CatenaBase.h @@ -55,7 +55,7 @@ Copyright notice: #define CATENA_ARDUINO_PLATFORM_VERSION_CALC(major, minor, patch, local) \ (((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local)) -#define CATENA_ARDUINO_PLATFORM_VERSION CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 19, 0, 30) /* v0.19.0.30 */ +#define CATENA_ARDUINO_PLATFORM_VERSION CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 19, 10, 0) /* v0.19.10.0 */ #define CATENA_ARDUINO_PLATFORM_VERSION_GET_MAJOR(v) \ (((v) >> 24u) & 0xFFu) From 5acb9768ff2b92ab1f2deeecec31c66076ef4274 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 12:48:53 +0530 Subject: [PATCH 10/18] used #if directives to avoid conflict of adding ReadVin() --- src/Catena4802.h | 2 + src/Catena480x.h | 6 +++ src/CatenaStm32L0.h | 2 + .../catena480x/Catena4802_ReadVoltage.cpp | 49 ++++--------------- 4 files changed, 19 insertions(+), 40 deletions(-) diff --git a/src/Catena4802.h b/src/Catena4802.h index 7442f73..06e275c 100644 --- a/src/Catena4802.h +++ b/src/Catena4802.h @@ -41,7 +41,9 @@ class Catena4802 : public Catena480x Catena4802& operator=(const Catena4802&&) = delete; virtual const char *CatenaName() const override { return "Catena 4802"; }; +#if defined(ARDUINO_MCCI_CATENA_4802) virtual float ReadVin(void) const override; +#endif protected: // we are required to provide a table of platforms diff --git a/src/Catena480x.h b/src/Catena480x.h index 1e3702e..e9b0a07 100644 --- a/src/Catena480x.h +++ b/src/Catena480x.h @@ -70,6 +70,9 @@ class Catena480x : public CatenaStm32L0 enum ANALOG_PINS { APIN_VBAT_SENSE = A0, +#if defined(ARDUINO_MCCI_CATENA_4802) + APIN_VIN_SENSE = A0, +#endif }; enum ANALOG_CHANNELS @@ -80,6 +83,9 @@ class Catena480x : public CatenaStm32L0 ANALOG_CHANNEL_A3 = 3, ANALOG_CHANNEL_A4 = 2, ANALOG_CHANNEL_VBAT = ANALOG_CHANNEL_A0, +#if defined(ARDUINO_MCCI_CATENA_4802) + ANALOG_CHANNEL_VIN = ANALOG_CHANNEL_A0, +#endif ANALOG_CHANNEL_VREF = 17, }; diff --git a/src/CatenaStm32L0.h b/src/CatenaStm32L0.h index 02b0a90..5bf6bd3 100644 --- a/src/CatenaStm32L0.h +++ b/src/CatenaStm32L0.h @@ -71,7 +71,9 @@ class CatenaStm32L0 : public CatenaStm32 // read the current battery voltage, in engineering units virtual float ReadVbat(void) const = 0; virtual float ReadVbus(void) const = 0; +#if defined(ARDUINO_MCCI_CATENA_4802) virtual float ReadVin(void) const = 0; +#endif virtual void Sleep(uint32_t howLongInSeconds) override; diff --git a/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp b/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp index 07e44c2..00ed5bf 100644 --- a/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp +++ b/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp @@ -1,40 +1,22 @@ -/* Catena4802_ReadVoltage.cpp Wed Jan 16 2019 10:40:07 chwon */ - /* -Module: Catena4802_ReadVoltage.cpp +Module: Catena4802_ReadAnalog.cpp Function: - Catena4802::ReadVin() - -Version: - V0.13.0 Wed Jan 16 2019 10:40:07 chwon Edit level 2 + Catena4802::ReadVin() Copyright notice: - This file copyright (C) 2018-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 November 2018 + Dhinesh Kumar Pitchai, MCCI Corporation November 2020 Revision history: - 0.12.0 Mon Nov 26 2018 16:18:29 chwon - Module created. - - 0.13.0 Wed Jan 16 2019 10:40:07 chwon - Use CatenaStm32L0::ReadAnalog() method. + See https://github.com/mcci-catena/Catena-Arduino-Platform */ -#ifdef ARDUINO_ARCH_STM32 +#ifdef ARDUINO_MCCI_CATENA_4802 #include "Catena4802.h" @@ -43,10 +25,7 @@ using namespace McciCatena; /****************************************************************************\ | -| Manifest constants & typedefs. -| -| This is strictly for private types and constants which will not -| be exported. +| Manifest constants & typedefs. | \****************************************************************************/ @@ -56,30 +35,20 @@ using namespace McciCatena; | | Read-only data. | -| If program is to be ROM-able, these must all be tagged read-only -| using the ROM storage class; they may be global. -| \****************************************************************************/ /****************************************************************************\ | -| VARIABLES: -| -| If program is to be ROM-able, these must be initialized -| using the BSS keyword. (This allows for compilers that require -| every variable to have an initializer.) Note that only those -| variables owned by this module should be declared here, using the BSS -| keyword; this allows for linkers that dislike multiple declarations -| of objects. +| Variables. | \****************************************************************************/ float Catena4802::ReadVin(void) const { - float volt = this->ReadAnalog(Catena480x::ANALOG_CHANNEL_VBAT, 1, 3); + float volt = this->ReadAnalog(Catena480x::ANALOG_CHANNEL_VIN, 1, 3); return volt / 1000; } From dc7d9bc083d9f163a5afac78df6e6e278bede63f Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 14:53:04 +0530 Subject: [PATCH 11/18] added 4802 to class derivation hierarchy figure --- assets/CatenaBase.plantuml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/assets/CatenaBase.plantuml b/assets/CatenaBase.plantuml index e16f467..b5ee00d 100644 --- a/assets/CatenaBase.plantuml +++ b/assets/CatenaBase.plantuml @@ -267,6 +267,13 @@ class Catena4801 { -{static}const CATENA_PLATFORM(* const vPlatforms[]); -{static}const size_t nvPlatforms; } + +class Catena4802 { + +const char *CatenaName() const; + #void getPlatformTable(); + -{static}const CATENA_PLATFORM(* const vPlatforms[]); + -{static}const size_t nvPlatforms; +} !endif !if ($enableSamd == 1) @@ -302,6 +309,7 @@ Catena461x <|-- Catena4617 Catena461x <|-- Catena4618 Catena463x <|-- Catena4630 Catena480x <|-- Catena4801 +Catena480x <|-- Catena4802 !endif } From 043dac5fcef41a9e182d5c8f71581224d028e0e2 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 14:53:47 +0530 Subject: [PATCH 12/18] updated the module name in header --- src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp b/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp index 00ed5bf..d60251a 100644 --- a/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp +++ b/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp @@ -1,6 +1,6 @@ /* -Module: Catena4802_ReadAnalog.cpp +Module: Catena4802_ReadVoltage.cpp Function: Catena4802::ReadVin() From d8b0fef1ce87e8009c24f65a191a486c9acb007b Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 16:32:20 +0530 Subject: [PATCH 13/18] updated members of Class Catena 4802 --- assets/CatenaBase.plantuml | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/CatenaBase.plantuml b/assets/CatenaBase.plantuml index b5ee00d..6793bf7 100644 --- a/assets/CatenaBase.plantuml +++ b/assets/CatenaBase.plantuml @@ -270,6 +270,7 @@ class Catena4801 { class Catena4802 { +const char *CatenaName() const; + +float ReadVin() const; #void getPlatformTable(); -{static}const CATENA_PLATFORM(* const vPlatforms[]); -{static}const size_t nvPlatforms; From 48a0370be1ab4af6079efe1a06bbd2e5f35c46d8 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 8 Dec 2020 16:33:17 +0530 Subject: [PATCH 14/18] updated URL for Class hierarchy figures --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 15d010c..0f175b1 100644 --- a/README.md +++ b/README.md @@ -188,11 +188,11 @@ The first figure just gives relationships; the second has details about the memb **Catena STM32 Class Relationships:** -[![**Catena STM32 Class Relationships**:](http://www.plantuml.com/plantuml/png/xLdhSzf64F_C_HMNIQUn7Jy0nuz9cvaG6JnC0JE0cm-P37EI5b0jwTIx4uIc_j-xEX1w65bsEqdicNunQFUtZ_snktVWzr8neKBF9KUl2EboEtJXRSLW2dpsWKau35pcQprfXRwb7Ew_9PL-9BpkTgY02GZmBQ2IXm9V9bpGGRDnqMqUUZQD89RBfAIsmwQ2UOUaGWmUB8KpdIbqD0IWpBAu5p1_wVXJscaRpTwmIIUE2uXjX6h61G978CIITZaNi4-xXj6c1XS15opAgDBZS_1C4BHUhPqJqkCAP3fDnsDJaDJnezow5pet9e1EmGTq0JOrbpHWKaKfg9aZTNp4AqugQeRLWPYZUwReJAdWxT7HOh7OK7E8-H_53_kK-JR5MarpvGpB4213L_k-7dJa8QMZMUI9IQeuDO7Qt8z2O0JcKkLu8FVfmb4pP6sY-LMaCcTkY2M0xM2wEhF8DvqpuJ3JHOq9BbySeckWc8-7Hb71oOT1AWl7HVU0VvOyf0lCuPMaFe0DzY4Xhuu8UV4J-96thcPJqdUqkf4DbNTSHqajaJ3FrX3YCymvO1RGhcKvg-wXNmbXfbI2MMhT14bRePBIrwWCKTcyRf--6PjXLEjO_N97Wm_8NLPpxJj_Xj2-s9Xz-hnD7Tl6Ql13ZrxrcuF6gDsx7BSwZSjXekXt6gFMrQ2Rad-LYYd7kWsHyUFwM57iA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vnL7qZXIfBdi5CbcQSO47zpBTRYzD-hFIxMwYzOX2HHSb5h90cH2rajLjrZLIzMdHMhpabIIwwsAaaAoHMsQUdR-1F9_GFk7QtkafbZ0_LMejZWFRw4dliF "Click for SVG image of Class Relationships") +[![**Catena STM32 Class Relationships**:](http://www.plantuml.com/plantuml/png/xLbhRzf85_wCVyLKVVKsINC1qbpKzwrKIY122mG1sNweAZIs3-2DFUET6KFPRlxx7WyClWH3gYgxYRHV6ZpFSoxduSoPmVqe5HKg2dphv8rbTRWR-V2-LASA6Fr49Ho7FcKQjveHSvJ7sNkhr8iNRpjj8c0C0fW3HF98u9yn5wJVg5rr6iU1IsAAurCfYUlHYQ31iLMowZnS26yoLUXe042eu_0Wf6pXiGbfj-gDxg11nfuFoAr5Qie54eSWn89qE1TmI3hrUelKkGYve756fIwVGM238DLovTAokbo1JAVf1NG2adWipgrpfNEZ0iW46A0BS8cz826LAav1JJsfuoDVSQkafbWTY1cwfufCbGhVdvpCv_ErDCUO_ubvE2IKkGHhjUsbCon3W8nyxVkstvR7X0odiISgYUB41k9o5eV02DGdoWj07fAvfwQesbZhgwpIZFeHbW2kX-dgp6BVP4Q5HsqV4HjyFZz6rq0mdm2DTC7hByCgpJqVtGF-i-0HcMCERoHX02wunvRrviIoNlq7MEojezMKv0CfhzS6AZYjuaebMQ61goaMevXpI1qW7SVnbjr3lbiMjQKIr56h9aZQ2a52tY8O8TYuRPs_6zbHNEj8_Uy1WW-eNHQvPTxl4RIkrcPVlcw2ZQs1WKK1kUar-hLXgtizQhPhruC4wBLhm-PDlvDQ_ouLLPvp7w7YfzMH8jXJ2fiyQFfq8aVNe73FTADOhhtzZ8NDkKySpgI2Rw78shqTjIJQeV0hendtN3AWO-XXkcgyMesjZGYVLdMI0umvM4XSDG6DolTBVhqsR7Hh8rECDbX7vw9rzS1EHqUMKSs4drA1ridwKao3xWos8gwbG-WcZFSREj4oP8el0DFM6GqtLs73n6C5mYphMNLXbmQmjqyqiidHm0S87pfg2Xg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IXGNF25lqKr11avpGV5qZfym3uoFrTXF0-fuTyBaeS8ypB7VSnTrbCUDKqQOXIjeqAK4OHjUnlK6e9mc3i0PYyhtZZrfDNPlKGHeCTkPThdhel4DdtiDq1T-dcwzgu4CA_jenmCL8Ebk43evlqAjgvoXKPrvZc27CGpWChiZ6XjmI1wuo2kMSCq6vBD8HdFH3xDh0XDMAI-9I-S2Tt9x7iy0NQtB_P8Nw_HhzcHeRezqdEP4cmgutCGmh6Xo-JD1dMJHuM62qn4c7sQ28UW4hE2NPQVwOUrtC6giC78GEe7ojACW8_7CacOISx6Ocequ4aoKqv4GT6bxT02fcOWkbMiEpvX6xr6v-fot6_tKiVkHVkoFMfq4kaTNYOkPuf6a_cxoLHwRR_CB_dyrjCdqjrLM6ghzuGsrckjqRk1vPgCxUL-HAFeKAZVVCjwN-TFeCG1YZvmhWmU-chdPpD-kohrlYQtrcbZZxV4tPMpSVhVkh-3VP0lzbzNb9cZ0hQAGQ7CWFAxePoiytAoj29JFkwFP8iKDD6RavCltxHzYcYuBKhejFRK4Zf-OWcTLtz8GkLREPFbcnhENt52wHlozWlooqViI4INNRuEudjXaTlfpNZjTVmRkjrYO_IlsnUR6y-us-ZJkGutud70Jv-ts4ddBnWhwkV14QKvqkgF9-r_qawGj0VIKtYHVpmPkGlmpXvToUUngVpqUVU-mcBS3sBjzF6iVLTIxcPyzjGpBh-kvCxUsaCA-iuqdzQUMMDWnhLdbt7zsMLyzkmoFdzk6Hy_jyaxhpxnoIk_jAP-9lprxuE3p4zB9Ukyo5WZokCcSRHn_bUCGaJonP_aJ69KV06_Nrz7VSvX5d1I1ZWj0vnL7qZXIfBdi5CbcQSO47zpBTRYzD-hFIxMwYzOX2HHSb5h90cH2rajLjrZLIzMdHMhpabIIwwsAaaAoHMsQUdR-1F9_GFk7QtkafbZ0_LMejZWFRw4dliF "Click for SVG image of Class Relationships") **Catena STM32 Class Hierarchy (full detail):** -[![**Catena STM32 Class Hierarchy (full detail):**](http://www.plantuml.com/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kqAZEF4UGetW6K9cT4Qqj64Hl7CGrQvXcGx8v9EEPoAUP5Q49YzJtv8KpeNkPVOydmFxknHxfwpNwDJioD6gFp5oc19lA-1o4S6peCdctGTtbKQ7X0XCHvf0cmY6enAnWb-Ld-d4jTxGgR30oaFg1iZGZuEEnJ19cahEnc1eDU9BCb1DHM7H9ExI0gHc8RXNhZa_OHg_HkRaUzzkzrB5xrRvkZngTHBh5oyJbJD5eCdytcKglxPVv9P_VUlf4sbw5fRPwJsXZlTOQlJjOhidONUv7D8eEXVhTZwptTVu4IXoWw0Fdok2Xh_R-RyPlLwK-rEJMEctiyPRONZaRfz_N_HtiWtontr5HQewAsIe0XJ83ok-6Sh8koydIYapvk3-IBLBGH6_EphxyqFOfek6-AA7psbDBwFI99NHP_La9bMpbJ9PlQZX_nGcbRyYxByWl7xqZDRhiydKKtmkBt4xlnckluz_GxGuRet_RljhSUCRTHf_ETRWHZmD--hp3JZf_mLXHFm-EACsHLlzsqluZxGn9UoGzXHVvRoSZTm7UEw0h-JmsbPy-xpzKM8pxIQoTVpzhFvIKxOmlddh6vTULtDbRUqn1_pBDvxLdrXYOSUtPPLn_TXbVFBkCBvzRngVFRV8kgqzyyielhQcV2N_z--WeyzDIsJelCDQ8yhX976sS_nMZ495yyISvanWLNy0VrjTHdtEO1PoL0SxB01VLHrAuakGvx5H9vYa6nDzSYxKu_GzgJukr-WiM8KcKNDGQIKBaGbQBLGzOrOjL5yMgIvBKagkjIf92SeLjMle-_aHo_u1xHwlxPEROGBsLA3PuZo-Xv_u3 "Click for SVG image of Class Hierarchy") +[![**Catena STM32 Class Hierarchy (full detail):**](http://www.plantuml.com/plantuml/png/xLbhRzf85_xC_8gf-kfjakO2fBcexrkfb4245WW2ilrGLMXi7y0Rs-ET6KFPRlxx7WyClWH3gYgxYRHV6ZpFSoxduSoPmVqe5HCgyZroyeQG3dSY3zwNwan1m3un2SUXnmADasOKsChbmNjIwiMBjvqs5J060O4DLF98u9yn5xJVg5rr6iU-GsE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rKqTkrUjwzQmravM7-WozZXJDDwPlrfCfSVsw_oGpqyzVI9j7eLRRVMSqCPwhDMwTx1OYR6vtCze51yArRkdhFTj_WHA7E3I9yvLdKU1slklPJukIztMvFOgRUpnfdWuSjPEVwxxszW7-M9_egBKFYfMgu0KoGmfFnjsYtMvMomDPCh7-P5CaO8cUdTszkr9swT8XlkYXCuhposXqsUMq6Nv2HFQENepgRohu2OhZfg-1c--1Rz-z23Kx5qth2Dp-IjoExaRhRoEVa6t6spglTlMrVfQC-hKUdIcmmsv2VZbwmOxwVu18qM3F3cMD2TQzST5-rUqCnJjaV8KtTP_N8pyBNVlW2xNPyPKVlcwlwqmm_k7L3l_ETMUNfG76Lyyzunttqbo1spbCGNzpJAVLrvOOs36bHUNSVN5PNpnuZA-V6aPdxwqdNTPhhouZBVklABhjniyWrfsNi1JxpN__-VHKUPTsFQZgT1OCtR7JU9eu_nhbq96ygQ2v4mCo_oOs8vN4Syvp1BETX7ETn4koe-KSBcIrx1T9fadGp0_jRUWvvMjwEas57yH4f94oKMja2H4BcIv6DfYLIs6BegXIvBKagkjJ992SeLLYg5rnzwRBoltduaVQ7cVJ5q7gBzSCWOVyK_aUty1 "Click for SVG image of Class Hierarchy") #### SAMD Classes From 9f6cda42e27f9c5ee8fcde87424aee1308da42c6 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 22 Dec 2020 01:03:22 +0530 Subject: [PATCH 15/18] changed typo of '.' with ',' --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d8b7e87..e1867da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -136,7 +136,7 @@ script: - _notsamd || arduino --verify $(_samdopts '' in866) $THISLIB/examples/catena_hello_lora/catena_hello_lora.ino # - # *** TESTS FOR STM32L0 / Catena 4551. 46xx. 480x boards **** + # *** TESTS FOR STM32L0 / Catena 4551, 46xx, 480x boards **** # test each of the STM32L0 boards - _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4551) $THISLIB/examples/catena_hello/catena_hello.ino - _notstm32l0 || arduino --verify $(_stm32l0opts mcci_catena_4551) $THISLIB/examples/catena_hello/catena_hello_lora.ino From 419cbabfd9b262765d41761264ff34ab8da5bd25 Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 22 Dec 2020 01:06:35 +0530 Subject: [PATCH 16/18] updated the version number to v0.19.0.40 --- README.md | 2 +- src/CatenaBase.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f175b1..d13b27a 100644 --- a/README.md +++ b/README.md @@ -1433,7 +1433,7 @@ This sketch demonstrates the use of the Catena FSM class to implement the `Turns - HEAD includes the following changes. - - Fix [#268](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/268): adds support to the new board Catena 4802 (version 0.19.10.0). + - Fix [#268](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/268): adds support to the new board Catena 4802 (version 0.19.0.40). - Fix [#266](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/266): clear EOC flag after every analog read (version 0.19.0.30). - Fix [#261](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/261): add support for low level FRAM driver `Catena_Mb85rc64ta::read()` and `write()` to read/write > 255 bytes (version 0.19.0.30). - Fix [#260](https://github.com/mcci-catena/Catena-Arduino-Platform/issues/269): add more control to the Si1133 library (version 0.19.0.20). diff --git a/src/CatenaBase.h b/src/CatenaBase.h index 57cf64f..8fadf7f 100644 --- a/src/CatenaBase.h +++ b/src/CatenaBase.h @@ -55,7 +55,7 @@ Copyright notice: #define CATENA_ARDUINO_PLATFORM_VERSION_CALC(major, minor, patch, local) \ (((major) << 24u) | ((minor) << 16u) | ((patch) << 8u) | (local)) -#define CATENA_ARDUINO_PLATFORM_VERSION CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 19, 10, 0) /* v0.19.10.0 */ +#define CATENA_ARDUINO_PLATFORM_VERSION CATENA_ARDUINO_PLATFORM_VERSION_CALC(0, 19, 0, 40) /* v0.19.0.40 */ #define CATENA_ARDUINO_PLATFORM_VERSION_GET_MAJOR(v) \ (((v) >> 24u) & 0xFFu) From d537ee29fc5c0c6dd445cefc28bc6e815f65437b Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 22 Dec 2020 01:08:44 +0530 Subject: [PATCH 17/18] remove ReadVin() under class CatenaStm32L0 --- src/CatenaStm32L0.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/CatenaStm32L0.h b/src/CatenaStm32L0.h index 5bf6bd3..3b50c40 100644 --- a/src/CatenaStm32L0.h +++ b/src/CatenaStm32L0.h @@ -71,9 +71,6 @@ class CatenaStm32L0 : public CatenaStm32 // read the current battery voltage, in engineering units virtual float ReadVbat(void) const = 0; virtual float ReadVbus(void) const = 0; -#if defined(ARDUINO_MCCI_CATENA_4802) - virtual float ReadVin(void) const = 0; -#endif virtual void Sleep(uint32_t howLongInSeconds) override; From 9482a42c1991e36da8ff32f1c510e7f9f3dbab8f Mon Sep 17 00:00:00 2001 From: dhineshkumarmcci Date: Tue, 22 Dec 2020 01:11:00 +0530 Subject: [PATCH 18/18] removed #if directives and updated ReadVin() specific to 4802 --- src/Catena4802.h | 4 +--- src/Catena480x.h | 10 ++-------- src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp | 6 +++--- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/Catena4802.h b/src/Catena4802.h index 06e275c..487866b 100644 --- a/src/Catena4802.h +++ b/src/Catena4802.h @@ -41,9 +41,7 @@ class Catena4802 : public Catena480x Catena4802& operator=(const Catena4802&&) = delete; virtual const char *CatenaName() const override { return "Catena 4802"; }; -#if defined(ARDUINO_MCCI_CATENA_4802) - virtual float ReadVin(void) const override; -#endif + float ReadVin(void) const; protected: // we are required to provide a table of platforms diff --git a/src/Catena480x.h b/src/Catena480x.h index e9b0a07..4292764 100644 --- a/src/Catena480x.h +++ b/src/Catena480x.h @@ -69,10 +69,7 @@ class Catena480x : public CatenaStm32L0 enum ANALOG_PINS { - APIN_VBAT_SENSE = A0, -#if defined(ARDUINO_MCCI_CATENA_4802) - APIN_VIN_SENSE = A0, -#endif + APIN_VBAT_SENSE = A0, /* for 4802 it is referred as VIN */ }; enum ANALOG_CHANNELS @@ -82,10 +79,7 @@ class Catena480x : public CatenaStm32L0 ANALOG_CHANNEL_A2 = 4, ANALOG_CHANNEL_A3 = 3, ANALOG_CHANNEL_A4 = 2, - ANALOG_CHANNEL_VBAT = ANALOG_CHANNEL_A0, -#if defined(ARDUINO_MCCI_CATENA_4802) - ANALOG_CHANNEL_VIN = ANALOG_CHANNEL_A0, -#endif + ANALOG_CHANNEL_VBAT = ANALOG_CHANNEL_A0, /* for 4802 it is referred as VIN */ ANALOG_CHANNEL_VREF = 17, }; diff --git a/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp b/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp index d60251a..24ac380 100644 --- a/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp +++ b/src/lib/stm32/catena480x/Catena4802_ReadVoltage.cpp @@ -16,7 +16,7 @@ Revision history: */ -#ifdef ARDUINO_MCCI_CATENA_4802 +#ifdef ARDUINO_ARCH_STM32 #include "Catena4802.h" @@ -48,10 +48,10 @@ using namespace McciCatena; float Catena4802::ReadVin(void) const { - float volt = this->ReadAnalog(Catena480x::ANALOG_CHANNEL_VIN, 1, 3); + float volt = this->ReadAnalog(Catena480x::ANALOG_CHANNEL_VBAT, 1, 3); return volt / 1000; } #endif // ARDUINO_ARCH_STM32 -/**** end of Catena480x_ReadVoltage.cpp ****/ +/**** end of Catena4802_ReadVoltage.cpp ****/