Add before() for initialisations before radio hogs SPI

Fix #293
This commit is contained in:
Henrik Ekblad
2016-02-06 12:08:28 +01:00
parent 528e09d5e3
commit 469cbb7d0c
4 changed files with 10 additions and 2 deletions
@@ -64,6 +64,9 @@ void _begin() {
hwInit();
#endif
// Call before() in sketch (if it exists)
if (before) before();
debug(PSTR("Starting " MY_NODE_TYPE " (" MY_CAPABILIIES ", " LIBRARY_VERSION ")\n"));
signerInit();
+1
View File
@@ -236,6 +236,7 @@ extern MyMessage _msgTmp; // Buffer for temporary messages (acks and nonces amo
void receive(const MyMessage &message) __attribute__((weak));
void receiveTime(unsigned long) __attribute__((weak));
void presentation() __attribute__((weak));
void before() __attribute__((weak));
void setup() __attribute__((weak));
void loop() __attribute__((weak));