Merge pull request #638 from marceloaqno/rpi-arduino-libs
RPi: Improve build process
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
|
||||
* network topology allowing messages to be routed to nodes.
|
||||
*
|
||||
* Created by Marcelo Aquino <marceloaqno@gmail.org>
|
||||
* Copyright (C) 2016 Marcelo Aquino
|
||||
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
|
||||
* Copyright (C) 2013-2016 Sensnology AB
|
||||
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
|
||||
*
|
||||
* Documentation: http://www.mysensors.org
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
|
||||
* network topology allowing messages to be routed to nodes.
|
||||
*
|
||||
* Created by Marcelo Aquino <marceloaqno@gmail.org>
|
||||
* Copyright (C) 2016 Marcelo Aquino
|
||||
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
|
||||
* Copyright (C) 2013-2016 Sensnology AB
|
||||
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
|
||||
*
|
||||
* Documentation: http://www.mysensors.org
|
||||
|
||||
+2
-8
@@ -5,8 +5,8 @@
|
||||
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
|
||||
* network topology allowing messages to be routed to nodes.
|
||||
*
|
||||
* Created by Marcelo Aquino <marceloaqno@gmail.org>
|
||||
* Copyright (C) 2016 Marcelo Aquino
|
||||
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
|
||||
* Copyright (C) 2013-2016 Sensnology AB
|
||||
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
|
||||
*
|
||||
* Documentation: http://www.mysensors.org
|
||||
@@ -22,17 +22,11 @@
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include "SoftEeprom.h"
|
||||
#include "log.h"
|
||||
|
||||
static SoftEeprom eeprom = SoftEeprom(MY_LINUX_CONFIG_FILE, 1024); // ATMega328 has 1024 bytes
|
||||
|
||||
void hwInit()
|
||||
{
|
||||
if (!bcm2835_init()) {
|
||||
logError("Failed to initialized bcm2835.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef MY_GATEWAY_SERIAL
|
||||
MY_SERIALDEVICE.begin(MY_BAUD_RATE);
|
||||
#ifdef MY_LINUX_SERIAL_GROUPNAME
|
||||
|
||||
+19
-2
@@ -5,8 +5,8 @@
|
||||
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
|
||||
* network topology allowing messages to be routed to nodes.
|
||||
*
|
||||
* Created by Marcelo Aquino <marceloaqno@gmail.org>
|
||||
* Copyright (C) 2016 Marcelo Aquino
|
||||
* Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
|
||||
* Copyright (C) 2013-2016 Sensnology AB
|
||||
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
|
||||
*
|
||||
* Documentation: http://www.mysensors.org
|
||||
@@ -20,7 +20,24 @@
|
||||
#ifndef MyHwRPi_h
|
||||
#define MyHwRPi_h
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "MyHwLinuxGeneric.h"
|
||||
#include "log.h"
|
||||
#include "bcm2835.h"
|
||||
|
||||
class Bcm2835Init {
|
||||
public:
|
||||
Bcm2835Init() {
|
||||
if (!bcm2835_init()) {
|
||||
logError("Failed to initialized bcm2835.\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
~Bcm2835Init() {
|
||||
bcm2835_close();
|
||||
}
|
||||
};
|
||||
Bcm2835Init bcm2835Init;
|
||||
|
||||
#undef hwDigitalWrite
|
||||
inline void hwDigitalWrite(uint8_t, uint8_t);
|
||||
|
||||
@@ -102,7 +102,7 @@ static int daemonize(void)
|
||||
|
||||
void print_usage()
|
||||
{
|
||||
printf("Usage: mysGateway [options]\n\n" \
|
||||
printf("Usage: mysgw [options]\n\n" \
|
||||
"Options:\n" \
|
||||
" -h, --help Display a short summary of all program options.\n" \
|
||||
" -d, --debug Enable debug.\n" \
|
||||
@@ -154,7 +154,7 @@ void generate_soft_sign_hmac_key()
|
||||
|
||||
print_soft_sign_hmac_key(key);
|
||||
|
||||
printf("To use this key, run mysGateway with:\n"
|
||||
printf("To use this key, run mysgw with:\n"
|
||||
" --set-soft-hmac-key=");
|
||||
for (int i = 0; i < 32; i++) {
|
||||
printf("%02X", key[i]);
|
||||
@@ -226,7 +226,7 @@ void generate_soft_sign_serial_key()
|
||||
|
||||
print_soft_sign_serial_key(key);
|
||||
|
||||
printf("To use this key, run mysGateway with:\n"
|
||||
printf("To use this key, run mysgw with:\n"
|
||||
" --set-soft-serial-key=");
|
||||
for (int i = 0; i < 9; i++) {
|
||||
printf("%02X", key[i]);
|
||||
@@ -298,7 +298,7 @@ void generate_aes_key()
|
||||
|
||||
print_aes_key(key);
|
||||
|
||||
printf("To use this key, run mysGateway with:\n"
|
||||
printf("To use this key, run mysgw with:\n"
|
||||
" --set-aes-key=");
|
||||
for (int i = 0; i < 16; i++) {
|
||||
printf("%02X", key[i]);
|
||||
|
||||
Reference in New Issue
Block a user