2015-11-20 03:32:12 -04:00
|
|
|
#pragma once
|
2013-09-22 03:01:24 -03:00
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include <AP_HAL/AP_HAL.h>
|
2013-09-22 03:01:24 -03:00
|
|
|
|
2023-12-18 16:52:09 -04:00
|
|
|
#include <signal.h>
|
|
|
|
|
2013-09-22 03:01:24 -03:00
|
|
|
class HAL_Linux : public AP_HAL::HAL {
|
|
|
|
public:
|
|
|
|
HAL_Linux();
|
2015-10-19 11:38:47 -03:00
|
|
|
void run(int argc, char* const* argv, Callbacks* callbacks) const override;
|
2016-10-26 18:27:12 -03:00
|
|
|
|
|
|
|
void setup_signal_handlers() const;
|
|
|
|
|
|
|
|
static void exit_signal_handler(int);
|
|
|
|
|
|
|
|
protected:
|
2023-12-18 16:52:09 -04:00
|
|
|
volatile sig_atomic_t _should_exit = false;
|
2013-09-22 03:01:24 -03:00
|
|
|
};
|
2020-05-31 09:28:24 -03:00
|
|
|
|
|
|
|
#if HAL_NUM_CAN_IFACES
|
|
|
|
namespace Linux {
|
|
|
|
class CANIface;
|
|
|
|
}
|
|
|
|
typedef Linux::CANIface HAL_CANIface;
|
|
|
|
#endif
|