|
arduino-emulator
|
Sets up hardware interfaces for FTDI FT2232HL (GPIO, I2C, SPI). More...
#include <HardwareSetupFTDI.h>
Public Member Functions | |
| HardwareSetupFTDI ()=default | |
| Constructor. Initializes FTDI hardware interfaces. | |
| HardwareSetupFTDI (int vendor_id, int product_id, const char *description=nullptr, const char *serial=nullptr) | |
| Constructor with custom device parameters. | |
| ~HardwareSetupFTDI () | |
| Destructor. Cleans up FTDI hardware interfaces. | |
| bool | begin (bool asDefault=true) |
| Initializes hardware pointers to FTDI interfaces. | |
| void | end () |
| Resets hardware pointers to nullptr. | |
| HardwareGPIO_FTDI * | getGPIO () |
| HardwareI2C_FTDI * | getI2C () |
| HardwareSPI_FTDI * | getSPI () |
| void | setDeviceParams (int vendor_id, int product_id, const char *description=nullptr, const char *serial=nullptr) |
| Set custom device parameters for targeting specific FTDI device. | |
Protected Attributes | |
| const char * | desc = nullptr |
| HardwareGPIO_FTDI | gpio |
| HardwareI2C_FTDI | i2c |
| bool | is_default_objects_active = false |
| int | pid = 0x6010 |
| const char * | ser = nullptr |
| HardwareSPI_FTDI | spi |
| int | vid = 0x0403 |
Sets up hardware interfaces for FTDI FT2232HL (GPIO, I2C, SPI).
This class provides hardware abstraction for the FTDI FT2232HL dual-channel USB-to-UART/SPI/I2C converter. The FT2232HL has two independent channels:
This implementation uses libftdi1 to communicate with the FT2232HL device.
|
inline |
Constructor with custom device parameters.
| vendor_id | USB vendor ID (default: 0x0403 for FTDI) |
| product_id | USB product ID (default: 0x6010 for FT2232HL) |
| description | Device description string (optional) |
| serial | Serial number string (optional) |
Initializes hardware pointers to FTDI interfaces.
| asDefault | If true, sets up global Arduino objects (Wire, SPI, GPIO) |
|
inlinevirtual |
Implements arduino::GPIOSource.
|
inlinevirtual |
Implements arduino::I2CSource.
|
inlinevirtual |
Implements arduino::SPISource.
|
inline |
Set custom device parameters for targeting specific FTDI device.
| vendor_id | USB vendor ID |
| product_id | USB product ID |
| description | Device description string (optional) |
| serial | Serial number string (optional) |