nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
10.02k stars 1.29k forks source link

Create Interface from LinuxSpiDriver #2582

Open LeStarch opened 5 months ago

LeStarch commented 5 months ago
F´ Version
Affected Component

Feature Description

Make an interface out of Drv/LinuxSpiDriver protocol. See #2255 for an example interface change set.

The following three ports should be pulled out of Drv::LinuxSpiDriver into Svc/Interfaces/SpiInterface.fppi such that other Spi implementations can use it.

https://github.com/nasa/fprime/blob/a73bff28617b96736c0e3e222e4c6e1dea1c6f5e/Drv/LinuxSpiDriver/LinuxSpiDriver.fpp#L9

Note: annotations should be added to explain what each port does.

menaman123 commented 2 months ago

Hello, I was wondering if there is documentation on what this port does. Im assuming it reads and writes?

menaman123 commented 2 months ago

Would the description be like this: @ Port to perform synchronous read and write operations over the SPI bus

LeStarch commented 2 months ago

I would say "Port to perform a synchronous read/write operation over the SPI bus"...but you basically have it. The nuance I am trying to capture here is that SPI calls are both read and write at the same time.

menaman123 commented 2 months ago

Follow up question, do i need to add anything to the cmake file so that there wont be any sort of failures?