29 if (this->m_configuration < GpioConfiguration::MAX_GPIO_CONFIGURATION &&
30 this->m_configuration >= GpioConfiguration::GPIO_INTERRUPT_RISING_EDGE) {
34 this->m_running =
true;
37 name.
format(
"%s.interrupt", this->getObjName());
38 Os::Task::Arguments arguments(name, &this->interruptFunction,
this, priority, stackSize, cpuAffinity,
40 this->m_poller.
start(arguments);
47 this->m_running =
false;
51 this->m_poller.
join();
54 void LinuxGpioDriver ::interruptFunction(
void*
self) {
57 component->pollLoop();
60 bool LinuxGpioDriver ::getRunning() {
62 return this->m_running;
unsigned int PlatformUIntType
PlatformSizeType FwSizeType
C++-compatible configuration header for fprime configuration.
@ INVALID_MODE
Operation not permitted with current configuration.
@ OP_OK
Operation succeeded.
Auto-generated base for LinuxGpioDriver component.
void stop()
stop interrupt detection thread
LinuxGpioDriver(const char *const compName)
void join()
join interrupt detection thread
Drv::GpioStatus start(const FwSizeType priority=Os::Task::TASK_DEFAULT, const FwSizeType stackSize=Os::Task::TASK_DEFAULT, const FwSizeType cpuAffinity=Os::Task::TASK_DEFAULT, const PlatformUIntType identifier=static_cast< PlatformUIntType >(Os::Task::TASK_DEFAULT))
start interrupt detection thread
void format(const CHAR *formatString,...)
write formatted string to buffer
locks a mutex within the current scope
Status start(const Arguments &arguments) override
start the task
Status join() override
block until the task has ended