Compare commits
2 commits
f51a0713bc
...
ee4d89405d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ee4d89405d | ||
![]() |
e402f0629a |
2 changed files with 34 additions and 12 deletions
|
@ -1,7 +1,5 @@
|
||||||
# Uh, umm... well... let's call it specification of the 048d:5711 Integrated Technology Express, Inc. GIGABYTE Device
|
# Uh, umm... well... let's call it specification of the 048d:5711 Integrated Technology Express, Inc. GIGABYTE Device
|
||||||
|
|
||||||
#### Document structure
|
|
||||||
|
|
||||||
**USB control transfer used**
|
**USB control transfer used**
|
||||||
|
|
||||||
(and USB HID a bit 🤓)
|
(and USB HID a bit 🤓)
|
||||||
|
@ -157,9 +155,9 @@ cc9100020000000000000001__00______
|
||||||
cc28ff07 ↑↑
|
cc28ff07 ↑↑
|
||||||
ff → Brightness max
|
ff → Brightness max
|
||||||
b3 -1
|
b3 -1
|
||||||
80 -2
|
80 -2
|
||||||
4d -3
|
4d -3
|
||||||
1a -4
|
1a -4
|
||||||
```
|
```
|
||||||
EXAMPLE:
|
EXAMPLE:
|
||||||
`cc2204000000000000000001ff00ffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`
|
`cc2204000000000000000001ff00ffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000`
|
||||||
|
|
|
@ -55,24 +55,48 @@ int prefix(){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int staticColorSeparate(unsigned char brightness, unsigned char red, unsigned char green, unsigned char blue){
|
int staticColorSeparate(int brightness, unsigned char red, unsigned char green, unsigned char blue){
|
||||||
|
|
||||||
|
unsigned char brgt;
|
||||||
|
|
||||||
|
switch (brightness){
|
||||||
|
case 0:
|
||||||
|
brgt = 0x1a;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
brgt = 0x4d;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
brgt = 0x80;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
brgt = 0xb3;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
brgt = 0xff;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printf("Brightness must be defined in range of 0..4\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (prefix())
|
if (prefix())
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
counter = 0;
|
counter = 0;
|
||||||
limit = 7;
|
limit = 7;
|
||||||
//cc 22 04 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
//cc 22 04 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
||||||
unsigned char dir1[64] = { 0xcc, 0x22, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brightness, 0x00, blue, green, red, };
|
unsigned char dir1[64] = { 0xcc, 0x22, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brgt, 0x00, blue, green, red, };
|
||||||
//cc 24 10 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
//cc 24 10 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
||||||
unsigned char dir2[64] = { 0xcc, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brightness, 0x00, blue, green, red, };
|
unsigned char dir2[64] = { 0xcc, 0x24, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brgt, 0x00, blue, green, red, };
|
||||||
//cc 25 20 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
//cc 25 20 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
||||||
unsigned char dir3[64] = { 0xcc, 0x25, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brightness, 0x00, blue, green, red, };
|
unsigned char dir3[64] = { 0xcc, 0x25, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brgt, 0x00, blue, green, red, };
|
||||||
//cc 26 40 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
//cc 26 40 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
||||||
unsigned char dir4[64] = { 0xcc, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brightness, 0x00, blue, green, red, };
|
unsigned char dir4[64] = { 0xcc, 0x26, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brgt, 0x00, blue, green, red, };
|
||||||
//cc 27 80 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
//cc 27 80 00 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
||||||
unsigned char dir5[64] = { 0xcc, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brightness, 0x00, blue, green, red, };
|
unsigned char dir5[64] = { 0xcc, 0x27, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brgt, 0x00, blue, green, red, };
|
||||||
//cc 91 00 02 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
//cc 91 00 02 00 00 00 00 00 00 00 01 __ 00 __ __ __
|
||||||
unsigned char dir6[64] = { 0xcc, 0x91, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brightness, 0x00, blue, green, red, };
|
unsigned char dir6[64] = { 0xcc, 0x91, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, brgt, 0x00, blue, green, red, };
|
||||||
|
|
||||||
if(64 != writeUsb(dir1))
|
if(64 != writeUsb(dir1))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue