I am tring to use this spi bitbang example to write epaper
https://docs.zephyrproject.org/latest/samples/drivers/spi_bitbang/README.html#spi-bitbang
Here is my code
```c
spibb0: spibb0 {
compatible = "zephyr,spi-bitbang";
status="okay";
#address-cells = <1>;
#size-cells = <0>;
clk-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
miso-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
mosi-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
void test_8bit_xfer()
{
struct spi_config config;
config.frequency = 1000000;
config.operation = SPI_OP_MODE_MASTER | SPI_WORD_SET(8);
config.slave = 0;
config.cs = cs_ctrl;
enum { datacount = 2 };
uint8_t buff[datacount] = { 0xFF, 0x11};
uint8_t rxdata[datacount];
struct spi_buf tx_buf[1] = {
{.buf = buff, .len = datacount},
};
struct spi_buf rx_buf[1] = {
{.buf = rxdata, .len = datacount},
};
struct spi_buf_set tx_set = { .buffers = tx_buf, .count = 1 };
struct spi_buf_set rx_set = { .buffers = rx_buf, .count = 1 };
int ret = spi_transceive(spi_dev, &config, &tx_set, &rx_set);
printf("8bit_loopback_partial; ret: %d\n", ret);
printf(" tx (i) : %02x %02x %02x %02x %02x\n",
buff[0], buff[1], buff[2], buff[3], buff[4]);
printf(" rx (i) : %02x %02x %02x %02x %02x\n",
rxdata[0], rxdata[1], rxdata[2], rxdata[3], rxdata[4]);
}
int main(void)
{
while(1){
test_8bit_xfer();
}
}
```
However I got wrong data on MOSI
How can I fix this?