USB Host Shield 2.0
|
#include <AMBX.h>
Public Member Functions | |
AMBX (USB *pUsb) | |
void | setLight (uint8_t ambx_light, uint8_t r, uint8_t g, uint8_t b) |
void | setLight (AmbxLightsEnum ambx_light, AmbxColorsEnum color) |
void | setAllLights (AmbxColorsEnum color) |
void | attachOnInit (void(*funcOnInit)(void)) |
USBDeviceConfig implementation | |
uint8_t | Init (uint8_t parent, uint8_t port, bool lowspeed) |
uint8_t | Release () |
uint8_t | Poll () |
virtual uint8_t | GetAddress () |
virtual bool | VIDPIDOK (uint16_t vid, uint16_t pid) |
Public Member Functions inherited from USBDeviceConfig | |
virtual uint8_t | ConfigureDevice (uint8_t parent, uint8_t port, bool lowspeed) |
virtual void | ResetHubPort (uint8_t port) |
virtual bool | DEVCLASSOK (uint8_t klass) |
virtual bool | DEVSUBCLASSOK (uint8_t subklass) |
Public Attributes | |
bool | AMBXConnected |
Protected Attributes | |
USB * | pUsb |
uint8_t | bAddress |
EpInfo | epInfo [AMBX_MAX_ENDPOINTS] |
This class implements support for AMBX One can only set the color of the bulbs, no other accesories like rumble pad, fans, etc. are supported
AMBX::AMBX | ( | USB * | pUsb | ) |
|
virtual |
Initialize the AMBX Controller.
parent | Hub number. |
port | Port number on the hub. |
lowspeed | Speed of the device. |
Reimplemented from USBDeviceConfig.
|
virtual |
|
virtual |
Poll the USB Input endpoins and run the state machines.
Reimplemented from USBDeviceConfig.
|
inlinevirtual |
|
inlinevirtual |
Used by the USB core to check what this driver support.
vid | The device's VID. |
pid | The device's PID. |
Reimplemented from USBDeviceConfig.
void AMBX::setLight | ( | uint8_t | ambx_light, |
uint8_t | r, | ||
uint8_t | g, | ||
uint8_t | b | ||
) |
void AMBX::setLight | ( | AmbxLightsEnum | ambx_light, |
AmbxColorsEnum | color | ||
) |
Use this to set the color using the predefined colors in ColorsEnum.
color | The desired color. |
void AMBX::setAllLights | ( | AmbxColorsEnum | color | ) |
Use this to set the color using the predefined colors in ColorsEnum.
color | The desired color. |
|
inline |
|
protected |