9#ifndef UACPI_BAREBONES_MODE
90#define UACPI_TRIGGERING_EDGE 1
91#define UACPI_TRIGGERING_LEVEL 0
94#define UACPI_POLARITY_ACTIVE_HIGH 0
95#define UACPI_POLARITY_ACTIVE_LOW 1
96#define UACPI_POLARITY_ACTIVE_BOTH 2
99#define UACPI_EXCLUSIVE 0
100#define UACPI_SHARED 1
103#define UACPI_WAKE_CAPABLE 1
104#define UACPI_NOT_WAKE_CAPABLE 0
128#define UACPI_TRANSFER_TYPE_8_BIT 0b00
129#define UACPI_TRANSFER_TYPE_8_AND_16_BIT 0b01
130#define UACPI_TRANSFER_TYPE_16_BIT 0b10
133#define UACPI_BUS_MASTER 0b1
136#define UACPI_DMA_COMPATIBILITY 0b00
137#define UACPI_DMA_TYPE_A 0b01
138#define UACPI_DMA_TYPE_B 0b10
139#define UACPI_DMA_TYPE_F 0b11
142#define UACPI_TRANSFER_WIDTH_8 0x00
143#define UACPI_TRANSFER_WIDTH_16 0x01
144#define UACPI_TRANSFER_WIDTH_32 0x02
145#define UACPI_TRANSFER_WIDTH_64 0x03
146#define UACPI_TRANSFER_WIDTH_128 0x04
147#define UACPI_TRANSFER_WIDTH_256 0x05
164#define UACPI_DECODE_16 0b1
165#define UACPI_DECODE_10 0b0
181#define UACPI_NON_WRITABLE 0
182#define UACPI_WRITABLE 1
185#define UACPI_NON_CACHEABLE 0
186#define UACPI_CACHEABLE 1
187#define UACPI_CACHEABLE_WRITE_COMBINING 2
188#define UACPI_PREFETCHABLE 3
191#define UACPI_RANGE_TYPE_MEMORY 0
192#define UACPI_RANGE_TYPE_RESERVED 1
193#define UACPI_RANGE_TYPE_ACPI 2
194#define UACPI_RANGE_TYPE_NVS 3
197#define UACPI_RANGE_MEMORY 0
198#define UACPI_RANGE_IO 1
199#define UACPI_RANGE_BUS 2
202#define UACPI_IO_MEM_TRANSLATION 1
203#define UACPI_IO_MEM_STATIC 0
206#define UACPI_TRANSLATION_DENSE 0
207#define UACPI_TRANSLATION_SPARSE 1
210#define UACPI_PRODUCER 0
211#define UACPI_CONSUMER 1
214#define UACPI_POISITIVE_DECODE 0
215#define UACPI_SUBTRACTIVE_DECODE 1
218#define UACPI_ADDRESS_NOT_FIXED 0
219#define UACPI_ADDRESS_FIXED 1
314#define UACPI_ACCEPTABLE 1
315#define UACPI_SUB_OPTIMAL 2
344#define UACPI_GPIO_CONNECTION_INTERRUPT 0x00
345#define UACPI_GPIO_CONNECTION_IO 0x01
355#define UACPI_IO_RESTRICTION_NONE 0x0
356#define UACPI_IO_RESTRICTION_INPUT 0x1
357#define UACPI_IO_RESTRICTION_OUTPUT 0x2
358#define UACPI_IO_RESTRICTION_NONE_PRESERVE 0x3
366#define UACPI_PIN_CONFIG_DEFAULT 0x00
367#define UACPI_PIN_CONFIG_PULL_UP 0x01
368#define UACPI_PIN_CONFIG_PULL_DOWN 0x02
369#define UACPI_PIN_CONFIG_NO_PULL 0x03
393#define UACPI_MODE_CONTROLLER_INITIATED 0x0
394#define UACPI_MODE_DEVICE_INITIATED 0x1
410#define UACPI_I2C_7BIT 0x0
411#define UACPI_I2C_10BIT 0x1
421#define UACPI_SPI_4_WIRES 0
422#define UACPI_SPI_3_WIRES 1
425#define UACPI_SPI_ACTIVE_LOW 0
426#define UACPI_SPI_ACTIVE_HIGH 1
429#define UACPI_SPI_PHASE_FIRST 0
430#define UACPI_SPI_PHASE_SECOND 1
433#define UACPI_SPI_START_LOW 0
434#define UACPI_SPI_START_HIGH 1
448#define UACPI_UART_STOP_BITS_NONE 0b00
449#define UACPI_UART_STOP_BITS_1 0b01
450#define UACPI_UART_STOP_BITS_1_5 0b10
451#define UACPI_UART_STOP_BITS_2 0b11
454#define UACPI_UART_DATA_5BITS 0b000
455#define UACPI_UART_DATA_6BITS 0b001
456#define UACPI_UART_DATA_7BITS 0b010
457#define UACPI_UART_DATA_8BITS 0b011
458#define UACPI_UART_DATA_9BITS 0b100
461#define UACPI_UART_LITTLE_ENDIAN 0
462#define UACPI_UART_BIG_ENDIAN 1
465#define UACPI_UART_PARITY_NONE 0x00
466#define UACPI_UART_PARITY_EVEN 0x01
467#define UACPI_UART_PARITY_ODD 0x02
468#define UACPI_UART_PARITY_MARK 0x03
469#define UACPI_UART_PARITY_SPACE 0x04
472#define UACPI_UART_DATA_CARRIER_DETECT (1 << 2)
473#define UACPI_UART_RING_INDICATOR (1 << 3)
474#define UACPI_UART_DATA_SET_READY (1 << 4)
475#define UACPI_UART_DATA_TERMINAL_READY (1 << 5)
476#define UACPI_UART_CLEAR_TO_SEND (1 << 6)
477#define UACPI_UART_REQUEST_TO_SEND (1 << 7)
480#define UACPI_UART_FLOW_CONTROL_NONE 0b00
481#define UACPI_UART_FLOW_CONTROL_HW 0b01
482#define UACPI_UART_FLOW_CONTROL_XON_XOFF 0b10
498#define UACPI_CSI2_PHY_C 0b00
499#define UACPI_CSI2_PHY_D 0b01
520#define UACPI_PIN_CONFIG_DEFAULT 0x00
521#define UACPI_PIN_CONFIG_BIAS_PULL_UP 0x01
522#define UACPI_PIN_CONFIG_BIAS_PULL_DOWN 0x02
523#define UACPI_PIN_CONFIG_BIAS_DEFAULT 0x03
524#define UACPI_PIN_CONFIG_BIAS_DISABLE 0x04
525#define UACPI_PIN_CONFIG_BIAS_HIGH_IMPEDANCE 0x05
526#define UACPI_PIN_CONFIG_BIAS_BUS_HOLD 0x06
527#define UACPI_PIN_CONFIG_DRIVE_OPEN_DRAIN 0x07
528#define UACPI_PIN_CONFIG_DRIVE_OPEN_SOURCE 0x08
529#define UACPI_PIN_CONFIG_DRIVE_PUSH_PULL 0x09
530#define UACPI_PIN_CONFIG_DRIVE_STRENGTH 0x0A
531#define UACPI_PIN_CONFIG_SLEW_RATE 0x0B
532#define UACPI_PIN_CONFIG_INPUT_DEBOUNCE 0x0C
533#define UACPI_PIN_CONFIG_INPUT_SCHMITT_TRIGGER 0x0D
587#define UACPI_SCALE_HZ 0b00
588#define UACPI_SCALE_KHZ 0b01
589#define UACPI_SCALE_MHZ 0b10
592#define UACPI_FREQUENCY_FIXED 0x0
593#define UACPI_FREQUENCY_VARIABLE 0x1
641#define UACPI_NEXT_RESOURCE(cur) \
642 ((uacpi_resource*)((uacpi_u8*)(cur) + (cur)->length))
void user(int argc, const char *argv[])
@ UACPI_RESOURCE_TYPE_PIN_GROUP_CONFIGURATION
@ UACPI_RESOURCE_TYPE_ADDRESS32
@ UACPI_RESOURCE_TYPE_START_DEPENDENT
@ UACPI_RESOURCE_TYPE_SERIAL_UART_CONNECTION
@ UACPI_RESOURCE_TYPE_VENDOR_SMALL
@ UACPI_RESOURCE_TYPE_PIN_FUNCTION
@ UACPI_RESOURCE_TYPE_EXTENDED_IRQ
@ UACPI_RESOURCE_TYPE_MEMORY32
@ UACPI_RESOURCE_TYPE_END_DEPENDENT
@ UACPI_RESOURCE_TYPE_SERIAL_I2C_CONNECTION
@ UACPI_RESOURCE_TYPE_FIXED_DMA
@ UACPI_RESOURCE_TYPE_GENERIC_REGISTER
@ UACPI_RESOURCE_TYPE_ADDRESS16
@ UACPI_RESOURCE_TYPE_SERIAL_SPI_CONNECTION
@ UACPI_RESOURCE_TYPE_PIN_GROUP
@ UACPI_RESOURCE_TYPE_MAX
@ UACPI_RESOURCE_TYPE_IRQ
@ UACPI_RESOURCE_TYPE_PIN_CONFIGURATION
@ UACPI_RESOURCE_TYPE_FIXED_IO
@ UACPI_RESOURCE_TYPE_VENDOR_LARGE
@ UACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION
@ UACPI_RESOURCE_TYPE_END_TAG
@ UACPI_RESOURCE_TYPE_ADDRESS64
@ UACPI_RESOURCE_TYPE_CLOCK_INPUT
@ UACPI_RESOURCE_TYPE_SERIAL_CSI2_CONNECTION
@ UACPI_RESOURCE_TYPE_GPIO_CONNECTION
@ UACPI_RESOURCE_TYPE_ADDRESS64_EXTENDED
@ UACPI_RESOURCE_TYPE_MEMORY24
@ UACPI_RESOURCE_TYPE_FIXED_MEMORY32
@ UACPI_RESOURCE_TYPE_DMA
uacpi_status uacpi_get_possible_resources(uacpi_namespace_node *device, uacpi_resources **out_resources)
void uacpi_free_resource(uacpi_resource *)
void uacpi_free_resources(uacpi_resources *)
uacpi_status uacpi_get_current_resources(uacpi_namespace_node *device, uacpi_resources **out_resources)
uacpi_status uacpi_for_each_resource(uacpi_resources *resources, uacpi_resource_iteration_callback cb, void *user)
uacpi_resource_length_kind
@ UACPI_RESOURCE_LENGTH_KIND_DONT_CARE
@ UACPI_RESOURCE_LENGTH_KIND_ONE_LESS
@ UACPI_RESOURCE_LENGTH_KIND_FULL
uacpi_status uacpi_get_device_resources(uacpi_namespace_node *device, const uacpi_char *method, uacpi_resources **out_resources)
uacpi_iteration_decision(* uacpi_resource_iteration_callback)(void *user, uacpi_resource *resource)
uacpi_status uacpi_set_resources(uacpi_namespace_node *device, uacpi_resources *resources)
uacpi_status uacpi_for_each_device_resource(uacpi_namespace_node *device, const uacpi_char *method, uacpi_resource_iteration_callback cb, void *user)
uacpi_status uacpi_get_resource_from_buffer(uacpi_data_view aml_buffer, uacpi_resource **out_resource)
struct uacpi_resource_vendor_defined uacpi_resource_vendor
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static HMODULE MODULEINFO DWORD cb
uacpi_u8 translation_type
uacpi_resource_source source
uacpi_resource_address_common common
uacpi_u16 translation_offset
uacpi_resource_source source
uacpi_resource_address_common common
uacpi_u32 translation_offset
uacpi_resource_address_common common
uacpi_u64 translation_offset
uacpi_resource_address_common common
uacpi_resource_source source
uacpi_u64 translation_offset
uacpi_u8 fixed_min_address
uacpi_address_attribute attribute
uacpi_u8 fixed_max_address
uacpi_resource_serial_bus_common common
uacpi_u8 bus_master_status
uacpi_resource_source source
uacpi_u8 address_space_id
uacpi_resource_source source
uacpi_u16 vendor_data_length
uacpi_u8 pull_configuration
uacpi_io_connection_flags io
uacpi_u16 debounce_timeout
uacpi_interrupt_connection_flags interrupt
uacpi_u16 pin_table_length
uacpi_resource_serial_bus_common common
uacpi_u32 connection_speed
const uacpi_char * string
uacpi_resource_source source
uacpi_u16 vendor_data_length
uacpi_u16 pin_table_length
uacpi_resource_source source
uacpi_u16 vendor_data_length
uacpi_u16 pin_table_length
uacpi_u16 function_number
uacpi_u8 pull_configuration
uacpi_resource_label label
uacpi_u16 vendor_data_length
uacpi_resource_source source
uacpi_resource_label label
uacpi_u16 vendor_data_length
uacpi_resource_source source
uacpi_u16 vendor_data_length
uacpi_u16 pin_table_length
uacpi_resource_label label
uacpi_resource_source source
uacpi_u8 type_revision_id
uacpi_u16 type_data_length
uacpi_u16 vendor_data_length
uacpi_u16 device_selection
uacpi_resource_serial_bus_common common
uacpi_u32 connection_speed
uacpi_resource_serial_bus_common common
uacpi_resource_memory32 memory32
uacpi_resource_pin_configuration pin_configuration
uacpi_resource_vendor_typed vendor_typed
uacpi_resource_gpio_connection gpio_connection
uacpi_resource_memory24 memory24
uacpi_resource_start_dependent start_dependent
uacpi_resource_pin_function pin_function
uacpi_resource_clock_input clock_input
uacpi_resource_vendor vendor
uacpi_resource_serial_bus_common serial_bus_common
uacpi_resource_fixed_io fixed_io
uacpi_resource_address32 address32
uacpi_resource_fixed_memory32 fixed_memory32
uacpi_resource_extended_irq extended_irq
uacpi_resource_pin_group_configuration pin_group_configuration
uacpi_resource_address64_extended address64_extended
uacpi_resource_generic_register generic_register
uacpi_resource_address64 address64
uacpi_resource_fixed_dma fixed_dma
uacpi_resource_csi2_connection csi2_connection
uacpi_resource_pin_group_function pin_group_function
uacpi_resource_i2c_connection i2c_connection
uacpi_resource_spi_connection spi_connection
uacpi_resource_address16 address16
uacpi_resource_uart_connection uart_connection
uacpi_resource_pin_group pin_group
uacpi_memory_attribute memory