Files
charge-controller-firmware/src/ext/template.cpp
T
Martin Jäger 2a71d02aeb Move PCB and user config to board Kconfig
Files in src/pcbs/xyz.h are moved to boards/xyz/board.h. User settings from
src/config.h are also configured via Kconfig, so the file is removed.
2020-04-30 10:53:58 +02:00

51 lines
1.3 KiB
C++

/*
* Copyright (c) 2018 Martin Jäger / Libre Solar
*
* SPDX-License-Identifier: Apache-2.0
*/
/** EXT interface description template
*
* The UEXT port can be used to connect several different extension modules to the charge controller.
*
* Use this file as a template for custom interfaces. If the UEXT port is not used, UEXT_DUMMY_ENABLED
* has to be defined in config.h to implement the functions.
*/
// Only compile if this EXT interface is enabled in config.h
#ifdef CONFIG_EXT_TEMPLATE_ENABLED
// implement specific extension inherited from ExtInterface
class ExtTemplate: public ExtInterface
{
public:
ExtTemplate();
void enable();
void process_asap();
void process_1s();
};
static ExtTemplate ext_template; // local instance, will self register itself
/**
* Constructor, place basic initialization here, if necessary
*/
ExtTemplate::ExtTemplate() {}
/**
* Enable operation, place start of use code here, if necessary
*/
void ExtTemplate::enable() {
// add you init functions here
}
void ExtTemplate::process_asap(void) {
// add functions to be called as soon as possible during each loop in main function
}
void ExtTemplate::process_1s(void) {
// add functions to be called every second here
}
#endif /* EXT_TEMPLATE_ENABLED */