44 lines
1.1 KiB
C
44 lines
1.1 KiB
C
|
#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:
|
||
|
GpioIF();
|
||
|
virtual ~GpioIF();
|
||
|
|
||
|
/**
|
||
|
* @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_ */
|