C# .NET Wrapper class for C library
More...
Inherits IDisposable.
|
| static void | init () |
| | Initialises libraries. Should be called before any other stuff. More...
|
| |
| static uint | find () |
| | Updates devices list. Should be called before opening a controller. More...
|
| |
| static bool | sameDevice (IntPtr handle1, IntPtr handle2) |
| | Checks to see if two handles are handles for the same device More...
|
| |
C# .NET Wrapper class for C library
| LibRgbLedCtrl.Rgbledctrl.Rgbledctrl |
( |
| ) |
|
|
inline |
| void LibRgbLedCtrl.Rgbledctrl.close |
( |
| ) |
|
|
inline |
Close RGB LED controller.
| void LibRgbLedCtrl.Rgbledctrl.Dispose |
( |
| ) |
|
|
inline |
Deal with unmanaged memory
| bool LibRgbLedCtrl.Rgbledctrl.eeprom_read |
( |
ref byte |
data, |
|
|
ushort |
address |
|
) |
| |
|
inline |
Read a byte from device EEPROM
- Parameters
-
| data | |
| address | EEPROM Address |
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.eeprom_write |
( |
byte |
data, |
|
|
ushort |
address |
|
) |
| |
|
inline |
Write a byte to device EEPROM
- Parameters
-
| data | Value to write |
| address | EEPROM Address |
- Returns
- true on success, false on failure
| static uint LibRgbLedCtrl.Rgbledctrl.find |
( |
| ) |
|
|
inlinestatic |
Updates devices list. Should be called before opening a controller.
- Returns
- Number of RGB LED controllers found.
| static void LibRgbLedCtrl.Rgbledctrl.init |
( |
| ) |
|
|
inlinestatic |
Initialises libraries. Should be called before any other stuff.
| bool LibRgbLedCtrl.Rgbledctrl.open |
( |
| ) |
|
|
inline |
Open whatever device is found first
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.open |
( |
uint |
idx | ) |
|
|
inline |
Open device using its position/index in the list of devices found by find()
- Parameters
-
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.open |
( |
byte |
value, |
|
|
ushort |
address |
|
) |
| |
|
inline |
Open device that has the specified value at the specified EEPROM address.
- Parameters
-
| value | Value to check for |
| address | EEPROM address to look at |
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.poke |
( |
| ) |
|
|
inline |
Check if the device is still connected
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.reset |
( |
| ) |
|
|
inline |
Reset device (makes the watchdog timer timeout)
- Returns
- true on success, false on failure
| static bool LibRgbLedCtrl.Rgbledctrl.sameDevice |
( |
IntPtr |
handle1, |
|
|
IntPtr |
handle2 |
|
) |
| |
|
inlinestatic |
Checks to see if two handles are handles for the same device
- Parameters
-
| handle1 | Device handle 1 |
| handle2 | Device handle 2 |
- Returns
- true if they are handles for the same device, otherwise false
| bool LibRgbLedCtrl.Rgbledctrl.setB |
( |
byte |
value | ) |
|
|
inline |
Set blue LED brightness
- Parameters
-
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.setG |
( |
byte |
value | ) |
|
|
inline |
Set green LED brightness
- Parameters
-
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.setIdleTime |
( |
byte |
time | ) |
|
|
inline |
Set idle time. Idle time is how long the controller waits (in seconds) before fading out the LEDs when there is no USB activity. RGBLED_IDLETIME_DISABLE = Disabled.
- Parameters
-
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.setR |
( |
byte |
value | ) |
|
|
inline |
Set red LED brightness
- Parameters
-
- Returns
- true on success, false on failure
| bool LibRgbLedCtrl.Rgbledctrl.setRGB |
( |
Color |
colour | ) |
|
|
inline |
Set red, green and blue brightnesses in one go
- Parameters
-
| colour | The colour to set to |
- Returns
- true on success, false on failure
| const byte LibRgbLedCtrl.Rgbledctrl.RGBLED_IDLETIME_DISABLE = 0 |
Disable LED fade when no USB activity.
| Color LibRgbLedCtrl.Rgbledctrl.colour |
|
get |
| ushort LibRgbLedCtrl.Rgbledctrl.eepromSize |
|
get |
| IntPtr LibRgbLedCtrl.Rgbledctrl.handle |
|
get |
| byte LibRgbLedCtrl.Rgbledctrl.idleTime |
|
get |
| byte [] LibRgbLedCtrl.Rgbledctrl.version |
|
get |
Controller firmware version
The documentation for this class was generated from the following file: