<commit_before>/* CatenaStm32L0.h	Mon Nov 19 2018 12:11:24 chwon */

/*

Module:  CatenaStm32L0.h

Function:
	Class CatenaStm32L0

Version:
	V0.11.0	Mon Nov 19 2018 12:11:24 chwon	Edit level 2

Copyright notice:
	This file copyright (C) 2017-2018 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:
	<NAME>, MCCI Corporation	October 2017

Revision history:
   0.6.0  Fri Oct 13 2017 15:19:30  chwon
	Module created.

   0.11.0  Mon Nov 19 2018 12:11:25  chwon
	Add Sleep() method override and add m_Rtc in the private context.

*/

#ifndef _CATENASTM32L0_H_		/* prevent multiple includes */
#define _CATENASTM32L0_H_

#pragma once

#ifndef _CATENASTM32_H_
# include "CatenaStm32.h"
#endif

#ifndef _CATENASTM32L0RTC_H_
# include "CatenaStm32L0Rtc.h"
#endif

#include <Arduino_LoRaWAN_ttn.h>

namespace McciCatena {

class CatenaStm32L0 : public CatenaStm32
	{
public:
        using Super = CatenaStm32;

        CatenaStm32L0() {};
	virtual ~CatenaStm32L0() {};

	// forward reference
	class LoRaWAN;

	// all Stm32L0s put vbat on A7
	enum ANALOG_PINS
		{
		APIN_VBAT_SENSE = A3,
		APIN_VBUS_SENSE = A4,
		};

	enum DIGITAL_PINS
		{
		PIN_STATUS_LED = D13,
		PIN_SPI2_FLASH_SS = D19,
		PIN_SPI2_MOSI = D23,
		PIN_SPI2_MISO = D22,
		PIN_SPI2_SCK = D24,
		};

	// read the current battery voltage, in engineering units
	float ReadVbat(void) const;
	float ReadVbus(void) const;

	virtual void Sleep(uint32_t howLongInSeconds) override;<commit_msg>Add a declaration of begin() in CatenaStm32L0<commit_after>/* CatenaStm32L0.h	Mon Nov 19 2018 12:11:24 chwon */

/*

Module:  CatenaStm32L0.h

Function:
	Class CatenaStm32L0

Version:
	V0.11.0	Mon Nov 19 2018 12:11:24 chwon	Edit level 2

Copyright notice:
	This file copyright (C) 2017-2018 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:
	<NAME>, MCCI Corporation	October 2017

Revision history:
   0.6.0  Fri Oct 13 2017 15:19:30  chwon
	Module created.

   0.11.0  Mon Nov 19 2018 12:11:25  chwon
	Add Sleep() method override and add m_Rtc in the private context.

*/

#ifndef _CATENASTM32L0_H_		/* prevent multiple includes */
#define _CATENASTM32L0_H_

#pragma once

#ifndef _CATENASTM32_H_
# include "CatenaStm32.h"
#endif

#ifndef _CATENASTM32L0RTC_H_
# include "CatenaStm32L0Rtc.h"
#endif

#include <Arduino_LoRaWAN_ttn.h>

namespace McciCatena {

class CatenaStm32L0 : public CatenaStm32
	{
public:
        using Super = CatenaStm32;

        CatenaStm32L0() {};
	virtual ~CatenaStm32L0() {};

	// forward reference
	class LoRaWAN;

	// all Stm32L0s put vbat on A7
	enum ANALOG_PINS
		{
		APIN_VBAT_SENSE = A3,
		APIN_VBUS_SENSE = A4,
		};

	enum DIGITAL_PINS
		{
		PIN_STATUS_LED = D13,
		PIN_SPI2_FLASH_SS = D19,
		PIN_SPI2_MOSI = D23,
		PIN_SPI2_MISO = D22,
		PIN_SPI2_SCK = D24,
		};

	// read the current battery voltage, in engineering units
	float ReadVbat(void) const;
	float ReadVbus(void) const;

	virtual bool begin(void) override;
	virtual void Sleep(uint32_t howLongInSeconds) override;
{'fraction_non_alphanumeric': 0.07611940298507462, 'fraction_numerical': 0.08507462686567165, 'mean_word_length': 3.842485549132948, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3995004', 'n_tokens_mistral': 1565, 'n_tokens_neox': 1322, 'n_words': 373}