arduino-emulator
|
We provide the WiFi class to simulate the Arduino WIFI. In in Linux we can expect that networking is already active. So we dont need to do anything. More...
Classes | |
struct | __container__ |
class | ArduinoLogger |
A simple Logger that writes messages dependent on the log level. More... | |
class | CanMsg |
class | CanMsgRingbuffer |
class | Client |
class | DMABuffer |
class | DMAPool |
class | EthernetClient |
class | EthernetImpl |
class | EthernetServer |
class | EthernetUDP |
class | FileStream |
We use the FileStream class to be able to provide Serail, Serial1 and Serial2 outside of the Arduino environment;. More... | |
class | GPIOSource |
Abstract interface for providing GPIO hardware implementations. More... | |
class | GPIOWrapper |
GPIO wrapper class that provides flexible hardware abstraction. More... | |
class | HardwareCAN |
class | HardwareGPIO |
Abstract base class for GPIO (General Purpose Input/Output) functions. More... | |
class | HardwareGPIO_RPI |
GPIO hardware abstraction for Raspberry Pi in the Arduino emulator. More... | |
class | HardwareI2C |
class | HardwareI2C_RPI |
Implementation of I2C communication for Raspberry Pi using Linux I2C device interface. More... | |
class | HardwareSerial |
class | HardwareService |
Provides a virtualized hardware communication service for SPI, I2C, I2S, and GPIO over a stream. More... | |
class | HardwareSetupRemote |
Configures and manages remote hardware interfaces for Arduino emulation. More... | |
class | HardwareSetupRPI |
Sets up hardware interfaces for Raspberry Pi (GPIO, I2C, SPI). More... | |
class | HardwareSPI |
class | HardwareSPI_RPI |
Implementation of SPI communication for Raspberry Pi using Linux SPI device interface. More... | |
class | I2CSource |
Abstract interface for providing I2C hardware implementations. More... | |
class | I2CWrapper |
I2C wrapper class that provides flexible hardware abstraction. More... | |
class | IPAddress |
class | NetworkClientSecure |
NetworkClientSecure based on wolf ssl. More... | |
class | PluggableUSB_ |
class | PluggableUSBModule |
class | |
class | Printable |
class | RemoteGPIO |
Remote GPIO implementation that operates over a communication stream. More... | |
class | RemoteI2C |
Remote I2C implementation that operates over a communication stream. More... | |
class | RemoteSerialClass |
Remote Serial implementation that operates over a communication stream. More... | |
class | RemoteSPI |
Remote SPI implementation that operates over a communication stream. More... | |
class | RingBufferExt |
Implementation of a Simple Circular Buffer. Instead of comparing the position of the read and write pointer in order to figure out if we still have characters available or space left to write we keep track of the actual length which is easier to follow. This class was implemented to support the reading and writing of arrays. More... | |
class | RingBufferN |
class | SerialImpl |
class | Server |
class | SocketImpl |
class | SocketImplSecure |
SSL Socket using wolf ssl. For error codes see https://wolfssl.jp/docs-3/wolfssl-manual/appendix-c. More... | |
class | SPISettings |
class | SPISource |
Abstract interface for providing SPI hardware implementations. More... | |
class | SPIWrapper |
SPI wrapper class that provides flexible hardware abstraction. More... | |
class | SPSCQueue |
class | StdioDevice |
Provides a Stream interface for standard input/output operations outside the Arduino environment. More... | |
class | Stream |
class | String |
class | StringSumHelper |
class | UDP |
class | WifiMock |
class | WiFiUDPStream |
UDP Stream implementation for single-target communication. More... | |
Typedefs | |
typedef RingBufferN< SERIAL_BUFFER_SIZE > | RingBuffer |
typedef HardwareSPI | SPIClass |
using | TwoWire = I2CWrapper |
Type alias for Arduino compatibility - TwoWire refers to I2CWrapper. | |
template<typename T > | |
using | voidTemplateFuncPtrParam = void(*)(T param) |
using | WiFiClient = EthernetClient |
Alias for EthernetClient to provide WiFiClient compatibility. | |
using | WiFiClientSecure = EthernetClient |
Alias for EthernetClient to provide WiFiClientSecure compatibility when HTTPS is not used. | |
using | WiFiServer = EthernetServer |
Alias for EthernetServer to provide WiFiServer compatibility. | |
using | WiFiUDP = EthernetUDP |
Alias for EthernetUDP to provide WiFiUDP compatibility. | |
Enumerations | |
enum | { DMA_BUFFER_READ = (1 << 0) , DMA_BUFFER_WRITE = (1 << 1) , DMA_BUFFER_DISCONT = (1 << 2) , DMA_BUFFER_INTRLVD = (1 << 3) } |
enum | HWCalls { I2cBegin0 , I2cBegin1 , I2cEnd , I2cSetClock , I2cBeginTransmission , I2cEndTransmission1 , I2cEndTransmission , I2cRequestFrom3 , I2cRequestFrom2 , I2cOnReceive , I2cOnRequest , I2cWrite , I2cAvailable , I2cRead , I2cPeek , SpiTransfer , SpiTransfer8 , SpiTransfer16 , SpiUsingInterrupt , SpiNotUsingInterrupt , SpiBeginTransaction , SpiEndTransaction , SpiAttachInterrupt , SpiDetachInterrupt , SpiBegin , SpiEnd , GpioPinMode , GpioDigitalWrite , GpioDigitalRead , GpioAnalogRead , GpioAnalogReference , GpioAnalogWrite , GpioTone , GpioNoTone , GpioPulseIn , GpioPulseInLong , SerialBegin , SerialEnd , SerialWrite , SerialRead , SerialAvailable , SerialPeek , SerialFlush , I2sSetup , I2sBegin3 , I2sBegin2 , I2sEnd , I2sAvailable , I2sRead , I2sPeek , I2sFlush , I2sWrite , I2sAvailableForWrite , I2sSetBufferSize } |
We virtualize the hardware and send the requests and replys over a stream. | |
enum | IPType { IPv4 , IPv6 } |
enum | LookaheadMode { SKIP_ALL , SKIP_NONE , SKIP_WHITESPACE } |
enum | SPIBusMode { SPI_CONTROLLER = 0 , SPI_PERIPHERAL = 1 } |
enum | SPIMode { SPI_MODE0 = 0 , SPI_MODE1 = 1 , SPI_MODE2 = 2 , SPI_MODE3 = 3 } |
enum | wifi_ps_type_t { WIFI_PS_NONE , WIFI_PS_MIN_MODEM , WIFI_PS_MAX_MODEM } |
enum | wl_status_t { WL_NO_SHIELD = 255 , WL_IDLE_STATUS = 0 , WL_NO_SSID_AVAIL , WL_SCAN_COMPLETED , WL_CONNECTED , WL_CONNECT_FAILED , WL_CONNECTION_LOST , WL_DISCONNECTED } |
Functions | |
struct | __attribute__ ((packed)) |
template<typename T > | |
void | attachInterrupt (pin_size_t interruptNum, voidTemplateFuncPtrParam< T * > userFunc, PinStatus mode, T *param) |
template<typename T > | |
void | attachInterrupt (pin_size_t interruptNum, voidTemplateFuncPtrParam< T > userFunc, PinStatus mode, T ¶m) |
uint32_t | CanExtendedId (uint32_t const id) |
uint32_t | CanStandardId (uint32_t const id) |
char * | defaultInterface () |
void | digitalWrite (pin_size_t pinNumber, int status) |
bool | isAlpha (int c) __attribute__((always_inline)) |
bool | isAlphaNumeric (int c) __attribute__((always_inline)) |
bool | isAscii (int c) __attribute__((always_inline)) |
bool | isControl (int c) __attribute__((always_inline)) |
bool | isDigit (int c) __attribute__((always_inline)) |
bool | isGraph (int c) __attribute__((always_inline)) |
bool | isHexadecimalDigit (int c) __attribute__((always_inline)) |
bool | isLowerCase (int c) __attribute__((always_inline)) |
bool | isPrintable (int c) __attribute__((always_inline)) |
bool | isPunct (int c) __attribute__((always_inline)) |
bool | isSpace (int c) __attribute__((always_inline)) |
bool | isUpperCase (int c) __attribute__((always_inline)) |
bool | isWhitespace (int c) __attribute__((always_inline)) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, char c) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, const __FlashStringHelper *rhs) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, const char *cstr) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, const String &rhs) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, double num) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, float num) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, int num) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, long num) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, unsigned char num) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, unsigned int num) |
StringSumHelper & | operator+ (const StringSumHelper &lhs, unsigned long num) |
void | pinMode (pin_size_t pinNumber, int mode) |
static FileStream | Serial1 ("/dev/ttyACM0") |
Global Serial1 instance for secondary serial communication. | |
static FileStream | Serial2 ("/dev/serial0") |
Second hardware serial port for Raspberry Pi. | |
void | serialEventRun (void) __attribute__((weak)) |
int | toAscii (int c) __attribute__((always_inline)) |
int | toLowerCase (int c) __attribute__((always_inline)) |
int | toUpperCase (int c) __attribute__((always_inline)) |
Variables | |
const SPISettings | DEFAULT_SPI_SETTINGS = SPISettings() |
enum arduino:: { ... } | DMABufferFlags |
EthernetImpl | Ethernet |
GPIOWrapper | GPIO |
Global GPIO instance used by Arduino API functions and direct access. | |
static gpiod_chip * | gpio_chip = nullptr |
static std::map< pin_size_t, gpiod_line * > | gpio_lines |
const IPAddress | IN6ADDR_ANY |
const IPAddress | INADDR_NONE |
static ArduinoLogger | Logger |
static HardwareSetupRemote | Remote {7000} |
static HardwareSetupRPI | RPI |
Global instance for Raspberry Pi hardware setup. | |
static StdioDevice | Serial |
static StdioDevice | Serial2 |
const char * | SOCKET_IMPL = "SocketImpl" |
SPIWrapper | SPI |
Global SPI instance used by Arduino API and direct access. | |
USBSetup | |
WifiMock | WiFi |
I2CWrapper | Wire |
Global Wire instance used by Arduino API functions and direct access. | |
static WOLFSSL_CTX * | wolf_ctx = nullptr |
static int | wolf_ssl_counter = 0 |
We provide the WiFi class to simulate the Arduino WIFI. In in Linux we can expect that networking is already active. So we dont need to do anything.
We support different implementations for the GPIO
We suppport different implementations for the I2C
Separate implementation class for the WIFI client to prevent import conflicts
We suppport different implementations for the SPI
Alias for EthernetClient to provide WiFiClientSecure compatibility when HTTPS is not used.
Alias for secure WiFi client using TLS/SSL.
Use this type for secure network connections (HTTPS, TLS) on platforms supporting NetworkClientSecure.
|
static |
Global Serial1 instance for secondary serial communication.
This object provides access to the /dev/ttyACM0 device, typically used for USB serial or secondary UART on Linux systems. Use this instance in your sketches to perform serial communication, similar to the standard Arduino Serial1 object. Example: Serial1.begin(9600); Serial1.println("Hello from Serial1");
|
static |
Second hardware serial port for Raspberry Pi.
Serial2 provides access to the Raspberry Pi's primary UART device (usually /dev/serial0). This can be used for serial communication with external devices, similar to Serial1/Serial2 on Arduino boards. Example usage: Serial2.begin(9600); Serial2.println("Hello from Serial2");
|
static |
Global instance for Raspberry Pi hardware setup.
Use this object to access and initialize GPIO, I2C, and SPI interfaces on Raspberry Pi.