eive-obsw/bsp_q7s/gpio/gpioCallbacks.h

74 lines
2.1 KiB
C
Raw Normal View History

2021-03-13 14:42:30 +01:00
#ifndef LINUX_GPIO_GPIOCALLBACKS_H_
#define LINUX_GPIO_GPIOCALLBACKS_H_
2021-08-03 15:58:01 +02:00
#include <fsfw_hal/common/gpio/GpioIF.h>
2022-01-18 11:41:19 +01:00
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
2021-03-13 14:42:30 +01:00
namespace gpioCallbacks {
2022-01-18 11:41:19 +01:00
/**
* @brief This function initializes the GPIOs used to control the SN74LVC138APWR decoders on
* the TCS Board and the interface board.
*/
void initSpiCsDecoder(GpioIF* gpioComIF);
2021-03-13 14:42:30 +01:00
2022-01-18 11:41:19 +01:00
/**
* @brief This function implements the decoding to multiply gpios by using the decoder
* chips SN74LVC138APWR on the TCS board and the interface board.
*/
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, gpio::Levels value,
void* args);
2021-05-02 13:48:39 +02:00
2022-01-18 11:41:19 +01:00
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the TCS board which is named to IC1 in the schematic.
*/
void enableDecoderTcsIc1();
2021-05-02 13:48:39 +02:00
2022-01-18 11:41:19 +01:00
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the TCS board which is named to IC2 in the schematic.
*/
void enableDecoderTcsIc2();
2021-05-02 13:48:39 +02:00
2022-01-18 11:41:19 +01:00
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the inteface board board which is named to IC21 in the schematic.
*/
void enableDecoderInterfaceBoardIc1();
2021-05-02 13:48:39 +02:00
2022-01-18 11:41:19 +01:00
/**
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
* on the inteface board board which is named to IC22 in the schematic.
*/
void enableDecoderInterfaceBoardIc2();
2021-05-07 18:48:42 +02:00
2022-01-18 11:41:19 +01:00
void disableDecoderTcsIc1();
void disableDecoderTcsIc2();
void disableDecoderInterfaceBoardIc1();
void disableDecoderInterfaceBoardIc2();
2021-10-29 19:13:48 +02:00
2022-01-18 11:41:19 +01:00
/**
* @brief Enables the reaction wheel chip select decoder (IC3).
*/
void enableRwDecoder();
void disableRwDecoder();
2021-06-21 17:15:19 +02:00
2022-01-18 11:41:19 +01:00
/**
* @brief This function disables all decoder.
*/
void disableAllDecoder();
2021-05-02 13:48:39 +02:00
2022-01-18 11:41:19 +01:00
/** The following functions enable the appropriate channel of the currently enabled decoder */
void selectY0();
void selectY1();
void selectY2();
void selectY3();
void selectY4();
void selectY5();
void selectY6();
void selectY7();
} // namespace gpioCallbacks
2021-03-13 14:42:30 +01:00
#endif /* LINUX_GPIO_GPIOCALLBACKS_H_ */