Added missing godmode guard
This commit is contained in:
parent
915f3780cc
commit
e74cbe4c51
1 changed files with 21 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
RadioLib Module Template header file
|
RadioLib Module Template header file
|
||||||
|
|
||||||
Before opening pull request, please make sure that:
|
Before opening pull request, please make sure that:
|
||||||
1. All files MUST be compiled without errors using default Arduino IDE settings.
|
1. All files MUST be compiled without errors using default Arduino IDE settings.
|
||||||
2. All files SHOULD be compiled without warnings with compiler warnings set to "All".
|
2. All files SHOULD be compiled without warnings with compiler warnings set to "All".
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
4. Writing style SHOULD be consistent.
|
4. Writing style SHOULD be consistent.
|
||||||
5. Comments SHOULD be in place for the most important chunks of code and SHOULD be free of typos.
|
5. Comments SHOULD be in place for the most important chunks of code and SHOULD be free of typos.
|
||||||
6. To indent, 2 spaces MUST be used.
|
6. To indent, 2 spaces MUST be used.
|
||||||
|
|
||||||
If at any point you are unsure about the required style, please refer to the rest of the modules.
|
If at any point you are unsure about the required style, please refer to the rest of the modules.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -21,33 +21,33 @@
|
||||||
*/
|
*/
|
||||||
#include "Module.h"
|
#include "Module.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Only use the following include if the module implements methods for OSI transport layer control.
|
Only use the following include if the module implements methods for OSI transport layer control.
|
||||||
This concerns only modules similar to e.g. ESP8266.
|
This concerns only modules similar to e.g. ESP8266.
|
||||||
|
|
||||||
In this case, your class MUST implement all virtual methods of TransportLayer class.
|
In this case, your class MUST implement all virtual methods of TransportLayer class.
|
||||||
You also MUST provide crystal oscillator frequency and frequency configuration divisor step resolution
|
You also MUST provide crystal oscillator frequency and frequency configuration divisor step resolution
|
||||||
to the TransportLayer constructor.
|
to the TransportLayer constructor.
|
||||||
*/
|
*/
|
||||||
//#include "../protocols/TransportLayer.h"
|
//#include "../protocols/TransportLayer.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Only use the following include if the module implements methods for OSI physical layer control.
|
Only use the following include if the module implements methods for OSI physical layer control.
|
||||||
This concerns only modules similar to SX127x/RF69/CC1101 etc.
|
This concerns only modules similar to SX127x/RF69/CC1101 etc.
|
||||||
|
|
||||||
In this case, your class MUST implement all virtual methods of PhysicalLayer class.
|
In this case, your class MUST implement all virtual methods of PhysicalLayer class.
|
||||||
*/
|
*/
|
||||||
//#include "../protocols/PhysicalLayer.h"
|
//#include "../protocols/PhysicalLayer.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Register map
|
Register map
|
||||||
Definition of SPI/I2C register map SHOULD be placed here. The register map SHOULD have two parts:
|
Definition of SPI/I2C register map SHOULD be placed here. The register map SHOULD have two parts:
|
||||||
|
|
||||||
1 - Address map: only defines register names and addresses. Register names MUST match names in
|
1 - Address map: only defines register names and addresses. Register names MUST match names in
|
||||||
official documentation (datasheets etc.).
|
official documentation (datasheets etc.).
|
||||||
2 - Variable map: defines variables inside register. This functions as a bit range map for a specific register.
|
2 - Variable map: defines variables inside register. This functions as a bit range map for a specific register.
|
||||||
Bit range (MSB and LSB) as well as short description for each variable MUST be provided in a comment.
|
Bit range (MSB and LSB) as well as short description for each variable MUST be provided in a comment.
|
||||||
|
|
||||||
See RF69 and SX127x header files for examples of register maps.
|
See RF69 and SX127x header files for examples of register maps.
|
||||||
*/
|
*/
|
||||||
// <module_name> register map | spaces up to this point
|
// <module_name> register map | spaces up to this point
|
||||||
|
@ -59,9 +59,9 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Module class definition
|
Module class definition
|
||||||
|
|
||||||
The module class MAY inherit from the following classes:
|
The module class MAY inherit from the following classes:
|
||||||
|
|
||||||
1 - ISerial: Interface for Arduino Serial class, intended as a thin wrapper for modules that directly take
|
1 - ISerial: Interface for Arduino Serial class, intended as a thin wrapper for modules that directly take
|
||||||
Serial input (e.g. HC-05).
|
Serial input (e.g. HC-05).
|
||||||
2 - TransportLayer: In case the module implements methods for OSI transport layer control (e.g. ESP8266).
|
2 - TransportLayer: In case the module implements methods for OSI transport layer control (e.g. ESP8266).
|
||||||
|
@ -75,29 +75,31 @@ class <module_name> {
|
||||||
*/
|
*/
|
||||||
// constructor
|
// constructor
|
||||||
<module_name>(Module* module);
|
<module_name>(Module* module);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The class MUST implement at least one basic method called "begin".
|
The class MUST implement at least one basic method called "begin".
|
||||||
The "begin" method MUST initialize the module and return the status as int16_t type.
|
The "begin" method MUST initialize the module and return the status as int16_t type.
|
||||||
*/
|
*/
|
||||||
// basic methods
|
// basic methods
|
||||||
int16_t begin();
|
int16_t begin();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The class MAY implement additional methods.
|
The class MAY implement additional methods.
|
||||||
All implemented methods SHOULD return the status as int16_t type.
|
All implemented methods SHOULD return the status as int16_t type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef RADIOLIB_GODMODE
|
||||||
private:
|
private:
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
The class MUST contain private member "Module* _mod"
|
The class MUST contain private member "Module* _mod"
|
||||||
*/
|
*/
|
||||||
Module* _mod;
|
Module* _mod;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The class MAY contain additional private variables and/or methods.
|
The class MAY contain additional private variables and/or methods.
|
||||||
Private member variables MUST have a name prefixed with "_" (underscore, ASCII 0x5F)
|
Private member variables MUST have a name prefixed with "_" (underscore, ASCII 0x5F)
|
||||||
|
|
||||||
Usually, these are variables for saving module configuration, or methods that do not have to be exposed to the end user.
|
Usually, these are variables for saving module configuration, or methods that do not have to be exposed to the end user.
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue