RadioLib/extras/template/ModuleTemplate.cpp

23 wiersze
567 B
C++
Czysty Zwykły widok Historia

2018-07-12 09:43:37 +00:00
#include "<module_name>.h"
2020-07-04 19:13:16 +00:00
#if !defined(RADIOLIB_EXCLUDE_<module_name>)
2018-07-12 09:43:37 +00:00
<module_name>::<module_name>(Module* mod) {
/*
Constructor implementation MUST assign the provided "mod" pointer to the private "_mod" pointer.
*/
_mod = mod;
}
2018-09-29 10:15:56 +00:00
int16_t <module_name>::begin() {
2018-07-12 09:43:37 +00:00
/*
"begin" method implementation MUST call the "init" method with appropriate settings.
*/
_mod->init();
2020-07-04 19:13:16 +00:00
2018-07-12 09:43:37 +00:00
/*
"begin" method SHOULD implement some sort of mechanism to verify the connection between Arduino and the module.
2020-07-04 19:13:16 +00:00
2021-11-14 10:34:13 +00:00
For example, reading a version register
2018-07-12 09:43:37 +00:00
*/
}