My source code as follows.
#include <stdio.h>
#include </root/test/spi-gpio-driver/include/onion-spi.h>
void SpiReadValue(int addr);
int main() {
SpiReadValue(0x40);
return 0;
}
This code would be transfer a data that 0x40. but, received data is actually 0xC0.
so, I wonder that why data receive as 0xC0.
0x00~0x3F and 0xC0~0xFF data receive correctly.
but, [transfer data] [receive data]
0x40 0xC0
0x50 0xD0
0x60 0xE0
0x70 0xF0
0x80 0x00
0x90 0x10
0xA0 0x20
0xB0 0x30
I can not understand. why happen this problem? I need your help.