Files
NANOKVM-MaixCDK-MIRROR/components/basic/port/linux/maix_sys_linux.cpp
2025-12-05 10:23:32 +08:00

41 lines
783 B
C++

#include "maix_util.hpp"
#include "maix_app.hpp"
#include "signal.h"
#include "maix_sys.hpp"
namespace maix::sys
{
static void signal_handle(int signal)
{
switch (signal) {
case SIGINT:
maix::app::set_exit_flag(true);
#if CONFIG_BUILD_WITH_MAIXPY
raise(SIGINT);
#endif
break;
default: break;
}
}
void poweroff()
{
log::info("Your platform is linux, poweroff will not execute");
}
void register_default_signal_handle() {
signal(SIGINT, signal_handle);
}
bool is_support(sys::Feature feature)
{
switch(feature)
{
case Feature::AI_ISP:
return false;
default:
return true;
}
}
}