Add initialized flag

This commit is contained in:
Baptiste Wicht 2016-07-23 21:53:39 +02:00
parent 384c99df8c
commit f5ed147f84
2 changed files with 11 additions and 0 deletions

View File

@ -13,6 +13,8 @@ namespace acpi {
bool init();
void shutdown();
bool initialized();
} //end of acpi namespace
#endif

View File

@ -15,6 +15,8 @@
namespace {
bool acpi_initialized = false;
uint32_t SMI_CMD; //ptr
uint8_t ACPI_ENABLE;
uint8_t ACPI_DISABLE;
@ -279,6 +281,9 @@ bool initialize_acpica(){
//TODO COntinue
acpi_initialized = true;
return true;
}
@ -311,3 +316,7 @@ void acpi::shutdown(){
k_print_line("acpi poweroff failed.");
}
bool acpi::initialized(){
return acpi_initialized;
}