kopia lustrzana https://github.com/jgromes/RadioLib
22 wiersze
588 B
C++
22 wiersze
588 B
C++
#include "<module_name>.h"
|
|
|
|
<module_name>::<module_name>(Module* mod) {
|
|
/*
|
|
Constructor implementation MUST assign the provided "mod" pointer to the private "_mod" pointer.
|
|
*/
|
|
_mod = mod;
|
|
}
|
|
|
|
uint8_t <module_name>::begin() {
|
|
/*
|
|
"begin" method implementation MUST call the "init" method with appropriate settings.
|
|
*/
|
|
_mod->init();
|
|
|
|
/*
|
|
"begin" method SHOULD implement some sort of mechanism to verify the connection between Arduino and the module.
|
|
|
|
For example, sending AT command for UART modules, or reading a version register for SPI/I2C modules
|
|
*/
|
|
}
|