新手上路
- 积分
- 21
- 金钱
- 21
- 注册时间
- 2018-1-29
- 在线时间
- 3 小时
|

楼主 |
发表于 2018-1-30 15:16:01
|
显示全部楼层
本帖最后由 pihaimonkey 于 2018-1-30 15:20 编辑
我指令這樣丟,可是結果不對
spidev_test -D /dev/spidev9.0 -p "\xf5\x6c\x00\xc3\xc5\xc7"
SPI read and write operations are completed in 16 or more clock cycles (two or more bytes). The first byte contains the SPI Address, and the following byte(s) contain(s) the SPI data. The first bit of the first byte contains the Read/Write bit and indicates the Read (1) or Write (0) operation. The following 7 bits contain the Register Address. In cases of multiple-byte Read/Writes, data is two or more bytes:
0xf5:Register Name: WHO_AM_I
Register Type: READ only
Register Address: 117 (Decimal); 75 (Hex)
0x6c: Register Name: PWR_MGMT_2
Register Type: READ/WRITE
Register Address: 108 (Decimal); 6C (Hex)
0xc3:GYRO_XOUT_H
|
|