integrating fsfw_hal
This commit is contained in:
39
linux/archive/gpio/GpioCookie.h
Normal file
39
linux/archive/gpio/GpioCookie.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef LINUX_GPIO_GPIOCOOKIE_H_
|
||||
#define LINUX_GPIO_GPIOCOOKIE_H_
|
||||
|
||||
#include "GpioIF.h"
|
||||
#include "gpioDefinitions.h"
|
||||
#include <fsfw/devicehandlers/CookieIF.h>
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
|
||||
/**
|
||||
* @brief Cookie for the GpioIF. Allows the GpioIF to determine which
|
||||
* GPIOs to initialize and whether they should be configured as in- or
|
||||
* output.
|
||||
* @details One GpioCookie can hold multiple GPIO configurations. To add a new
|
||||
* GPIO configuration to a GpioCookie use the GpioCookie::addGpio
|
||||
* function.
|
||||
*
|
||||
* @author J. Meier
|
||||
*/
|
||||
class GpioCookie: public CookieIF {
|
||||
public:
|
||||
|
||||
GpioCookie();
|
||||
|
||||
virtual ~GpioCookie();
|
||||
|
||||
ReturnValue_t addGpio(gpioId_t gpioId, GpiodRegular& gpioConfig);
|
||||
/**
|
||||
* @brief Get map with registered GPIOs.
|
||||
*/
|
||||
GpioMap getGpioMap() const;
|
||||
|
||||
private:
|
||||
/**
|
||||
* Returns a copy of the internal GPIO map.
|
||||
*/
|
||||
GpioMap gpioMap;
|
||||
};
|
||||
|
||||
#endif /* LINUX_GPIO_GPIOCOOKIE_H_ */
|
Reference in New Issue
Block a user