SPI implementation assistance

Hello, I have a question as I am coming from embedded systems programming and I am not entirely familiar with Linux and I am not used to interfacing with OSs, so please keep that in mind.

I have a Renegade with a RK3328 and I would like to use the SPI line exposed on the header pins. After some troubles enabling the SPI, I finally have the /dev/spidev0.0 and /dev/spidev0.1 files created and to my knowledge that means I have them enabled. If I understand correctly, these are device interface files and in theory, allow me to use the kernel to operate the SPI hardware instead of bit-banging registers.

I have a .cpp file that contains code to calculate reverse kinematics for a robot I am building, and I would like to use a SPI line to send the data to an STM chip that is functioning as my motor driver board. I have reached the limit of my knowledge and as such I don’t know where to go. All my research yields is Raspberry Pi tutorials which are not helpful as they all have drivers and libraries that do everything for you, and I don’t think there’s anything like that for this chip. I have found a SPI driver here:

`https://github.com/torvalds/linux/blob/master/drivers/spi/spi-rockchip.c

so is there a way I can implement this in my program? How might I go about adding SPI functionality?

This is covered in ROC-RK3328-CC (Renegade) Overview Resources and Guides

Please use the search function in the future.

I actually already asked for help there, you were not very helpful and ceased correspondence, so I put up a public post in hopes someone other than you would respond. I am not incompetent, just uneducated in this realm of programming.

We haven’t gotten to it. Please repost on that instead of creating a new thread for future reference.