How to write, compile and run in native_posix board with USB-CH341A converter #driver


honestech
 

Hello, everyone.
I am a beginner in zephyr RTOS. I want to make and run SPI driver with USB-CH341(SPI/I2C) programmer. I got the linux driver for it.
Here is a link.https://github.com/gschorcht/spi-ch341-usb
I have compiled and loaded this driver on Ubuntu 18.04 LTS. Then I can call this device like "/dev/spidev0.0".
I wrote the test code and tested, but I used the linux functions such as open, ioctl etc.

    ...
int spi = open("/dev/spidev0.1", O_RDWR);
    ...
ret = ioctl(spi, SPI_IOC_WR_MODE, &mode);
   ...

Now I want to make the driver for this device that can be used in zephyr native_posix board to test some SPI LCDs.
I have read the zephyrproject help and referenced its github samples. but I have got stuck. :-/

Could you tell me how to make, build and test?
I need much more help. I want to like this forum. :)

Thanks in advance.
Pengxiang

Join users@lists.zephyrproject.org to automatically receive all group messages.