Beispiel #1
0
void alink_key_process(input_event_t *eventinfo, void *priv_data)
{
    if (eventinfo->type != EV_KEY) {
        return;
    }

    if (eventinfo->code == CODE_BOOT) {
        if (eventinfo->value == VALUE_KEY_CLICK) {
            if (cloud_is_connected() == false) {
                netmgr_start(true);
            } else {
                alink_activate(NULL);
            }
        } else if(eventinfo->value == VALUE_KEY_LTCLICK) {
            netmgr_clear_ap_config();
            aos_reboot();
        } else if(eventinfo->value == VALUE_KEY_LLTCLICK) {
            netmgr_clear_ap_config();
            alink_factory_reset();
        }
    }
}
Beispiel #2
0
void reboot_system(void *parms)
{
    LOG("reboot system");
    aos_reboot();
}
Beispiel #3
0
static void clear_kv_and_reboot()
{
    aos_kv_del(NETMGR_WIFI_KEY);
    LOG("KV cleared, will reboot now.");
    aos_reboot();
}
Beispiel #4
0
void HAL_Sys_reboot(void)
{
    aos_reboot();
}