Nrf5 improvements (#938)

* Fix NRF5_ESB_readMessage, allways enable radio

* NRF5: fixes and improvements

- Compiles with arduino core for nRF52 (primo)
  MY_RADIO_NRF5_ESB stays unsupported with primo!

- Split ACK negation flag into
    MY_NRF5_ESB_REVERSE_ACK_TX
    MY_NRF5_ESB_REVERSE_ACK_RX

- MY_RADIO_NRF5_ESB changes to act more than NRF24

- MY_RADIO_NRF5_ESB better support for powerdown/standby

- Moved initialization from MyMainNRF5 to hwInit()
This commit is contained in:
d00616
2017-09-30 22:55:55 +02:00
committed by Henrik Ekblad
parent 9ee837199e
commit 1b1cf8ff9c
9 changed files with 159 additions and 126 deletions
+20 -4
View File
@@ -29,12 +29,17 @@
#endif
// Define NRF5_SOFTDEVICE when SoftDevice found
#if defined(S110) || defined(S130) || defined(S132)
#ifndef NRF5_SOFTDEVICE
#define NRF5_SOFTDEVICE
#if defined(S110) || defined(S130) || defined(S132) || defined(S140)
#ifndef SOFTDEVICE_PRESENT
#define SOFTDEVICE_PRESENT
#endif
#endif
// Define ARDUINO_ARCH_NRF5, if not defined
#ifndef ARDUINO_ARCH_NRF5
#define ARDUINO_ARCH_NRF5
#endif
#include "drivers/NRF5/nrf5_wiring_digital.c"
#include "drivers/NRF5/wdt.h"
#include "drivers/NVM/NVRAM.h"
@@ -42,8 +47,19 @@
#include <avr/dtostrf.h>
#include <nrf.h>
// mapping
#ifndef strncpy_P
#define strncpy_P strncpy
#endif
#ifndef snprintf_P
#define snprintf_P(s, f, ...) snprintf((s), (f), __VA_ARGS__)
#endif
#ifndef vsnprintf_P
#define vsnprintf_P vsnprintf
#endif
#ifndef printf_P
#define printf_P printf
#endif
#define MIN(a,b) min(a,b)
#define MAX(a,b) max(a,b)
@@ -139,4 +155,4 @@ typedef struct {
#define MY_CRITICAL_SECTION
#endif /* DOXYGEN || CPPCHECK */
#endif // #ifdef ARDUINO_ARCH_NRF5
#endif // #ifndef MyHwNRF5_h