@@ -1,3 +0,0 @@ | |||||
#include "Flash.h" | |||||
@@ -1,9 +1,9 @@ | |||||
#include <math.h> | |||||
#include "Gps.h" | #include "Gps.h" | ||||
#include "Config.h" | #include "Config.h" | ||||
#include "Hardware.h" | #include "Hardware.h" | ||||
#include "MainUnit.h" | #include "MainUnit.h" | ||||
#include "Logging.h" | #include "Logging.h" | ||||
#include "math.h" | |||||
#define LOGGER_NAME "Gps" | #define LOGGER_NAME "Gps" | ||||
@@ -1,13 +1,8 @@ | |||||
#include "Config.h" | |||||
#include <Wire.h> | |||||
#include "Hardware.h" | #include "Hardware.h" | ||||
#include "config/Hardware.h" | |||||
#include "config/Pins.h" | |||||
#include "Logging.h" | #include "Logging.h" | ||||
#include <SIM808.h> | |||||
#include <Wire.h> | |||||
#include <E24.h> | |||||
namespace hardware { | namespace hardware { | ||||
#define LOGGER_NAME "Hardware::sim808" | #define LOGGER_NAME "Hardware::sim808" | ||||
@@ -116,7 +111,7 @@ namespace hardware { | |||||
namespace i2c { | namespace i2c { | ||||
E24 eeprom = E24(E24Size_t::E24_512K, E24_ADDRESS); | |||||
E24 eeprom = E24(E24_SIZE, E24_ADDRESS); | |||||
uint8_t poweredCount = 0; | uint8_t poweredCount = 0; | ||||
void powerOn() { | void powerOn() { | ||||
@@ -1,7 +1,7 @@ | |||||
#include "MainUnit.h" | #include "MainUnit.h" | ||||
#include "Rtc.h" | #include "Rtc.h" | ||||
#include "Hardware.h" | #include "Hardware.h" | ||||
#include "config/Hardware.h" | |||||
#include "config/Pins.h" | |||||
#include "Logging.h" | #include "Logging.h" | ||||
#define LOGGER_NAME "MainUnit" | #define LOGGER_NAME "MainUnit" | ||||
@@ -1,9 +1,8 @@ | |||||
#include "Config.h" | |||||
#include "Network.h" | #include "Network.h" | ||||
#include "Hardware.h" | #include "Hardware.h" | ||||
#include "MainUnit.h" | #include "MainUnit.h" | ||||
#include "Rtc.h" | #include "Rtc.h" | ||||
#include "Config.h" | |||||
#include "Logging.h" | #include "Logging.h" | ||||
#define LOGGER_NAME "Network" | #define LOGGER_NAME "Network" | ||||
@@ -1,5 +1,5 @@ | |||||
#include "Rtc.h" | #include "Rtc.h" | ||||
#include "config/Hardware.h" | |||||
#include "config/Pins.h" | |||||
#include "Hardware.h" | #include "Hardware.h" | ||||
#include "Logging.h" | #include "Logging.h" | ||||
@@ -2,7 +2,7 @@ | |||||
#if BACKUP_ENABLE_SDCARD | #if BACKUP_ENABLE_SDCARD | ||||
#include "SdCard.h" | #include "SdCard.h" | ||||
#include "config/Hardware.h" | |||||
#include "config/Pins.h" | |||||
namespace hardware { | namespace hardware { | ||||
namespace sdcard { | namespace sdcard { | ||||
@@ -1,24 +1,13 @@ | |||||
/** | /** | ||||
* Defines Arduino pins number connected to external systems. | |||||
* Defines external hardware parameters | |||||
*/ | */ | ||||
#pragma once | |||||
#include <E24.h> | #include <E24.h> | ||||
#include <SoftwareSerial.h> | #include <SoftwareSerial.h> | ||||
#define SIM_RST 5 ///< SIM808 RESET | |||||
#define SIM_RX 6 ///< SIM808 RXD | |||||
#define SIM_TX 7 ///< SIM808 TXD | |||||
#define SIM_PWR 9 ///< SIM808 PWRKEY | |||||
#define SIM_STATUS 8 ///< SIM808 STATUS | |||||
#define E24_ADDRESS E24_DEFAULT_ADDR ///< I2C address of the 24xxx chip | |||||
#define E24_SIZE E24Size_t::E24_512K ///< 24xxx chip size | |||||
#define I2C_PWR A0 ///< Used to drive I2C power supply | |||||
#define SD_SS SS | |||||
#define SIM_RI 2 ///< Interrupt pin connected to SIM RI. | |||||
#define RTC_WAKE 3 ///< Interrupt pin connected to DS3231 !INT/SQW | |||||
#define E24_ADDRESS E24_DEFAULT_ADDR ///< I2C address of the 24xxx chip | |||||
#define SIM808_BAUDRATE 4800 ///< Control the baudrate use to communicate with the SIM808 module | |||||
#define SIM_SERIAL_TYPE SoftwareSerial ///< Type of variable that holds the Serial communication with SIM808 | #define SIM_SERIAL_TYPE SoftwareSerial ///< Type of variable that holds the Serial communication with SIM808 | ||||
#define SIM_SERIAL SIM_SERIAL_TYPE(SIM_TX, SIM_RX) ///< Definition of the instance that holds the Serial communication with SIM808 | #define SIM_SERIAL SIM_SERIAL_TYPE(SIM_TX, SIM_RX) ///< Definition of the instance that holds the Serial communication with SIM808 |
@@ -1,9 +1,10 @@ | |||||
#pragma once | #pragma once | ||||
#include "System.h" | #include "System.h" | ||||
#include "Sleeps.h" | |||||
#include "Hardware.h" | |||||
#include "Gps.h" | #include "Gps.h" | ||||
#include "Network.h" | #include "Network.h" | ||||
#include "Sleeps.h" | |||||
#include "Alerts.h" | #include "Alerts.h" | ||||
/** | /** | ||||
@@ -0,0 +1,16 @@ | |||||
/** | |||||
* Defines Arduino pins number connected to external systems. | |||||
*/ | |||||
#pragma once | |||||
#define SIM_RST 5 ///< SIM808 RESET | |||||
#define SIM_RX 6 ///< SIM808 RXD | |||||
#define SIM_TX 7 ///< SIM808 TXD | |||||
#define SIM_PWR 9 ///< SIM808 PWRKEY | |||||
#define SIM_STATUS 8 ///< SIM808 STATUS | |||||
#define I2C_PWR A0 ///< Used to drive I2C power supply | |||||
#define SD_SS SS | |||||
#define SIM_RI 2 ///< Interrupt pin connected to SIM RI. | |||||
#define RTC_WAKE 3 ///< Interrupt pin connected to DS3231 !INT/SQW |
@@ -1,11 +1,5 @@ | |||||
#pragma once | #pragma once | ||||
/** | |||||
\def SIM808_BAUDRATE | |||||
Control the baudrate use to communicate with the SIM808 module | |||||
*/ | |||||
#define SIM808_BAUDRATE 4800 | |||||
/** | /** | ||||
\def CONFIG_ADDR | \def CONFIG_ADDR | ||||
Address of the config block in the I2C EEPROM chip. | Address of the config block in the I2C EEPROM chip. | ||||