Commit Graph
31 Commits
Author SHA1 Message Date
Marcelo Aquino 54fb250ab2 Linux: Serial minor update (#1053)
- The symlink name for the PTY device is set using --my-serial-port
  making --my-serial-pty deprecated
- Replace MY_LINUX_IS_SERIAL_PTY with MY_LINUX_SERIAL_IS_PTY
- MY_DEBUGDEVICE can be used to print debug messages from MySensors
  (as it is currently in the other architectures)
- Rename SerialSimulator class to StdInOutStream
- Remove old deprecated option --my-radio
2018-02-13 13:22:27 +01:00
Mikael Falkvidd ca73ae20d6 Linux/SerialPort: Log success message (#1021)
This log message makes the Serial gateway print the serial port path,
similar to how the Ethernet gateway prints IP and port.

Example log output:
mysgw: Serial port /dev/MyCoolTTY (115200 baud) created
2018-01-07 14:52:08 +01:00
Patrick Fallberg 2d5404de97 CppCheck cleanup (#975)
* Add support for inline cppcheck suppressions
* Clean out all known cppcheck issues
* Terminate toll-gate on found cppcheck issues
2017-11-07 20:37:36 +01:00
Mikael Falkvidd a941827157 Use bool instead of boolean in drivers (#888)
In the Arduino IDE, boolean is an alias for bool.
The Arduino IDE might deprecate boolean in the future. See
https://github.com/arduino/Arduino/issues/4673 for details.

Command:
find drivers -type f | xargs sed -i 's/boolean/bool/g'
2017-07-05 16:23:27 +02:00
Marcelo Aquino fb3d936d4c Linux: Binds to MY_IP_ADDRESS in client mode (#849) 2017-05-21 14:27:22 +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 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
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
Marcelo Aquino 707442b257 RPi: Use logError when possible (#689) 2016-12-12 22:23:19 +01: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 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
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
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
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
Marcelo Aquino cb8c98431e Fix compilation errors for MQTT gateway 2016-08-19 13:45:51 -03:00
Marcelo Aquino b8d4a6a943 Improve build process for Linux 2016-08-17 23:42:27 -03:00
Marcelo Aquino 211afb17c4 Doxygenize Linux drivers 2016-08-16 13:43:24 -03:00
Marcelo Aquino 490037d285 Use non-blocking socket for EthernetServer
* Non-blocking socket

To simplify the class design and better mimics the Arduino version

* Doxygenize EthernetServer class
2016-08-16 13:43:22 -03:00
Marcelo Aquino dad6732f38 Include .h instead of .cpp when possible
* Move implementation code from Arduino.h
2016-08-16 13:43:21 -03:00
Marcelo Aquino 768b70e882 Fix conflicts with arduino macros and stdlib 2016-08-16 13:43:19 -03:00
Konst Kolesnichenko 43e5a7ddf9 Fixed build error 2016-08-16 13:42:53 -03:00
Marcelo Aquino 6b756335d0 Refactor RaspberryPi port 2016-08-16 13:42:51 -03:00