2021-04-01 10:59:23 +02:00
|
|
|
#ifndef LINUX_SPI_SPIDEFINITONS_H_
|
|
|
|
#define LINUX_SPI_SPIDEFINITONS_H_
|
|
|
|
|
2021-05-24 00:13:59 +02:00
|
|
|
#include "../../common/gpio/gpioDefinitions.h"
|
|
|
|
|
2021-05-23 21:34:59 +02:00
|
|
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
2021-05-24 00:13:59 +02:00
|
|
|
#include <linux/spi/spidev.h>
|
2021-05-23 21:34:59 +02:00
|
|
|
|
2021-04-01 10:59:23 +02:00
|
|
|
#include <cstdint>
|
|
|
|
|
2021-05-24 00:13:59 +02:00
|
|
|
class SpiCookie;
|
2021-05-24 19:11:01 +02:00
|
|
|
class SpiComIF;
|
2021-05-24 00:13:59 +02:00
|
|
|
|
2021-04-01 10:59:23 +02:00
|
|
|
namespace spi {
|
|
|
|
|
|
|
|
enum SpiModes: uint8_t {
|
|
|
|
MODE_0,
|
|
|
|
MODE_1,
|
|
|
|
MODE_2,
|
|
|
|
MODE_3
|
|
|
|
};
|
|
|
|
|
2021-05-23 21:34:59 +02:00
|
|
|
enum SpiComIfModes {
|
|
|
|
REGULAR,
|
|
|
|
CALLBACK
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-05-24 19:11:01 +02:00
|
|
|
using send_callback_function_t = ReturnValue_t (*) (SpiComIF* comIf, SpiCookie *cookie,
|
|
|
|
const uint8_t *sendData, size_t sendLen, void* args);
|
2021-05-23 21:34:59 +02:00
|
|
|
|
2021-04-01 10:59:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* LINUX_SPI_SPIDEFINITONS_H_ */
|