eive-obsw/bsp_q7s/gpio/GpioIF.h

44 lines
1.1 KiB
C
Raw Normal View History

2021-01-23 17:22:40 +01:00
#ifndef BSP_Q7S_GPIO_GPIOIF_H_
#define BSP_Q7S_GPIO_GPIOIF_H_
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw/devicehandlers/CookieIF.h>
typedef uint16_t gpioId_t;
/**
* @brief This class defines the interface for objects requiring the control
* over GPIOs.
* @author J. Meier
*/
class GpioIF : public HasReturnvaluesIF{
public:
2021-01-28 14:55:21 +01:00
virtual ~GpioIF() {};
2021-01-23 17:22:40 +01:00
/**
* @brief Called by the GPIO using object.
* @param cookie Cookie specifying informations of the GPIOs required
* by a object.
*/
virtual ReturnValue_t initialize(CookieIF * cookie) = 0;
/**
* @brief By implementing this function a child must provide the
* functionality to pull a certain GPIO to high logic level.
*
* @param gpioId A unique number which specifies the GPIO to drive.
*/
virtual ReturnValue_t pullHigh(gpioId_t gpioId) = 0;
/**
* @brief By implementing this function a child must provide the
* functionality to pull a certain GPIO to low logic level.
*
* @param gpioId A unique number which specifies the GPIO to drive.
*/
virtual ReturnValue_t pullLow(gpioId_t gpioId) = 0;
};
#endif /* BSP_Q7S_GPIO_GPIOIF_H_ */