* Add NVRAM support This is an EEPROM replacement based on MCU's internal Flash memory. The NVRAM class is designed to be stateless. Each operation is written to flash immediately. The last 16k(nRF51)/32k(nRF52) of Flash memory are managed by the VirtualPage class. This class allows writing a single emulated 4k page up 40,000 times. The NVRAM class is a log based byte-wise storage allowing up to 40,000,000 writes depending on the number of used addresses. Each four allocated addresses from the beginning of the NVRAM reduce the write log by one. When first 256 bytes of the emulated storage are used, there is an average writing capacity of 145,000 cycles per byte. When the write log is full, the NVRAM is compressed into a new flash page. After a new page is ready, the old page is released. This process can take up to 4500 ms and cannot be interrupted. The NVRAM functionality can easily be ported to ESP8266 or SAMD by providing a Flash interface. * Add NRF5 platform support This is the support of the Nordic Semiconductor NRF51 (nrf51822, nrf51422) and NRF52 (nrf52832) platform. Based on arduino-nRF5 (https://github.com/sandeepmistry/arduino-nRF5). The included radio driver is compatible with the NRF24 devices. Using a SoftDevice (BLE)is not supported and must be removed before flashing MySensors with a "mass_erase" operation.
43 lines
692 B
C
43 lines
692 B
C
/*
|
|
* nRF5 output modes
|
|
*/
|
|
// Standard 0, Standard 1
|
|
#ifndef OUTPUT_S0S1
|
|
#define OUTPUT_S0S1 (0x10)
|
|
#endif
|
|
|
|
// High Drive 0, Standard 1
|
|
#ifndef OUTPUT_H0S1
|
|
#define OUTPUT_H0S1 (0x11)
|
|
#endif
|
|
|
|
// Standard 0, High Drive 1
|
|
#ifndef OUTPUT_S0H1
|
|
#define OUTPUT_S0H1 (0x12)
|
|
#endif
|
|
|
|
// High Drive both
|
|
#ifndef OUTPUT_H0H1
|
|
#define OUTPUT_H0H1 (0x13)
|
|
#endif
|
|
|
|
// Disconnected 0, Standard 1
|
|
#ifndef OUTPUT_D0S1
|
|
#define OUTPUT_D0S1 (0x14)
|
|
#endif
|
|
|
|
// Disconnected 0, High Drive 1
|
|
#ifndef OUTPUT_D0H1
|
|
#define OUTPUT_D0H1 (0x15)
|
|
#endif
|
|
|
|
// Standard 0, Disconnected 1
|
|
#ifndef OUTPUT_S0D1
|
|
#define OUTPUT_S0D1 (0x16)
|
|
#endif
|
|
|
|
// High Drive 0, Disconnected 1
|
|
#ifndef OUTPUT_H0D1
|
|
#define OUTPUT_H0D1 (0x17)
|
|
#endif
|