LoginSignup
0
1

More than 5 years have passed since last update.

I2C の初歩的な質問

Posted at

とあるデバイスの LED を変更するプログラムを書こうとしています。

I2C アドレス: 0x93

Read Data Format:
Send 0xA0 ' Read 32 Byte Array[byArray[32]]
byArray[0]'LED Mode[Mode0'Mode1'Mode2'Mode3'Mode4]
byArray[1]'Red
byArray[2]'Green
byArray[3]'Blue
byArray[12]'LED'on/off

Write Data Format:
8 Byte Data[byData[8]]
Default'Switch'LED mode'Red'Green'Blue'Default'Default
Example: 0xA0 0x00 0x00 0xFF 0x00 0x00 0x00 0x04 (=Mode0 Red)

1stbyte header: 0xA0
2ndbyte: Switch(0x00 = LED MODE, 0xFC = ON/OFF MODE)
3rdbyte: If 2nd byte = 0x00, select LED MODE[MODE0(0x00)'MODE1(0x01)'MODE2(0x02)'MODE3(0x03)'MODE4(0x04)]
Else if 2nd byte = 0xFC, select ON/OFF(0x01 ON/0x00 OFF)\
4th-6th: RGB value
7th-8th: reserved, keep 0x00 and 0x04

与えられた情報はこれだけですがこれだけでプログラムを書けるものでしょうか?
やりたいことは、Windows で C言語でデバイスの LED を変更することです。
これでプログラムが書けるのであればサンプルコードを教えていただけないでしょうか?
デバイスは、PCI Express 上にあります。

0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1