First sta-Core rework to work for Arduino

This commit is contained in:
dario
2023-11-23 08:53:39 +01:00
parent 32ff235822
commit d785e4b5ec
19 changed files with 94 additions and 33 deletions

View File

@@ -7,7 +7,12 @@
#include <sta/bus/can/id.hpp>
#include <cstdint>
#include <sta/config.hpp>
#ifdef STA_PLATFORM_ARDUINO
# include <stdint.h>
#else
# include <cstdint>
#endif // STA_PLATFORM_ARDUINO
namespace sta

View File

@@ -7,7 +7,12 @@
#include <sta/bus/can/id.hpp>
#include <cstdint>
#include <sta/config.hpp>
#ifdef STA_PLATFORM_ARDUINO
# include <stdint.h>
#else
# include <cstdint>
#endif // STA_PLATFORM_ARDUINO
namespace sta

View File

@@ -5,7 +5,12 @@
#ifndef STA_CORE_CAN_ID_HPP
#define STA_CORE_CAN_ID_HPP
#include <cstdint>
#include <sta/config.hpp>
#ifdef STA_PLATFORM_ARDUINO
# include <stdint.h>
#else
# include <cstdint>
#endif // STA_PLATFORM_ARDUINO
namespace sta

View File

@@ -5,7 +5,12 @@
#ifndef STA_CORE_CAN_ITER_HPP
#define STA_CORE_CAN_ITER_HPP
#include <cstdint>
#include <sta/config.hpp>
#ifdef STA_PLATFORM_ARDUINO
# include <stdint.h>
#else
# include <cstdint>
#endif // STA_PLATFORM_ARDUINO
namespace sta

View File

@@ -4,9 +4,6 @@
#include <sta/bus/interface.hpp>
#include <sta/mutex.hpp>
#include <cstddef>
#include <cstdint>
namespace sta
{
/**

View File

@@ -3,8 +3,14 @@
#include <sta/mutex.hpp>
#include <cstdint>
#include <cstddef>
#include <sta/config.hpp>
#ifdef STA_PLATFORM_ARDUINO
# include <stdint.h>
# include <stddef.h>
#else
# include <cstdint>
# include <cstddef>
#endif // STA_PLATFORM_ARDUINO
namespace sta
{

View File

@@ -9,9 +9,6 @@
#include <sta/bus/spi/spi.hpp>
#include <sta/gpio_pin.hpp>
#include <cstddef>
#include <cstdint>
namespace sta
{

View File

@@ -11,7 +11,12 @@
* @brief SPI interface.
*/
#include <cstdint>
#include <sta/config.hpp>
#ifdef STA_PLATFORM_ARDUINO
# include <stdint.h>
#else
# include <cstdint>
#endif // STA_PLATFORM_ARDUINO
namespace sta
{

View File

@@ -9,10 +9,6 @@
#include <sta/bus/spi/settings.hpp>
#include <sta/mutex.hpp>
#include <cstddef>
#include <cstdint>
namespace sta
{
/**

View File

@@ -1,3 +1,4 @@
#include <sta/devices/arduino/mcu/common.hpp>
#define STA_PRINTF_USE_STDLIB
#define STA_PRINTF_USE_STDLIB
#define STA_STDLIB_DISABLE

View File

@@ -5,9 +5,14 @@
#ifndef STA_CORE_PRINTABLE_HPP
#define STA_CORE_PRINTABLE_HPP
#include <cstddef>
#include <cstdint>
#include <sta/config.hpp>
#ifdef STA_PLATFORM_ARDUINO
# include <stdint.h>
# include <stddef.h>
#else
# include <cstddef>
# include <cstdint>
#endif
namespace sta
{

View File

@@ -8,8 +8,14 @@
#include <sta/bus/uart/uart.hpp>
#include <sta/debug/printing/printable.hpp>
#include <cstddef>
#include <cstdint>
#include <sta/config.hpp>
#ifdef STA_PLATFORM_ARDUINO
# include <stddef.h>
# include <stdint.h>
#else
# include <cstddef>
# include <cstdint>
#endif // STA_PLATFORM_ARDUINO
namespace sta

View File

@@ -11,7 +11,8 @@
#if defined(STA_PLATFORM_ARDUINO) || defined(DOXYGEN)
#include <sta/gpio_pin.hpp>
#include <cstdint>
#include <stdint.h>
namespace sta
{

View File

@@ -17,7 +17,11 @@
#ifdef STA_PRINTF_USE_STDLIB
# include <cstdio>
# ifdef STA_PLATFORM_ARDUINO
# include <stdio.h>
# else
# include <cstdio>
# endif // STA_PLATFORM_ARDUINO
#endif // STA_PRINTF_USE_STDLIB
#ifdef STA_PRINTF_USE_MPALAND
# include <printf.h>