ledcontroller-3bit
Macros | Functions
main.c File Reference
#include <stdio.h>
#include <libusb.h>
#include <errno.h>
#include <string.h>

Macros

#define USB_VID   0x1294
 
#define USB_PID   0x1320
 
#define USB_EP   0x2
 

Functions

int main (int argc, char **argv)
 

Detailed Description

ledcontroller-3bit

This file is a fork of the LedController code. You will find the original copyright notices below.

Macro Definition Documentation

◆ USB_EP

#define USB_EP   0x2

USB EndPoint

◆ USB_PID

#define USB_PID   0x1320

USB Product ID

◆ USB_VID

#define USB_VID   0x1294

USB Vendor ID

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

The device has a RGB LED, which has two states for each "sub-LED", on and off. The "sub-LEDs" are red, green and blue.

Obviously there are 8 possible combinations for their state. It seems there aren't bits mapped to each sub-LED, but instead 3-bit values mapped to the 8 combinations.

R G B Color Value Comment
0 0 0 off 0x0
0 0 1 blue 0x1
1 0 0 red 0x2
0 1 0 green 0x3
0 1 1 aqua 0x4
1 0 1 purple 0x5
1 1 0 yellow 0x6 more of a mustard - green color
1 1 1 white 0x7 a very blue-ish white
Parameters
argcPOSIX number of parameters
argvArray of parameters
Returns
Error code (0 on success)