acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

ModuleTemplate.cpp (567B)

      1 #include "<module_name>.h"
      2 #if !defined(RADIOLIB_EXCLUDE_<module_name>)
      3 
      4 <module_name>::<module_name>(Module* mod) {
      5   /*
      6     Constructor implementation MUST assign the provided "mod" pointer to the private "_mod" pointer.
      7   */
      8   _mod = mod;
      9 }
     10 
     11 int16_t <module_name>::begin() {
     12   /*
     13     "begin" method implementation MUST call the "init" method with appropriate settings.
     14   */
     15   _mod->init();
     16 
     17   /*
     18     "begin" method SHOULD implement some sort of mechanism to verify the connection between Arduino and the module.
     19 
     20     For example, reading a version register
     21   */
     22 }