Commit Graph
68 Commits
Author SHA1 Message Date
d00616 726a20dad9 Add nrf5 platform (#830)
* 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.
2017-05-14 11:53:01 +02:00
Marcelo Aquino a4c7b249c1 Linux: Fix Ethernet client and server (#836)
- Fix documentation.
- Add function close() to client class.
- Function connected() now return true if the connection is in
  stablished state or there is still unread data.
- Update hasClient() to check if any client has disconnected.
- Fix _accept() to better handle the case of maximum clients reached.
- Fix peek() to return the next byte of the read queue.
- Simplifies write() of the server class.
- Implements flush().
- Updates read() to non-blocking type, the same way as in Arduino.
2017-05-13 09:49:16 +02:00
Marcelo Aquino 95f719b604 Linux: Fix interrupt handler (#835)
Minor fix to configure.
2017-05-11 15:20:57 +02:00
Marcelo Aquino fa673bdb3e Linux: Fix rfm69 power level build error (#829) 2017-04-28 19:11:41 +02:00
Marcelo Aquino 66ff5b2880 Linux: Add support for RFM69 (#823) 2017-04-19 22:40:21 +02:00
Marcelo Aquino 4c31e22d6f Restructure RPi files (#827)
- Restructure SPi files for linux and RPi
- Update RPi revision detection (#826)
2017-04-19 22:03:10 +02:00
Olivier 818f887926 Polishing code (#803) 2017-04-02 20:03:59 +02:00
Patrick Fallberg 7e6db413c7 Security personalizer rewritten (#794)
* Removed ability to lock data section
* Introduced "guided mode" to simplify process
* Refactored the sketch to be less monolithic
* Print details and instructions in tables
* Use device unique ID as serial when
* Calculate and store personalization checksum
* Print serial in a copy+paste friendly manner (fixes #804)
* Clarify meaning of UART confirmation (fixes #805)
2017-04-02 15:37:21 +02:00
Olivier b132a8a81e Transport update (#722)
* Major transport rework

* Adjust signal report calculations

* Minor driver optimizations

* Implement sanity check in legacy RFM69 driver

* Additional RFM69 rework

* RFM95 encryption

* Polishing
2017-03-28 20:31:08 +02:00
Olivier 63b8d935c8 Fix RFM95 driver (RPi) (#800) 2017-03-26 11:30:54 +02:00
Olivier cde5d8f7c3 Add STM32F1 HW support (#795) 2017-03-25 20:01:31 +01:00
Olivier 61a415c422 Code cleanup (#787)
* Cleanup Core

* SAMD adjustments
2017-03-15 19:05:17 +01:00
Olivier 7824e12823 I2C eeprom write fix for SAMD (#786)
* I2C eeprom write fix for samd

* Implement extEEPROM library for SAMD
2017-03-06 16:45:58 +01:00
Patrick Fallberg 91cb61b19e Fix doxygen problem in SPI.h 2017-02-02 10:00:29 +01:00
Olivier 815084b4fa AVR: Restrict fast pin function use (#739) 2017-01-15 20:10:15 +01:00
Marcelo Aquino 2e0f6b6229 Linux: Add support for SPIDEV (#734)
RPi and Linux refactor.

Add GPIO Sysfs for GPIO operations.

Update configure script.

Fix some cppcheck warnings.

Add serial emulation that prints to stdout.

Fix some file headers.
2017-01-14 23:50:21 +01:00
Olivier aa5cecfca1 OTA: Add incoming FW block check (#718) 2017-01-03 20:19:00 +01:00
Olivier 01711becd1 Update RFM95 driver (#709) 2016-12-29 14:24:48 +01:00
Olivier dd9dff77ed Minor optimizations & code harmonization (#708) 2016-12-28 22:47:41 +01:00
Olivier 7445b065ec Reduce memory footprint (#703) 2016-12-26 23:40:32 +01:00
Patrick Fallberg 1040fbebc5 Refactor signing backend (#690)
Cleaned up the AES driver and removed some cppcheck isues
in the process.
2016-12-25 16:12:40 +01:00
Bruce Lacey 3be2516ef8 Update RFM69 to MYS coding standards (#694) 2016-12-17 12:50:52 -08:00
Marcelo Aquino 707442b257 RPi: Use logError when possible (#689) 2016-12-12 22:23:19 +01:00
Olivier 37881d56ba Fix Cppcheck warnings (#684) 2016-12-10 12:46:52 -08:00
Patrick Fallberg 8e1ef13804 Repo restyled using astyle (#683)
The rules are in .tools/astyle/config/style.cfg
and can also be reviewed at
https://www.mysensors.org/view/260#coding-guidelines-core-library
2016-12-07 23:44:29 +01:00
Marcelo Aquino 62b74bb88a RPi: Improve board revision detection (#681)
Revision detection is done at runtime, the configure script has been
simplified to reflect this.
2016-12-07 21:17:59 +01:00
tekka007 de82269d68 Add DigitalWriteFast support for Atmega1284 2016-11-27 22:57:28 +01:00
Olivier 5bc5eff1f9 Fix timeout and add RFM95 test 2016-11-24 16:55:42 +01:00
Marcelo Aquino 9ef1df5407 RPi: Fix RFM95 build (#654) 2016-11-24 15:59:01 +01:00
Henrik Ekblad 41f4b4e845 Merge pull request #649 from tekka007/transportRFM95Update
RFM95 updates for RPI
2016-11-20 21:03:48 +01:00
Henrik Ekblad 3f33d0d4a1 Merge pull request #638 from marceloaqno/rpi-arduino-libs
RPi: Improve build process
2016-11-19 19:32:40 +01:00
Marcelo Aquino 330a910f3d RPi: Improve build process
Add option to set an external arduino libraries directory.
All libraries from this folder will be compile and available for use
in the gateway.
Some Arduino libraries can be used on Linux/RPI with minor adjustments,
but there are some that will have to be completely rewritten.

The build process uses a separate folder for objects and binary files
which can be set by the user.

Initialize the bcm2835 inside a class constructor to fix cases where
pin operations are used before hwInit().

Fix SPI pins default values.

Fix activation interrupt functions.

Fix some headers.

Rename gateway binary and services to mysgw.
2016-11-19 11:49:18 -02:00
Olivier 865c4a773a RFM95 updates for RPI 2016-11-16 22:52:50 +01:00
Henrik Ekblad 9037924f06 Merge pull request #621 from tekka007/TransportRFM95
Implement RFM95 transport layer
2016-11-16 20:40:34 +01:00
Olivier 144c7b9d2f Implement RFM95 transport layer 2016-11-14 21:33:11 +01:00
Olivier 6ad18b641e Fixed missing RF24_NOP refactoring (#635) 2016-11-06 10:55:32 +01:00
Olivier 6636a97562 Harmonize RF24 definitions (#629) 2016-11-05 09:53:12 +01:00
Marcelo Aquino 76dea1532c RPi: Add support for RS485 transport
Remove serial print from MyTransportRS485.cpp to increase speed.
2016-10-21 09:01:37 -02:00
Henrik Ekblad f31ec4b3ae Merge pull request #618 from marceloaqno/dev-rpi-signing
RPi: Add support for signing messages
2016-10-19 08:02:53 +02:00
Marcelo Aquino ec1c209645 RPi: Add support for signing messages 2016-10-18 22:11:47 -02:00
Marcelo Aquino 2be804a1ef RPi: Log refactor 2016-10-18 16:55:47 -02:00
Henrik Ekblad 75aad5de35 Merge pull request #617 from tekka007/PinModeAddon
Fix INPUT_PULLUP option for hwPinMode()
2016-10-16 21:46:55 +02:00
Olivier 4a4eed295c Fix INPUT_PULLUP option for hwPinMode() 2016-10-16 21:00:52 +02:00
Marcelo Aquino 69ac4b759a RPi: Add support for I2C
Add MyHw file for RaspberryPi.

Fix compilation warnings in x86.

Fix some error messages.
2016-10-16 13:40:23 -02:00
Thomas Mørch 54776a4520 Added {} to control structures for clarity (#600) 2016-10-16 12:46:42 +02:00
Olivier 80659ddb00 HAL for digitalRead/Write() and pinMode() (#607) 2016-10-16 10:12:24 +02:00
Marcelo Aquino fab2112f9b Use mysensors built-in nrf24 library for RPi 2016-09-14 23:26:12 -03:00
Marcelo Aquino 09103e9c04 Add run time options to RPi gateway 2016-09-08 15:56:37 -03:00
Marcelo Aquino b4f4e28545 Add support for PTY to RPi serial gateway 2016-09-03 12:39:37 -03:00
Marcelo Aquino 412e41967f Add support for serial gateway to Rpi 2016-08-21 21:01:26 -03:00