73 connection = rhs.connection;
80 connection = rhs.connection;
99 wstring serialNumber();
105 void led(
bool value);
112 wstring output = name() + L
" (" + serialNumber() + L
")";
120 const int numberOfPins = 20;
140 void sendPinConfigPacket(uint8_t *data,
size_t len);
142 void sendPeripheralConfigPacket(uint8_t *data,
size_t len);
144 void receivePeripheralConfigPacket(uint8_t *data,
size_t numBytesToRead);
146 enum class DeviceCommands {
157 FirmwareUpdateSerial,
166 thread pinListenerThread;
168 void pinStateListener();
172 bool _isDestroyed =
false;
Built-in SPI peripheral.
Definition: HardwareSpi.h:65
HardwarePwmManager pwmManager
Gets the HardwarePwmManager module.
Definition: TreehopperUsb.h:138
Built-in UART peripheral.
Definition: HardwareUart.h:53
HardwarePwm pwm2
Gets the HardwarePwm PWM2 pin.
Definition: TreehopperUsb.h:132
HardwarePwm pwm1
Gets the HardwarePwm PWM1 pin.
Definition: TreehopperUsb.h:129
Built-in I2C module.
Definition: HardwareI2c.h:101
Built-in hardware PWM channels.
Definition: HardwarePwm.h:19
HardwareI2c i2c
Gets the HardwareI2c interface.
Definition: TreehopperUsb.h:123
bool isConnected
Gets whether or not the board is connected.
Definition: TreehopperUsb.h:90
wstring toString()
Gets a string representation of the board.
Definition: TreehopperUsb.h:111
HardwareSpi spi
Gets the HardwareSpi interface.
Definition: TreehopperUsb.h:126
TreehopperUsb(const TreehopperUsb &rhs)
Definition: TreehopperUsb.h:79
vector< Pin > pins
Gets a collection of pins on the board.
Definition: TreehopperUsb.h:117
The core class for communicating with Treehopper USB boards.
Definition: TreehopperUsb.h:59
Hardware PWM manager
Definition: HardwarePwmManager.h:19
#define TREEHOPPER_API
Definition: Treehopper.h:17
Definition: UsbConnection.h:9
TreehopperUsb & operator=(const TreehopperUsb &rhs)
Definition: TreehopperUsb.h:72
Built-in I/O pins.
Definition: Pin.h:159
HardwarePwm pwm3
Gets the HardwarePwm PWM3 pin.
Definition: TreehopperUsb.h:135