ReactOS 0.4.16-dev-1946-g52006dd
sleep.h
Go to the documentation of this file.
1#pragma once
2
3#include <uacpi/types.h>
4#include <uacpi/status.h>
5#include <uacpi/uacpi.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#ifndef UACPI_BAREBONES_MODE
12
13/*
14 * Set the firmware waking vector in FACS.
15 *
16 * 'addr32' is the real mode entry-point address
17 * 'addr64' is the protected mode entry-point address
18 */
21 uacpi_phys_addr addr32, uacpi_phys_addr addr64
22))
23
24typedef enum uacpi_sleep_state {
25 UACPI_SLEEP_STATE_S0 = 0,
26 UACPI_SLEEP_STATE_S1,
27 UACPI_SLEEP_STATE_S2,
28 UACPI_SLEEP_STATE_S3,
29 UACPI_SLEEP_STATE_S4,
30 UACPI_SLEEP_STATE_S5,
31 UACPI_SLEEP_STATE_MAX = UACPI_SLEEP_STATE_S5,
33
34/*
35 * Prepare for a given sleep state.
36 * Must be caled with interrupts ENABLED.
37 */
39
40/*
41 * Enter the given sleep state after preparation.
42 * Must be called with interrupts DISABLED.
43 */
45
46/*
47 * Prepare to leave the given sleep state.
48 * Must be called with interrupts DISABLED.
49 */
51
52/*
53 * Wake from the given sleep state.
54 * Must be called with interrupts ENABLED.
55 */
57
58/*
59 * Attempt reset via the FADT reset register.
60 */
62
63#endif // !UACPI_BAREBONES_MODE
64
65#ifdef __cplusplus
66}
67#endif
uacpi_status
Definition: status.h:10
uacpi_u64 uacpi_phys_addr
Definition: types.h:17
uacpi_status uacpi_set_waking_vector(uacpi_phys_addr addr32, uacpi_phys_addr addr64)
Definition: sleep.c:23
uacpi_status uacpi_prepare_for_sleep_state(uacpi_sleep_state)
Definition: sleep.c:356
uacpi_sleep_state
Definition: sleep.h:32
uacpi_status uacpi_prepare_for_wake_from_sleep_state(uacpi_sleep_state)
Definition: sleep.c:506
uacpi_status uacpi_reboot(void)
Definition: sleep.c:534
uacpi_status uacpi_wake_from_sleep_state(uacpi_sleep_state)
Definition: sleep.c:520
uacpi_status uacpi_enter_sleep_state(uacpi_sleep_state)
Definition: sleep.c:486
#define UACPI_ALWAYS_ERROR_FOR_REDUCED_HARDWARE(fn)
Definition: uacpi.h:27