|
arduino-emulator
|
Sets up hardware interfaces (GPIO, I2C, SPI) that talk to a remote board running Firmata, all multiplexed over one FirmataTransport. More...
#include <HardwareSetupFIR.h>
Public Member Functions | |
| HardwareSetupFIRMATA (uint8_t spiDeviceId, int8_t spiCsPin=-1) | |
| bool | begin (Stream &stream, bool asDefault=true) |
| Start the shared Firmata transport and all three backends. | |
| void | end () |
| Resets hardware pointers to nullptr and stops the transport. | |
| HardwareGPIO_FIRMATA * | getGPIO () |
| HardwareI2C_FIRMATA * | getI2C () |
| HardwareSPI_FIRMATA * | getSPI () |
Protected Attributes | |
| HardwareGPIO_FIRMATA | gpio |
| HardwareI2C_FIRMATA | i2c |
| bool | is_default_objects_active = false |
| HardwareSPI_FIRMATA | spi |
| FirmataTransport | transport |
Sets up hardware interfaces (GPIO, I2C, SPI) that talk to a remote board running Firmata, all multiplexed over one FirmataTransport.
Unlike HardwareSetupRPI/HardwareSetupFTDI, which reach local hardware directly, Firmata needs a Stream connected to the remote device - so begin() takes one, instead of being callable with no arguments.
|
inlineexplicit |
| spiDeviceId | Device identifier used for SPI_DEVICE_CONFIG; low 2 bits must be 0. Only relevant if SPI is used. |
| spiCsPin | Remote-device pin number to use as chip-select, or -1 to toggle CS externally via GPIO. |
Start the shared Firmata transport and all three backends.
| stream | Already-opened stream connected to the Firmata device. |
| asDefault | If true, sets up global Arduino objects (Wire, SPI, GPIO) |
|
inlinevirtual |
Implements arduino::GPIOSource.
|
inlinevirtual |
Implements arduino::I2CSource.
|
inlinevirtual |
Implements arduino::SPISource.