PatchworkOS
Loading...
Searching...
No Matches
Buffer Field

Buffer Field. More...

Functions

uint64_t aml_buffer_field_load (aml_buffer_field_obj_t *bufferField, aml_object_t *out)
 Read the value stored in a BufferField and store it in the out object.
 
uint64_t aml_buffer_field_store (aml_buffer_field_obj_t *bufferField, aml_object_t *in)
 Write a value to a BufferField.
 

Detailed Description

Buffer Field.

Function Documentation

◆ aml_buffer_field_load()

uint64_t aml_buffer_field_load ( aml_buffer_field_obj_t bufferField,
aml_object_t out 
)

Read the value stored in a BufferField and store it in the out object.

A BufferField is a view into a buffer, it has a bit offset and a bit size, and can be used to read or write parts of the buffer.

See also
kernel_acpi_aml_evaluate
Parameters
bufferFieldThe buffer field to read from.
outPointer to the buffer where the result will be stored, will be an integer or a buffer.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 9 of file buffer_field.c.

References AML_BUFFER_FIELD_TEMP_SIZE, aml_buffer_set_empty(), aml_integer_byte_size(), aml_integer_set(), aml_object_clear(), aml_object_get_bits_at(), aml_object_set_bits_at(), aml_buffer_field_obj_t::bitOffset, aml_buffer_field_obj_t::bitSize, EINVAL, ERR, errno, MIN, NULL, and aml_buffer_field_obj_t::target.

Referenced by aml_convert().

◆ aml_buffer_field_store()

uint64_t aml_buffer_field_store ( aml_buffer_field_obj_t bufferField,
aml_object_t in 
)

Write a value to a BufferField.

A BufferField is a view into a buffer, it has a bit offset and a bit size, and can be used to read or write parts of the buffer.

See also
kernel_acpi_aml_evaluate
Parameters
bufferFieldThe buffer field to write to.
inPointer to the object containing the value to write, must be an integer or a buffer.
Returns
On success, 0. On failure, ERR and errno is set.

Definition at line 62 of file buffer_field.c.

References AML_BUFFER, AML_BUFFER_FIELD_TEMP_SIZE, AML_INTEGER, aml_object_get_bits_at(), aml_object_set_bits_at(), aml_buffer_field_obj_t::bitOffset, aml_buffer_field_obj_t::bitSize, EINVAL, ERR, errno, MIN, NULL, and aml_buffer_field_obj_t::target.

Referenced by aml_buffer_to_buffer_field(), aml_copy_object(), and aml_integer_to_buffer_field().