eive-obsw/bsp_q7s/spiCallbacks/rwSpiCallback.h

22 lines
915 B
C

#ifndef BSP_Q7S_RW_SPI_CALLBACK_H_
#define BSP_Q7S_RW_SPI_CALLBACK_H_
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw_hal/linux/spi/SpiComIF.h>
/**
* @brief This is the callback function to send commands to the nano avionics reaction wheels and
* receive the replies.
*
* @details The data to sent are additionally encoded according to the HDLC framing defined in the
* datasheet of the reaction wheels:
* https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/
* Arbeitsdaten/08_Used%20Components/Nanoavionics_Reactionwheels&fileid=181622
* Each command entails exactly one reply which will also be read in and decoded by this
* function.
*/
ReturnValue_t rwSpiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sendData,
size_t sendLen, void* args);
#endif /* BSP_Q7S_RW_SPI_CALLBACK_H_ */