![]() |
Ultibo API
C/C++ API for Ultibo Core
|
Go to the source code of this file.
Data Structures | |
| struct | _DMA_DATA |
| struct | _SYSTEM_CALL_REQUEST |
| struct | _HANDLE_ENTRY |
| struct | _INTERRUPT_ENTRY |
| struct | _SYSTEM_CALL_ENTRY |
| struct | _PAGE_TABLE_ENTRY |
Macros | |
| #define | HANDLE_FLAG_NONE 0x00000000 |
| #define | HANDLE_FLAG_NAMED 0x00000001 |
| Set if the handle has a name. | |
| #define | HANDLE_FLAG_DUPLICATE 0x00000002 |
| Set if the handle can be duplicated. | |
| #define | HANDLE_FLAG_INTERNAL HANDLE_FLAG_NONE + 0x80000000 |
| Note: Temporary value to avoid warning. | |
| #define | HANDLE_SIGNATURE 0xCD15E20A |
| #define | HANDLE_TABLE_MIN 0x100 |
| Minimum handle number (Skip first 256). | |
| #define | HANDLE_TABLE_MAX 0x7FFFFFFF |
| Maximum handle number (Avoid MSB as THandle is a signed value). | |
| #define | HANDLE_TABLE_MASK 0x7FF |
| 2048 buckets for handle lookups | |
| #define | HANDLE_NAME_LENGTH 256 |
| Maximum length of handle name. | |
| #define | DMA_DATA_FLAG_NONE 0x00000000 |
| #define | DMA_DATA_FLAG_STRIDE 0x00000001 |
| Transfer from the source to the destination using 2D stride (If supported). | |
| #define | DMA_DATA_FLAG_SOURCE_NOINCREMENT 0x00000002 |
| Don't increment the source address during the DMA request (If supported). | |
| #define | DMA_DATA_FLAG_DEST_NOINCREMENT 0x00000004 |
| Don't increment the dest address during the DMA request (If supported). | |
| #define | DMA_DATA_FLAG_SOURCE_DREQ 0x00000008 |
| Use DREQ gating on the source address during the DMA request (If supported). | |
| #define | DMA_DATA_FLAG_DEST_DREQ 0x00000010 |
| Use DREQ gating on the dest address during the DMA request (If supported). | |
| #define | DMA_DATA_FLAG_SOURCE_WIDE 0x00000020 |
| Use wide reads on the source address during the DMA request (If supported). | |
| #define | DMA_DATA_FLAG_DEST_WIDE 0x00000040 |
| Use wide writes on the dest address during the DMA request (If supported). | |
| #define | DMA_DATA_FLAG_NOREAD 0x00000080 |
| Ignore the source address and zero fill the destination (If supported). | |
| #define | DMA_DATA_FLAG_NOWRITE 0x00000100 |
| Ignore the dest address and cache fill from the source (If supported). | |
| #define | DMA_DATA_FLAG_NOCLEAN 0x00000200 |
| Do not perform cache clean on the source address (If applicable). | |
| #define | DMA_DATA_FLAG_NOINVALIDATE 0x00000400 |
| Do not perform cache invalidate on the dest address (If applicable). | |
| #define | DMA_DATA_FLAG_BULK 0x00000800 |
| Perform a bulk transfer (Higher transfer throughput)(If applicable). | |
| #define | DMA_DATA_FLAG_LITE 0x00001000 |
| Perform a "lite" transfer (Lower transfer throughput but less waiting for free channel) (If applicable). | |
| #define | DMA_DATA_FLAG_40BIT 0x00002000 |
| Perform a 40-bit address transfer (Address to memory above 1GB or 4GB depending on SoC) (If applicable). | |
| #define | PAGE_TABLE_FLAG_NONE 0x00000000 |
| #define | PAGE_TABLE_FLAG_NORMAL 0x00000002 |
| Page Table Entry represents Normal memory. | |
| #define | PAGE_TABLE_FLAG_DEVICE 0x00000004 |
| Page Table Entry represents Device memory. | |
| #define | PAGE_TABLE_FLAG_ORDERED 0x00000008 |
| Page Table Entry represents Ordered memory. | |
| #define | PAGE_TABLE_FLAG_SHARED 0x00000010 |
| Page Table Entry represents Shared memory. | |
| #define | PAGE_TABLE_FLAG_CACHEABLE 0x00000020 |
| Page Table Entry represents Cacheable memory. | |
| #define | PAGE_TABLE_FLAG_READONLY 0x00000040 |
| Page Table Entry represents Read Only memory. | |
| #define | PAGE_TABLE_FLAG_READWRITE 0x00000080 |
| Page Table Entry represents Read Write memory. | |
| #define | PAGE_TABLE_FLAG_EXECUTABLE 0x00000100 |
| Page Table Entry represents Executable memory. | |
| #define | PAGE_TABLE_FLAG_WRITEBACK 0x00000200 |
| Page Table Entry is Writeback Cacheable memory. | |
| #define | PAGE_TABLE_FLAG_WRITETHROUGH 0x00000400 |
| Page Table Entry is Writethrough Cacheable memory. | |
| #define | PAGE_TABLE_FLAG_WRITEALLOCATE 0x00000800 |
| Page Table Entry is Writeallocate Cacheable memory. | |
| #define | INTERRUPT_FLAG_NONE 0x00000000 |
| #define | INTERRUPT_FLAG_SHARED 0x00000001 |
| A shared interrupt, multiple devices can register for the same interrupt and each will be called until one returns INTERRUPT_RETURN_HANDLED. | |
| #define | INTERRUPT_FLAG_LOCAL 0x00000002 |
| A local interrupt, generated only on the CPU it is associated with. | |
| #define | INTERRUPT_FLAG_IPI 0x00000004 |
| A software interrupt or inter processor interrupt, generated by a software request instead of hardware. | |
| #define | INTERRUPT_FLAG_FIQ 0x00000008 |
| A fast interrupt, takes precedence over all other interrupts (where applicable). | |
| #define | INTERRUPT_FLAG_CHAINED 0x00000010 |
| A chained interrupt, multiple devices can register for the same interrupt and all will be called when it occurs. | |
| #define | INTERRUPT_PRIORITY_MAXIMUM 0x00 |
| #define | INTERRUPT_PRIORITY_FIQ 0x40 |
| #define | INTERRUPT_PRIORITY_DEFAULT 0xA0 |
| #define | INTERRUPT_PRIORITY_MINIMUM 0xF0 |
| #define | INTERRUPT_RETURN_NONE 0 |
| Shared interrupt not handled or not for this device. | |
| #define | INTERRUPT_RETURN_HANDLED 1 |
| Shared interrupt handled, no further processing. | |
| #define | VECTOR_TABLE_ENTRY_ARM_RESET 0 |
| ARM Reset Vector. | |
| #define | VECTOR_TABLE_ENTRY_ARM_UNDEFINED 1 |
| ARM Undefined Vector. | |
| #define | VECTOR_TABLE_ENTRY_ARM_SWI 2 |
| ARM Software Interrupt (SWI) Vector. | |
| #define | VECTOR_TABLE_ENTRY_ARM_PREFETCH 3 |
| ARM Prefetch Abort Vector. | |
| #define | VECTOR_TABLE_ENTRY_ARM_ABORT 4 |
| ARM Data Abort Vector. | |
| #define | VECTOR_TABLE_ENTRY_ARM_RESERVED 5 |
| ARM Reserved Vector. | |
| #define | VECTOR_TABLE_ENTRY_ARM_IRQ 6 |
| ARM IRQ Vector. | |
| #define | VECTOR_TABLE_ENTRY_ARM_FIQ 7 |
| ARM FIQ Vector. | |
| #define | SHUTDOWN_FLAG_NONE 0x00000000 |
| #define | SHUTDOWN_FLAG_RESTART 0x00000001 |
| The system is shutting down and restarting. | |
| #define | SHUTDOWN_FLAG_FORCE 0x00000002 |
| Forced shutdown or restart requested, registered callbacks will be bypassed. | |
| #define | SHUTDOWN_SIGNATURE 0xA73D8B0C |
| #define | SHUTDOWN_DEFAULT_DELAY 1000 |
| Default delay before starting a shutdown or restart (Milliseconds). | |
| #define | SHUTDOWN_MINIMUM_DELAY 10 |
| Minimum delay before starting a shutdown or restart (Milliseconds). | |
| #define | SHUTDOWN_DEFAULT_TIMEOUT 5000 |
| Default time to wait for a shutdown callback to complete before continuing (Milliseconds). | |
| #define | EXCEPTION_TYPE_DATA_ABORT 1 |
| #define | EXCEPTION_TYPE_PREFETCH_ABORT 2 |
| #define | EXCEPTION_TYPE_UNDEFINED_INSTRUCTION 3 |
| #define | FIRMWARE_THROTTLE_NONE (0 << 0) |
| #define | FIRMWARE_THROTTLE_UNDER_VOLTAGE (1 << 0) |
| Under voltage is occurring. | |
| #define | FIRMWARE_THROTTLE_FREQUENCY_LIMIT (1 << 1) |
| Frequency limiting is occurring. | |
| #define | FIRMWARE_THROTTLE_THROTTLED (1 << 2) |
| Throttling is occurring. | |
| #define | FIRMWARE_THROTTLE_SOFT_TEMP_LIMIT (1 << 3) |
| Soft temperature limit is active. | |
| #define | FIRMWARE_THROTTLE_WAS_UNDER_VOLTAGE (1 << 16) |
| Under voltage has occurred. | |
| #define | FIRMWARE_THROTTLE_WAS_FREQUENCY_LIMIT (1 << 17) |
| Frequency limiting has occurred. | |
| #define | FIRMWARE_THROTTLE_WAS_THROTTLED (1 << 18) |
| Throttling has occurred. | |
| #define | FIRMWARE_THROTTLE_WAS_SOFT_TEMP_LIMIT (1 << 19) |
| Soft temperature limit has occurred. | |
Typedefs | |
| typedef uint32_t | IRQ_MASK |
| typedef uint32_t | FIQ_MASK |
| typedef uint32_t | IRQ_FIQ_MASK |
| typedef uint32_t | ABORT_MASK |
| typedef struct _DMA_DATA | DMA_DATA |
| typedef struct _SYSTEM_CALL_REQUEST | SYSTEM_CALL_REQUEST |
| typedef void STDCALL(* | handle_close_proc) (HANDLE data) |
| typedef uint32_t STDCALL(* | handle_close_ex_proc) (HANDLE data) |
| typedef HANDLE STDCALL(* | handle_duplicate_proc) (HANDLE data) |
| typedef struct _HANDLE_ENTRY | HANDLE_ENTRY |
| typedef uint32_t STDCALL(* | handle_enumerate_cb) (HANDLE_ENTRY *handle, void *data) |
| typedef uint32_t STDCALL(* | shutdown_cb) (uint32_t flags, void *parameter) |
| typedef void STDCALL(* | interrupt_handler) (void *parameter) |
| typedef THREAD_HANDLE STDCALL(* | interrupt_ex_handler) (uint32_t cpuid, THREAD_HANDLE thread, void *parameter) |
| typedef uint32_t STDCALL(* | shared_interrupt_handler) (uint32_t number, uint32_t cpuid, uint32_t flags, void *parameter) |
| typedef struct _INTERRUPT_ENTRY | INTERRUPT_ENTRY |
| typedef struct _SYSTEM_CALL_ENTRY | SYSTEM_CALL_ENTRY |
| typedef struct _PAGE_TABLE_ENTRY | PAGE_TABLE_ENTRY |
| typedef shared_interrupt_handler | ipi_handler |
| typedef void STDCALL(* | system_call_handler) (SYSTEM_CALL_REQUEST *request) |
| typedef THREAD_HANDLE STDCALL(* | system_call_ex_handler) (uint32_t cpuid, THREAD_HANDLE thread, SYSTEM_CALL_REQUEST *request) |
| typedef uint32_t STDCALL(* | thread_yield_proc) (void) |
| typedef uint32_t STDCALL(* | thread_wait_proc) (LIST_HANDLE list, SPIN_HANDLE lock, uint32_t flags) |
| typedef uint32_t STDCALL(* | thread_wait_ex_proc) (LIST_HANDLE list, SPIN_HANDLE lock, uint32_t flags, uint32_t timeout) |
| typedef uint32_t STDCALL(* | thread_release_proc) (LIST_HANDLE list) |
| typedef uint32_t STDCALL(* | thread_abandon_proc) (LIST_HANDLE list) |
| typedef void STDCALL(* | timer_event_proc) (void *data) |
| typedef void STDCALL(* | worker_task_proc) (void *data) |
| typedef void STDCALL(* | worker_cb) (void *data) |
| typedef void STDCALL(* | counter_event_cb) (void *data) |
| typedef void STDCALL(* | gpio_event_cb) (void *data, uint32_t pin, uint32_t trigger) |
Functions | |
| BOOL STDCALL | device_tree_valid (void) |
| Check if valid Device Tree information was provided by the firmware/bootloader. | |
| size_t STDCALL | device_tree_get_base (void) |
| Get the base address of the Device Tree Blob (Where Applicable). | |
| uint32_t STDCALL | device_tree_get_size (void) |
| Get the total size of the Device Tree Blob (Where Applicable). | |
| uint32_t STDCALL | device_tree_read (const char *path, const char *name, void *buffer, uint32_t *size) |
| Read the raw value of a Device Tree property (Where Applicable). | |
| uint32_t STDCALL | device_tree_read32 (const char *path, const char *name, uint32_t *value) |
| Read a 32-bit value from a Device Tree property (Where Applicable). | |
| uint32_t STDCALL | device_tree_read64 (const char *path, const char *name, uint64_t *value) |
| Read a 64-bit value from a Device Tree property (Where Applicable). | |
| uint32_t STDCALL | device_tree_read_string (const char *path, const char *name, char *value, uint32_t len) |
| Read a string value from a Device Tree property (Where Applicable). | |
| void STDCALL | boot_blink (void) |
| Blink the Activity LED (Where Applicable). | |
| void STDCALL | boot_output (uint32_t value) |
| Output boot time information (Where Applicable). | |
| void STDCALL | boot_console_start (void) |
| Start the boot time console display (Where Applicable). | |
| void STDCALL | boot_console_write (const char *value) |
| Output text to the boot time console display (Where Applicable). | |
| void STDCALL | boot_console_write_ex (const char *value, uint32_t x, uint32_t y) |
| Output text to the boot time console display at the specified X and Y position (Where Applicable). | |
| uint32_t STDCALL | boot_console_get_x (void) |
| Get the current X position of the boot time console display (Where Applicable). | |
| uint32_t STDCALL | boot_console_get_y (void) |
| Get the current Y position of the boot time console display (Where Applicable). | |
| void STDCALL | power_led_enable (void) |
| Enable the Power LED (Where Applicable). | |
| void STDCALL | power_led_on (void) |
| Turn On the Power LED (Where Applicable). | |
| void STDCALL | power_led_off (void) |
| Turn Off the Power LED (Where Applicable). | |
| void STDCALL | activity_led_enable (void) |
| Enable the Activity LED (Where Applicable). | |
| void STDCALL | activity_led_on (void) |
| Turn On the Activity LED (Where Applicable). | |
| void STDCALL | activity_led_off (void) |
| Turn Off the Activity LED (Where Applicable). | |
| BOOL STDCALL | counter_available (void) |
| Check if a counter is currently available. | |
| uint32_t STDCALL | counter_read (void) |
| Read the current value of the default counter. | |
| int64_t STDCALL | counter_read64 (void) |
| Read the current value of the default counter. | |
| uint32_t STDCALL | counter_wait (void) |
| Wait for the current interval to expire on the default counter. | |
| uint32_t STDCALL | counter_event (counter_event_cb callback, void *data) |
| Schedule a function to be called when the current interval expires on the default counter. | |
| uint32_t STDCALL | counter_cancel (void) |
| Cancel a previously scheduled event callback function on the default counter. | |
| uint32_t STDCALL | counter_get_rate (void) |
| Get the current clock rate in Hz of the default counter. | |
| uint32_t STDCALL | counter_set_rate (uint32_t rate) |
| Set the current clock rate in Hz of the default counter. | |
| uint32_t STDCALL | counter_get_interval (void) |
| Get the current interval in ticks of the default counter. | |
| uint32_t STDCALL | counter_set_interval (uint32_t interval) |
| Set the current interval in ticks of the default counter. | |
| uint32_t STDCALL | mailbox_receive (uint32_t mailbox, uint32_t channel) |
| Receive from specified mailbox on specified channel. | |
| void STDCALL | mailbox_send (uint32_t mailbox, uint32_t channel, uint32_t data) |
| Send to specified mailbox on specified channel. | |
| uint32_t STDCALL | mailbox_call (uint32_t mailbox, uint32_t channel, uint32_t data, uint32_t *response) |
| Perform a transaction (Send/Receive) to specified mailbox on specified channel. | |
| uint32_t STDCALL | mailbox_call_ex (uint32_t mailbox, uint32_t channel, uint32_t data, uint32_t *response, uint32_t timeout) |
| Perform a transaction (Send/Receive) to specified mailbox on specified channel. | |
| uint32_t STDCALL | mailbox_property_call (uint32_t mailbox, uint32_t channel, void *data, uint32_t *response) |
| Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel. | |
| uint32_t STDCALL | mailbox_property_call_ex (uint32_t mailbox, uint32_t channel, void *data, uint32_t *response, uint32_t timeout) |
| Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel. | |
| uint32_t STDCALL | mailbox_property_tag (uint32_t tag, void *data, uint32_t size) |
| Request a property tag (Get/Set) from the mailbox property channel. | |
| BOOL STDCALL | random_available (void) |
| Check if a hardware random number generator is currently available The software random number generator from the RTL is always available. | |
| void STDCALL | random_seed (uint32_t seed) |
| int32_t STDCALL | random_read_longint (int32_t limit) |
| int64_t STDCALL | random_read_int64 (int64_t limit) |
| double_t STDCALL | random_read_double (void) |
| double_t STDCALL | random_read_extended (void) |
| BOOL STDCALL | watchdog_available (void) |
| Check if a watchdog timer is currently available. | |
| uint32_t STDCALL | watchdog_start (uint32_t milliseconds) |
| uint32_t STDCALL | watchdog_stop (void) |
| uint32_t STDCALL | watchdog_refresh (uint32_t milliseconds) |
| uint32_t STDCALL | request_irq (uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter) |
| Request registration of the supplied handler to the specified IRQ number. | |
| uint32_t STDCALL | release_irq (uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter) |
| Request deregistration of the supplied handler from the specified IRQ number. | |
| uint32_t STDCALL | request_ex_irq (uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter) |
| Request registration of the supplied extended handler to the specified IRQ number. | |
| uint32_t STDCALL | release_ex_irq (uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter) |
| Request deregistration of the supplied extended handler from the specified IRQ number. | |
| uint32_t STDCALL | request_fiq (uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter) |
| Request registration of the supplied handler to the specified FIQ number (Where Applicable). | |
| uint32_t STDCALL | release_fiq (uint32_t cpuid, uint32_t number, interrupt_handler handler, void *parameter) |
| Request deregistration of the supplied handler from the specified FIQ number (Where Applicable). | |
| uint32_t STDCALL | request_ex_fiq (uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter) |
| Request registration of the supplied extended handler to the specified FIQ number (Where Applicable). | |
| uint32_t STDCALL | release_ex_fiq (uint32_t cpuid, uint32_t number, interrupt_handler handler, interrupt_ex_handler handlerex, void *parameter) |
| Request deregistration of the supplied extended handler from the specified FIQ number (Where Applicable). | |
| uint32_t STDCALL | request_ipi (uint32_t cpuid, uint32_t number, ipi_handler handler, void *parameter) |
| Request registration of the supplied handler to the specified IPI (Inter-processor interrupt) number (Where Applicable). | |
| uint32_t STDCALL | release_ipi (uint32_t cpuid, uint32_t number, ipi_handler handler, void *parameter) |
| Request deregistration of the supplied handler from the specified IPI (Inter-processor interrupt) number (Where Applicable). | |
| uint32_t STDCALL | register_interrupt (uint32_t number, uint32_t mask, uint32_t priority, uint32_t flags, shared_interrupt_handler handler, void *parameter) |
| Request registration of the supplied handler to the specified interrupt number (Where Applicable). | |
| uint32_t STDCALL | deregister_interrupt (uint32_t number, uint32_t mask, uint32_t priority, uint32_t flags, shared_interrupt_handler handler, void *parameter) |
| Request deregistration of the supplied handler from the specified interrupt number (Where Applicable). | |
| void STDCALL | system_call (uint32_t number, size_t param1, size_t param2, size_t param3) |
| Perform a System Call function with the supplied parameters (Where Applicable). | |
| uint32_t STDCALL | register_system_call (uint32_t number, system_call_handler handler) |
| Request registration of the supplied handler to the specified System Call number (Where Applicable). | |
| uint32_t STDCALL | deregister_system_call (uint32_t number, system_call_handler handler) |
| Request deregistration of the supplied handler from the specified System Call number (Where Applicable). | |
| uint32_t STDCALL | register_system_call_ex (uint32_t cpuid, uint32_t number, system_call_handler handler, system_call_ex_handler handlerex) |
| Request registration of the supplied extended handler to the specified System Call number (Where Applicable). | |
| uint32_t STDCALL | deregister_system_call_ex (uint32_t cpuid, uint32_t number, system_call_handler handler, system_call_ex_handler handlerex) |
| Request deregistration of the supplied extended handler from the specified System Call number (Where Applicable). | |
| uint32_t STDCALL | get_interrupt_count (void) |
| Get the number of interrupt entries for the current platform. | |
| uint32_t STDCALL | get_interrupt_start (void) |
| Get the starting number of interrupt entries for the current platform. | |
| uint32_t STDCALL | get_interrupt_entry (uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt) |
| Get the interrupt entry for the specified interrupt number and instance. | |
| uint32_t STDCALL | get_local_interrupt_count (void) |
| Get the number of local interrupt entries for the current platform (Where Applicable). | |
| uint32_t STDCALL | get_local_interrupt_start (void) |
| Get the starting number of local interrupt entries for the current platform (Where Applicable). | |
| uint32_t STDCALL | get_local_interrupt_entry (uint32_t cpuid, uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt) |
| Get the local interrupt entry for the specified interrupt number (Where Applicable). | |
| uint32_t STDCALL | get_software_interrupt_count (void) |
| Get the number of software interrupt entries for the current platform (Where Applicable). | |
| uint32_t STDCALL | get_software_interrupt_start (void) |
| Get the starting number of software interrupt entries for the current platform (Where Applicable). | |
| uint32_t STDCALL | get_software_interrupt_entry (uint32_t cpuid, uint32_t number, uint32_t instance, INTERRUPT_ENTRY *interrupt) |
| Get the software interrupt entry for the specified interrupt number and instance (Where Applicable). | |
| uint32_t STDCALL | get_system_call_count (void) |
| Get the number of system call entries for the current platform (Where Applicable). | |
| SYSTEM_CALL_ENTRY STDCALL | get_system_call_entry (uint32_t number) |
| Get the system call entry for the specified system call number (Where Applicable). | |
| uint32_t STDCALL | system_restart (uint32_t delay) |
| Restart the system. | |
| uint32_t STDCALL | system_shutdown (uint32_t delay) |
| Shutdown the system. | |
| uint32_t STDCALL | system_register_shutdown (shutdown_cb callback, void *parameter, uint32_t timeout) |
| Register a procedure to be called during system shutdown or restart. | |
| uint32_t STDCALL | system_deregister_shutdown (shutdown_cb callback, void *parameter) |
| Deregister a procedure from being called during system shutdown or restart. | |
| int64_t STDCALL | system_get_uptime (void) |
| Get the current system up time in 100 nanosecond ticks since 1 January 1601. | |
| uint32_t STDCALL | system_get_command_line (char *commandline, uint32_t len) |
| Get the current command line. | |
| void *STDCALL | system_get_environment (void) |
| Get the current environment. | |
| uint32_t STDCALL | system_date_to_string (double_t date, char *value, uint32_t len) |
| Return the supplied date value as a string in the system defined format. | |
| uint32_t STDCALL | system_time_to_string (double_t time, char *value, uint32_t len) |
| Return the supplied time value as a string in the system defined format. | |
| uint32_t STDCALL | system_date_time_to_string (double_t datetime, char *value, uint32_t len) |
| Return the supplied date and time value as a string in the system defined format. | |
| uint32_t STDCALL | system_interval_to_string (double_t interval, char *value, uint32_t len) |
| Return the supplied time interval as a string in the system defined format. | |
| uint32_t STDCALL | cpu_get_arch (void) |
| Get the CPU architecture for this board. | |
| uint32_t STDCALL | cpu_get_type (void) |
| Get the CPU type for this board. | |
| uint32_t STDCALL | cpu_get_boot (void) |
| Get the boot CPU for this board. | |
| uint32_t STDCALL | cpu_get_mask (void) |
| Get the CPU mask for this board. | |
| uint32_t STDCALL | cpu_get_count (void) |
| Get the CPU count for this board. | |
| uint32_t STDCALL | cpu_get_mode (void) |
| Get the current CPU mode. | |
| uint32_t STDCALL | cpu_get_state (void) |
| Get the current CPU state. | |
| uint32_t STDCALL | cpu_get_group (void) |
| Get the current CPU group. | |
| uint32_t STDCALL | cpu_get_current (void) |
| Get the current CPU ID. | |
| uint32_t STDCALL | cpu_get_memory (size_t *address, uint64_t *length) |
| Get the memory start and size available to the CPU. | |
| double_t STDCALL | cpu_get_percentage (uint32_t cpuid) |
| Get the last second utilization of the specified CPU in percentage. | |
| uint32_t STDCALL | cpu_get_utilization (uint32_t cpuid) |
| Get the last second utilization of the specified CPU. | |
| uint32_t STDCALL | cpu_get_model (void) |
| Get the CPU model of the current CPU. | |
| uint32_t STDCALL | cpu_get_revision (void) |
| Get the CPU revision of the current CPU. | |
| uint32_t STDCALL | cpu_get_description (char *description, uint32_t len) |
| Get the CPU description of the current CPU. | |
| uint32_t STDCALL | fpu_get_type (void) |
| Get the FPU type for this board. | |
| uint32_t STDCALL | fpu_get_state (void) |
| Get the current FPU state. | |
| uint32_t STDCALL | gpu_get_type (void) |
| Get the GPU type for this board. | |
| uint32_t STDCALL | gpu_get_state (void) |
| Get the current GPU state. | |
| uint32_t STDCALL | gpu_get_memory (size_t *address, uint64_t *length) |
| Get the memory start and size available to the GPU. | |
| uint32_t STDCALL | l1_cache_get_type (void) |
| Get the L1 cache type for this board. | |
| uint32_t STDCALL | l1_data_cache_get_size (void) |
| Get the L1 data cache size for this board. | |
| uint32_t STDCALL | l1_data_cache_get_line_size (void) |
| Get the L1 data cache line size for this board. | |
| uint32_t STDCALL | l1_instruction_cache_get_size (void) |
| Get the L1 instruction cache size for this board. | |
| uint32_t STDCALL | l1_instruction_cache_get_line_size (void) |
| Get the L1 instruction cache line size for this board. | |
| uint32_t STDCALL | l2_cache_get_type (void) |
| Get the L2 cache type for this board. | |
| uint32_t STDCALL | l2_cache_get_size (void) |
| Get the L2 cache size for this board. | |
| uint32_t STDCALL | l2_cache_get_line_size (void) |
| Get the L2 cache line size for this board. | |
| void STDCALL | version_get_info (uint32_t *major, uint32_t *minor, uint32_t *revision) |
| Get the version information of the currently running system. | |
| uint32_t STDCALL | version_get_date (char *date, uint32_t len) |
| Get the version release date of the currently running system. | |
| uint32_t STDCALL | version_get_name (char *name, uint32_t len) |
| Get the version release name of the currently running system. | |
| uint32_t STDCALL | version_get_version (char *version, uint32_t len) |
| Get the version string of the currently running system. | |
| uint32_t STDCALL | board_get_type (void) |
| Get the current Board type. | |
| uint32_t STDCALL | board_get_model (void) |
| Get the current Board model. | |
| int64_t STDCALL | board_get_serial (void) |
| Get the current Board serial number. | |
| uint32_t STDCALL | board_get_revision (void) |
| Get the current Board revision number. | |
| uint32_t STDCALL | board_get_mac_address (char *address, uint32_t len) |
| Get the current Board MAC address (Where Applicable). | |
| uint32_t STDCALL | chip_get_revision (void) |
| Get the current Chip revision number. | |
| uint32_t STDCALL | firmware_get_revision (void) |
| Get the current board Firmware Revision. | |
| uint32_t STDCALL | firmware_get_throttled (void) |
| Get the current throttling state from the firmware. | |
| uint32_t STDCALL | machine_get_type (void) |
| Get the current Machine type. | |
| size_t STDCALL | memory_get_base (void) |
| Get the base address of system memory. | |
| uint64_t STDCALL | memory_get_size (void) |
| Get the total size of system memory. | |
| uint32_t STDCALL | memory_get_page_size (void) |
| Get the page size of system memory. | |
| uint32_t STDCALL | memory_get_large_page_size (void) |
| Get the large page size of system memory (Where Applicable). | |
| uint32_t STDCALL | memory_get_section_size (void) |
| Get the section size of system memory (Where Applicable). | |
| uint32_t STDCALL | memory_get_large_section_size (void) |
| Get the large section size of system memory (Where Applicable). | |
| uint32_t STDCALL | power_on (uint32_t powerid) |
| Power On the specified device. | |
| uint32_t STDCALL | power_off (uint32_t powerid) |
| Power Off the specified device. | |
| uint32_t STDCALL | power_get_wait (uint32_t powerid) |
| Get the enable wait time in Microseconds of the specified device. | |
| uint32_t STDCALL | power_get_state (uint32_t powerid) |
| Get the power state of the specified device. | |
| uint32_t STDCALL | power_set_state (uint32_t powerid, uint32_t state, BOOL wait) |
| Set the power state of the specified device (Optionally waiting for ready). | |
| uint32_t STDCALL | clock_ticks (void) |
| Get the current number of clock ticks (When this reaches CLOCK_TICKS_PER_SECOND then ClockSeconds is incremented and this is reset to zero). | |
| uint32_t STDCALL | clock_seconds (void) |
| Get the number of clock seconds since the system was started (This forms the system clock). | |
| int64_t STDCALL | clock_milliseconds (void) |
| Get the number of clock milliseconds since the system was started. | |
| int64_t STDCALL | clock_microseconds (void) |
| Get the number of clock microseconds since the system was started. | |
| int64_t STDCALL | clock_nanoseconds (void) |
| Get the number of clock nanoseconds since the system was started. | |
| int64_t STDCALL | clock_get_base (void) |
| Get the current clock base in 100 nanosecond ticks since 1 January 1601. | |
| int64_t STDCALL | clock_get_time (void) |
| Get the current system time in 100 nanosecond ticks since 1 January 1601. | |
| int64_t STDCALL | clock_set_time (int64_t time, BOOL rtc) |
| Set the current system time in 100 nanosecond ticks since 1 January 1601. | |
| uint32_t STDCALL | clock_get_count (void) |
| Gets the current system clock count (32 least significant bits of total). | |
| int64_t STDCALL | clock_get_total (void) |
| Gets the total system clock count. | |
| uint32_t STDCALL | clock_update_offset (void) |
| Update the system time offset between UTC and Local. | |
| uint32_t STDCALL | clock_calculate_offset (double_t datetime, int32_t *offset, BOOL *daylight) |
| Calculate the system time offset between UTC and Local at the given date and time. | |
| uint32_t STDCALL | clock_get_rate (uint32_t clockid) |
| Get the clock rate in Hz of the specified Clock. | |
| uint32_t STDCALL | clock_set_rate (uint32_t clockid, uint32_t rate, BOOL turbo) |
| Set the clock rate in Hz of the specified Clock. | |
| uint32_t STDCALL | clock_get_state (uint32_t clockid) |
| Get the state of the specified Clock. | |
| uint32_t STDCALL | clock_set_state (uint32_t clockid, uint32_t state) |
| Set the state of the specified Clock. | |
| uint32_t STDCALL | clock_get_min_rate (uint32_t clockid) |
| Get the minimum clock rate in Hz of the specified Clock. | |
| uint32_t STDCALL | clock_get_max_rate (uint32_t clockid) |
| Get the maximum clock rate in Hz of the specified Clock. | |
| uint32_t STDCALL | clock_get_measured_rate (uint32_t clockid) |
| Get the measured or actual clock rate in Hz of the specified Clock. | |
| uint32_t STDCALL | turbo_get_state (uint32_t turboid) |
| Get the Turbo state (0 equals Off / 1 equals On) of the specified device. | |
| uint32_t STDCALL | turbo_set_state (uint32_t turboid, uint32_t state) |
| Set the Turbo state (0 equals Off / 1 equals On) of the specified device. | |
| uint32_t STDCALL | voltage_get_value (uint32_t voltageid) |
| Get the current voltage level of the specified device. | |
| uint32_t STDCALL | voltage_set_value (uint32_t voltageid, uint32_t value) |
| Set the current voltage level of the specified device. | |
| uint32_t STDCALL | voltage_get_min_value (uint32_t voltageid) |
| Get the minimum voltage level of the specified device. | |
| uint32_t STDCALL | voltage_get_max_value (uint32_t voltageid) |
| Get the maximum voltage level of the specified device. | |
| uint32_t STDCALL | temperature_get_current (uint32_t temperatureid) |
| Get the current temperature in thousandths of a degree C of the specified device. | |
| uint32_t STDCALL | temperature_get_maximum (uint32_t temperatureid) |
| Get the maximum temperature in thousandths of a degree C of the specified device. | |
| HANDLE STDCALL | gpu_memory_allocate (uint32_t length, uint32_t alignment, uint32_t flags) |
| Allocate memory from the GPU. | |
| uint32_t STDCALL | gpu_memory_release (HANDLE handle) |
| Release memory allocated from the GPU. | |
| uint32_t STDCALL | gpu_memory_lock (HANDLE handle) |
| Lock memory allocated from the GPU and return an address. | |
| uint32_t STDCALL | gpu_memory_unlock (HANDLE handle) |
| Unlock memory allocated from the GPU. | |
| uint32_t STDCALL | gpu_execute_code (void *address, uint32_t r0, uint32_t r1, uint32_t r2, uint32_t r3, uint32_t r4, uint32_t r5) |
| Execute a block of code on the GPU. | |
| HANDLE STDCALL | dispmanx_handle_get (HANDLE resource) |
| Convert a Dispmanx Resource handle to a Memory handle (Which can be passed to Lock/Unlock above). | |
| uint32_t STDCALL | edid_block_get (uint32_t block, void *buffer, uint32_t length) |
| Get an EDID block from HDMI. | |
| BOOL STDCALL | framebuffer_available (void) |
| Check if a framebuffer device is currently available. | |
| uint32_t STDCALL | framebuffer_allocate (uint32_t alignment, uint32_t *address, uint32_t *length) |
| Allocate a new Framebuffer. | |
| uint32_t STDCALL | framebuffer_release (void) |
| Release the current Framebuffer. | |
| uint32_t STDCALL | framebuffer_set_state (uint32_t state) |
| Set the current Framebuffer (Display) state (0 for Off / 1 for On). | |
| uint32_t STDCALL | framebuffer_get_dimensions (uint32_t *width, uint32_t *height, uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right) |
| Get the default Dimensions of the Framebuffer (Physical Width, Height and Overscan Top, Bottom, Left, Right in Pixels). | |
| uint32_t STDCALL | framebuffer_get_physical (uint32_t *width, uint32_t *height) |
| Get the Physical Framebuffer Width and Height in Pixels. | |
| uint32_t STDCALL | framebuffer_set_physical (uint32_t *width, uint32_t *height) |
| Set the Physical Framebuffer Width and Height in Pixels. | |
| uint32_t STDCALL | framebuffer_test_physical (uint32_t *width, uint32_t *height) |
| Test the Physical Framebuffer Width and Height in Pixels. | |
| uint32_t STDCALL | framebuffer_get_virtual (uint32_t *width, uint32_t *height) |
| Get the Virtual Framebuffer Width and Height in Pixels. | |
| uint32_t STDCALL | framebuffer_set_virtual (uint32_t *width, uint32_t *height) |
| Set the Virtual Framebuffer Width and Height in Pixels. | |
| uint32_t STDCALL | framebuffer_test_virtual (uint32_t *width, uint32_t *height) |
| Test the Virtual Framebuffer Width and Height in Pixels. | |
| uint32_t STDCALL | framebuffer_get_depth (uint32_t *depth) |
| Get the Framebuffer Depth in Bits per Pixel. | |
| uint32_t STDCALL | framebuffer_set_depth (uint32_t *depth) |
| Set the Framebuffer Depth in Bits per Pixel. | |
| uint32_t STDCALL | framebuffer_test_depth (uint32_t *depth) |
| Test the Framebuffer Depth in Bits per Pixel. | |
| uint32_t STDCALL | framebuffer_get_pixel_order (uint32_t *order) |
| Get the Framebuffer Pixel Order (0 = BGR / 1 = RGB). | |
| uint32_t STDCALL | framebuffer_set_pixel_order (uint32_t *order) |
| Set the Framebuffer Pixel Order (0 = BGR / 1 = RGB). | |
| uint32_t STDCALL | framebuffer_test_pixel_order (uint32_t *order) |
| Test the Framebuffer Pixel Order (0 = BGR / 1 = RGB). | |
| uint32_t STDCALL | framebuffer_get_alpha_mode (uint32_t *mode) |
| Get the Framebuffer Alpha Mode. | |
| uint32_t STDCALL | framebuffer_set_alpha_mode (uint32_t *mode) |
| Set the Framebuffer Alpha Mode. | |
| uint32_t STDCALL | framebuffer_test_alpha_mode (uint32_t *mode) |
| Test the Framebuffer Alpha Mode. | |
| uint32_t STDCALL | framebuffer_get_pitch (void) |
| Get the Framebuffer Pitch in Bytes per Line. | |
| uint32_t STDCALL | framebuffer_get_offset (uint32_t *x, uint32_t *y) |
| Get the Framebuffer Virtual Offset in Pixels. | |
| uint32_t STDCALL | framebuffer_set_offset (uint32_t *x, uint32_t *y) |
| Set the Framebuffer Virtual Offset in Pixels. | |
| uint32_t STDCALL | framebuffer_test_offset (uint32_t *x, uint32_t *y) |
| Test the Framebuffer Virtual Offset in Pixels. | |
| uint32_t STDCALL | framebuffer_get_overscan (uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right) |
| Get the Framebuffer Top, Bottom, Left and Right Overscan in Pixels. | |
| uint32_t STDCALL | framebuffer_set_overscan (uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right) |
| Set the Framebuffer Top, Bottom, Left and Right Overscan in Pixels. | |
| uint32_t STDCALL | framebuffer_test_overscan (uint32_t *top, uint32_t *bottom, uint32_t *left, uint32_t *right) |
| Test the Framebuffer Top, Bottom, Left and Right Overscan in Pixels. | |
| uint32_t STDCALL | framebuffer_get_palette (void *buffer, uint32_t length) |
| Get the Framebuffer Palette in RGBA values. | |
| uint32_t STDCALL | framebuffer_set_palette (uint32_t start, uint32_t count, void *buffer, uint32_t length) |
| Set the Framebuffer Palette in RGBA values. | |
| uint32_t STDCALL | framebuffer_test_palette (uint32_t start, uint32_t count, void *buffer, uint32_t length) |
| Test the Framebuffer Palette in RGBA values. | |
| uint32_t STDCALL | framebuffer_get_layer (int32_t *layer) |
| Get the Framebuffer Layer. | |
| uint32_t STDCALL | framebuffer_set_layer (int32_t *layer) |
| Set the Framebuffer Layer. | |
| uint32_t STDCALL | framebuffer_test_layer (int32_t *layer) |
| Test the Framebuffer Layer. | |
| uint32_t STDCALL | framebuffer_test_vsync (void) |
| Test the Framebuffer Vertical Sync (Where Applicable). | |
| uint32_t STDCALL | framebuffer_set_vsync (void) |
| Set (Wait For) the Framebuffer Vertical Sync (Where Applicable). | |
| uint32_t STDCALL | framebuffer_set_backlight (uint32_t brightness) |
| Set the Framebuffer Backlight brightness (Where Applicable). | |
| uint32_t STDCALL | framebuffer_get_num_displays (uint32_t *numdisplays) |
| Get the number of framebuffer displays (Where Applicable). | |
| uint32_t STDCALL | framebuffer_get_display_id (uint32_t displaynum) |
| Get the display id for the specified display number (Where Applicable). | |
| uint32_t STDCALL | framebuffer_set_display_num (uint32_t displaynum) |
| Set the current framebuffer display number (Where Applicable). | |
| uint32_t STDCALL | framebuffer_get_display_settings (uint32_t displaynum, DISPLAY_SETTINGS *displaysettings) |
| Get the display settings for the specified display number (Where Applicable). | |
| uint32_t STDCALL | framebuffer_display_id_to_name (uint32_t displayid, char *name, uint32_t len) |
| Get the name for the specified display id (Where Applicable). | |
| uint32_t STDCALL | touch_get_buffer (size_t *address) |
| Get the Touchscreen memory buffer (Where Applicable). | |
| uint32_t STDCALL | touch_set_buffer (size_t address) |
| Set the Touchscreen memory buffer (Where Applicable). | |
| uint32_t STDCALL | cursor_set_default (void) |
| Set the default Cursor Info (Where Applicable). | |
| uint32_t STDCALL | cursor_set_info (uint32_t width, uint32_t height, uint32_t hotspotx, uint32_t hotspoty, void *pixels, uint32_t length) |
| Set the Cursor Info (Width and Height, Hotspot and Pixel image). | |
| uint32_t STDCALL | cursor_set_state (BOOL enabled, uint32_t x, uint32_t y, BOOL relative) |
| Set the Cursor State (Enabled, X and Y). | |
| BOOL STDCALL | dma_available (void) |
| Check if DMA is currently available. | |
| uint32_t STDCALL | dma_transfer (DMA_DATA *data, uint32_t direction, uint32_t peripheral) |
| Perform a DMA transfer using the list of DMA data blocks provided. | |
| uint32_t STDCALL | dma_fill_memory (void *dest, uint32_t size, uint8_t value) |
| Fill memory at the destination address using DMA. | |
| uint32_t STDCALL | dma_copy_memory (void *source, void *dest, uint32_t size) |
| Copy memory from the source to the destination address using DMA. | |
| uint32_t STDCALL | dma_read_peripheral (void *address, void *dest, uint32_t size, uint32_t peripheral) |
| Read from a peripheral address to the destination address using DMA. | |
| uint32_t STDCALL | dma_write_peripheral (void *source, void *address, uint32_t size, uint32_t peripheral) |
| Write to a peripheral address from the source address using DMA. | |
| void *STDCALL | dma_allocate_buffer (uint32_t size) |
| Allocate a buffer compatible with DMA memory reads or writes. | |
| void *STDCALL | dma_allocate_buffer_ex (uint32_t *size) |
| Allocate a buffer compatible with DMA memory reads or writes. | |
| uint32_t STDCALL | dma_release_buffer (void *buffer) |
| Release a buffer allocated with DMAAllocateBuffer. | |
| uint32_t STDCALL | dma_get_channels (void) |
| Get the currently enabled DMA channel bitmap (If supported). | |
| HANDLE STDCALL | handle_create (HANDLE data, uint32_t _type) |
| Create and Open a new unnamed handle of the supplied type. | |
| HANDLE_ENTRY *STDCALL | handle_create_ex (const char *name, uint32_t flags, HANDLE data, uint32_t _type) |
| Create and Open a new named or unnamed handle of the supplied type. | |
| uint32_t STDCALL | handle_destroy (HANDLE handle) |
| Close and Destroy a named or unnamed handle. | |
| HANDLE_ENTRY *STDCALL | handle_get (HANDLE handle) |
| Get the handle entry for the supplied handle. | |
| HANDLE_ENTRY *STDCALL | handle_find (const char *name) |
| Find an existing named handle of the supplied type. | |
| uint32_t STDCALL | handle_enumerate (handle_enumerate_cb callback, void *data) |
| Enumerate all handles in the handle table. | |
| HANDLE STDCALL | handle_open (const char *name) |
| Open an existing named handle. | |
| uint32_t STDCALL | handle_close (HANDLE handle) |
| Close a named or unnamed handle. | |
| HANDLE STDCALL | handle_duplicate (HANDLE handle) |
| Duplicate an existing named or unnamed handle. | |
| BOOL STDCALL | gpio_available (void) |
| Check if a GPIO device is available. | |
| uint32_t STDCALL | gpio_read (uint32_t reg) |
| Perform a direct read from a GPIO register. | |
| void STDCALL | gpio_write (uint32_t reg, uint32_t value) |
| Perform a direct write to a GPIO register. | |
| uint32_t STDCALL | gpio_input_get (uint32_t pin) |
| Get the current state of a GPIO input pin. | |
| uint32_t STDCALL | gpio_input_wait (uint32_t pin, uint32_t trigger, uint32_t timeout) |
| Wait for the state of a GPIO input pin to change. | |
| uint32_t STDCALL | gpio_input_event (uint32_t pin, uint32_t trigger, uint32_t timeout, gpio_event_cb callback, void *data) |
| Schedule a function to be called when the state of a GPIO input pin changes. | |
| uint32_t STDCALL | gpio_output_set (uint32_t pin, uint32_t level) |
| Set the state of a GPIO output pin. | |
| uint32_t STDCALL | gpio_level_get (uint32_t pin) |
| Get the current level (state) of a GPIO pin. | |
| uint32_t STDCALL | gpio_level_set (uint32_t pin, uint32_t level) |
| Set the level (state) of a GPIO pin. | |
| uint32_t STDCALL | gpio_pull_get (uint32_t pin) |
| Get the current pull state of a GPIO pin. | |
| uint32_t STDCALL | gpio_pull_select (uint32_t pin, uint32_t mode) |
| Change the pull state of a GPIO pin. | |
| uint32_t STDCALL | gpio_function_get (uint32_t pin) |
| Get the current function of a GPIO pin. | |
| uint32_t STDCALL | gpio_function_select (uint32_t pin, uint32_t mode) |
| Change the function of a GPIO pin. | |
| uint32_t STDCALL | virtual_gpio_input_get (uint32_t pin) |
| Get the current state of a virtual GPIO input pin. | |
| uint32_t STDCALL | virtual_gpio_output_set (uint32_t pin, uint32_t level) |
| Set the state of a virtual GPIO output pin. | |
| uint32_t STDCALL | virtual_gpio_level_get (uint32_t pin) |
| Get the current level (state) of a virtual GPIO pin. | |
| uint32_t STDCALL | virtual_gpio_level_set (uint32_t pin, uint32_t level) |
| Set the level (state) of a virtual GPIO pin. | |
| uint32_t STDCALL | virtual_gpio_function_get (uint32_t pin) |
| Get the current function of a virtual GPIO pin. | |
| uint32_t STDCALL | virtual_gpio_function_select (uint32_t pin, uint32_t mode) |
| Change the function of a virtual GPIO pin. | |
| BOOL STDCALL | spi_available (void) |
| Check if an SPI device is available. | |
| uint32_t STDCALL | spi_start (uint32_t mode, uint32_t clockrate, uint32_t clockphase, uint32_t clockpolarity) |
| Start the default SPI device ready for writing and reading. | |
| uint32_t STDCALL | spi_stop (void) |
| Stop the default SPI device and terminate writing and reading. | |
| uint32_t STDCALL | spi_read (uint16_t chipselect, void *dest, uint32_t size, uint32_t *count) |
| Read data from the default SPI device Because SPI writes and then reads for each byte, dummy data will be written for each byte to be read. | |
| uint32_t STDCALL | spi_write (uint16_t chipselect, void *source, uint32_t size, uint32_t *count) |
| Write data to the default SPI device Because SPI writes and then reads for each byte, received data will be discarded for each byte written. | |
| uint32_t STDCALL | spi_write_read (uint16_t chipselect, void *source, void *dest, uint32_t size, uint32_t *count) |
| Write data to and Read data from the default SPI device in one operation Because SPI writes and then reads for each byte, both the source and dest buffers must be the same size. | |
| uint32_t STDCALL | spi_get_mode (void) |
| Get the device mode of the default SPI device. | |
| uint32_t STDCALL | spi_set_mode (uint32_t mode) |
| Set the device mode for the default SPI device. | |
| uint32_t STDCALL | spi_get_clock_rate (uint16_t chipselect) |
| Get the clock rate of the default SPI device. | |
| uint32_t STDCALL | spi_set_clock_rate (uint16_t chipselect, uint32_t clockrate) |
| Set the clock rate for the default SPI device. | |
| uint32_t STDCALL | spi_get_clock_phase (void) |
| Get the clock phase of the default SPI device. | |
| uint32_t STDCALL | spi_set_clock_phase (uint32_t clockphase) |
| Set the clock phase for the default SPI device. | |
| uint32_t STDCALL | spi_get_clock_polarity (void) |
| Get the clock polarity of the default SPI device. | |
| uint32_t STDCALL | spi_set_clock_polarity (uint32_t clockpolarity) |
| Set the clock polarity for the default SPI device. | |
| uint32_t STDCALL | spi_get_select_polarity (uint16_t chipselect) |
| Get the chip select polarity of the default SPI device. | |
| uint32_t STDCALL | spi_set_select_polarity (uint16_t chipselect, uint32_t selectpolarity) |
| Set the chip select polarity for the default SPI device. | |
| uint32_t STDCALL | spi_get_description (uint32_t id, char *description, uint32_t len) |
| Return the device description of an SPI device. | |
| BOOL STDCALL | i2c_available (void) |
| Check if an I2C device is available. | |
| uint32_t STDCALL | i2c_start (uint32_t rate) |
| Start the default I2C device ready for reading and writing. | |
| uint32_t STDCALL | i2c_stop (void) |
| Stop the default I2C device and terminate reading and writing. | |
| uint32_t STDCALL | i2c_read (uint16_t address, void *buffer, uint32_t size, uint32_t *count) |
| Read data from the default I2C device. | |
| uint32_t STDCALL | i2c_write (uint16_t address, void *buffer, uint32_t size, uint32_t *count) |
| Write data to the default I2C device. | |
| uint32_t STDCALL | i2c_write_read (uint16_t address, void *initial, uint32_t len, void *data, uint32_t size, uint32_t *count) |
| Write data to and Read data from the default I2C device in one operation Useful for devices that require a register address specified before a read (eg EEPROM devices). | |
| uint32_t STDCALL | i2c_write_write (uint16_t address, void *initial, uint32_t len, void *data, uint32_t size, uint32_t *count) |
| Write 2 data blocks to the default I2C device in one operation Useful for devices that require a register address specified before a write (eg EEPROM devices). | |
| uint32_t STDCALL | i2c_get_rate (void) |
| Get the clock rate of the default I2C device. | |
| uint32_t STDCALL | i2c_set_rate (uint32_t rate) |
| Set the clock rate for the default I2C device. | |
| uint16_t STDCALL | i2c_get_address (void) |
| Get the slave address for the default I2C device. | |
| uint32_t STDCALL | i2c_set_address (uint16_t address) |
| Set the slave address for the default I2C device. | |
| uint32_t STDCALL | i2c_get_description (uint32_t id, char *description, uint32_t len) |
| Get the device description of an I2C device. | |
| uint32_t STDCALL | i2c_slave_get_description (uint32_t id, char *description, uint32_t len) |
| Get the device description of an I2C slave device. | |
| BOOL STDCALL | pwm_available (void) |
| Check if a PWM device is available. | |
| uint32_t STDCALL | pwm_start (void) |
| Start the default PWM device. | |
| uint32_t STDCALL | pwm_stop (void) |
| Stop the default PWM device. | |
| uint32_t STDCALL | pwm_write (uint32_t value) |
| Write a value to the default PWM device. | |
| uint32_t STDCALL | pwm_set_mode (uint32_t mode) |
| Set the mode for the default PWM device. | |
| uint32_t STDCALL | pwm_set_range (uint32_t range) |
| Set the range for the default PWM device. | |
| uint32_t STDCALL | pwm_set_frequency (uint32_t frequency) |
| Set the clock frequency for the default PWM device. | |
| uint32_t STDCALL | pwm_configure (uint32_t dutyns, uint32_t periodns) |
| Set the configuration of the default PWM device. | |
| uint32_t STDCALL | pwm_get_description (uint32_t id, uint32_t channel, char *description, uint32_t len) |
| Get the device description of an PWM device. | |
| BOOL STDCALL | rtc_available (void) |
| Check if a Real Time Clock (RTC) device is available. | |
| int64_t STDCALL | rtc_get_time (void) |
| Get the current time from a Real Time Clock device Returned time is 100 nanosecond ticks since 1 January 1601 The same format as the ClockGetTime function. | |
| int64_t STDCALL | rtc_set_time (int64_t time) |
| Set the current time for a Real Time Clock device. | |
| uint32_t STDCALL | uart_get_description (uint32_t id, char *description, uint32_t len) |
| Get the device description of a UART device. | |
| BOOL STDCALL | serial_available (void) |
| Check if a Serial device is available. | |
| uint32_t STDCALL | serial_open (uint32_t baudrate, uint32_t databits, uint32_t stopbits, uint32_t parity, uint32_t flowcontrol, uint32_t receivedepth, uint32_t transmitdepth) |
| Open the default Serial device ready for sending and receiving. | |
| uint32_t STDCALL | serial_close (void) |
| Close the default Serial device and terminate sending and receiving. | |
| uint32_t STDCALL | serial_read (void *buffer, uint32_t size, uint32_t *count) |
| Read data from the default Serial device. | |
| uint32_t STDCALL | serial_write (void *buffer, uint32_t size, uint32_t *count) |
| Write data to the default Serial device. | |
| int STDCALL | serial_printf (const char *format,...) _ATTRIBUTE((__format__(__printf__ |
| Print formatted text to the default Serial device. | |
| int STDCALL size_t STDCALL | peripheral_get_base (void) |
| Get the base address of the peripherals. | |
| uint32_t STDCALL | peripheral_get_size (void) |
| Get the total size of the peripherals. | |
| uint32_t STDCALL | peripheral_read (uint32_t base, uint32_t reg) |
| Read from a Peripheral register. | |
| void STDCALL | peripheral_write (uint32_t base, uint32_t reg, uint32_t value) |
| Write to a Peripheral register. | |
| size_t STDCALL | local_peripheral_get_base (void) |
| Get the base address of the local peripherals (Peripherals local to each CPU). | |
| uint32_t STDCALL | local_peripheral_get_size (void) |
| Get the total size of the local peripherals (Peripherals local to each CPU). | |
| size_t STDCALL | get_sp (void) |
| Get the current stack pointer (SP). | |
| size_t STDCALL | get_pc (void) |
| Get the current program counter (PC). | |
| BOOL STDCALL | get_irq (void) |
| Get Interrupts (IRQ) state. | |
| void STDCALL | enable_irq (void) |
| Enable Interrupts (IRQ) unconditionally. | |
| void STDCALL | disable_irq (void) |
| Disable Interrupts (IRQ) unconditionally. | |
| IRQ_MASK STDCALL | save_irq (void) |
| Disable Interrupts (IRQ) and return the previous state. | |
| IRQ_MASK STDCALL | restore_irq (IRQ_MASK irqmask) |
| Restore Interrupts (IRQ) to a previous state. | |
| BOOL STDCALL | get_fiq (void) |
| Get Fast Interrupts (FIQ) state. | |
| void STDCALL | enable_fiq (void) |
| Enable Fast Interrupts (FIQ) unconditionally. | |
| void STDCALL | disable_fiq (void) |
| Disable Fast Interrupts (FIQ) unconditionally. | |
| FIQ_MASK STDCALL | save_fiq (void) |
| Disable Fast Interrupts (FIQ) and return the previous state. | |
| FIQ_MASK STDCALL | restore_fiq (FIQ_MASK fiqmask) |
| Restore Fast Interrupts (FIQ) to a previous state. | |
| void STDCALL | enable_irq_fiq (void) |
| Enable Interrupts and Fast Interrupts (IRQ/FIQ) unconditionally. | |
| void STDCALL | disable_irq_fiq (void) |
| Disable Interrupts and Fast Interrupts (IRQ/FIQ) unconditionally. | |
| IRQ_FIQ_MASK STDCALL | save_irq_fiq (void) |
| Disable Interrupts and Fast Interrupts (IRQ/FIQ) and return the previous state. | |
| IRQ_FIQ_MASK STDCALL | restore_irq_fiq (IRQ_FIQ_MASK irqfiqmask) |
| Restore Interrupts and Fast Interrupts (IRQ/FIQ) to a previous state. | |
| BOOL STDCALL | get_abort (void) |
| Get Abort state. | |
| void STDCALL | enable_abort (void) |
| Enable Abort unconditionally. | |
| void STDCALL | disable_abort (void) |
| Disable Abort unconditionally. | |
| ABORT_MASK STDCALL | save_abort (void) |
| Disable Abort and return the previous state. | |
| ABORT_MASK STDCALL | restore_abort (ABORT_MASK abortmask) |
| Restore Abort to a previous state. | |
| void STDCALL | halt_cpu (void) |
| Halt the current processor. | |
| void STDCALL | pause_cpu (void) |
| Pause the current processor and wait for an Event or Interrupt (Where Applicable). | |
| uint32_t STDCALL | halt_thread (uint32_t exitcode) |
| Halt the current thread. | |
| void STDCALL | send_event (void) |
| Send a signal that an Event has occurred (Where Applicable). | |
| void STDCALL | wait_for_event (void) |
| Wait for an Event to occur (Where Applicable). | |
| void STDCALL | wait_for_interrupt (void) |
| Wait for an Interrupt to occur (Where Applicable). | |
| void STDCALL | read_memory_barrier (void) |
| Perform a Read Memory Barrier operation (Where Applicable). | |
| void STDCALL | write_memory_barrier (void) |
| Perform a Write Memory Barrier operation (Where Applicable). | |
| void STDCALL | data_memory_barrier (void) |
| Perform a Data Memory Barrier operation (Where Applicable). | |
| void STDCALL | data_synchronization_barrier (void) |
| Perform a Data Synchronization Barrier operation (Where Applicable). | |
| void STDCALL | instruction_memory_barrier (void) |
| Perform an Instruction Memory Barrier operation (Where Applicable). | |
| void STDCALL | invalidate_tlb (void) |
| Perform an Invalidate Entire TLB operation (Where Applicable). | |
| void STDCALL | invalidate_data_tlb (void) |
| Perform an Invalidate Data TLB operation (Where Applicable). | |
| void STDCALL | invalidate_instruction_tlb (void) |
| Perform an Invalidate Instruction TLB operation (Where Applicable). | |
| void STDCALL | invalidate_cache (void) |
| Perform an Invalidate Entire Cache operation (Where Applicable). | |
| void STDCALL | clean_data_cache (void) |
| Perform a Clean Data Cache operation (Where Applicable). | |
| void STDCALL | invalidate_data_cache (void) |
| Perform an Invalidate Data Cache operation (Where Applicable). | |
| void STDCALL | clean_and_invalidate_data_cache (void) |
| Perform a Clean and Invalidate Data Cache operation (Where Applicable). | |
| void STDCALL | invalidate_instruction_cache (void) |
| Perform an Invalidate Instruction Cache operation (Where Applicable). | |
| void STDCALL | clean_data_cache_range (size_t address, uint32_t size) |
| Perform a Clean Data Cache Range operation (Where Applicable). | |
| void STDCALL | invalidate_data_cache_range (size_t address, uint32_t size) |
| Perform an Invalidate Data Cache Range operation (Where Applicable). | |
| void STDCALL | clean_and_invalidate_data_cache_range (size_t address, uint32_t size) |
| Perform a Clean and Invalidate Data Cache Range operation (Where Applicable). | |
| void STDCALL | invalidate_instruction_cache_range (size_t address, uint32_t size) |
| Perform an Invalidate Instruction Cache Range operation (Where Applicable). | |
| void STDCALL | flush_prefetch_buffer (void) |
| Perform a Flush Prefetch Buffer operation (Where Applicable). | |
| void STDCALL | flush_branch_target_cache (void) |
| Perform a Flush Entire Branch Target Cache operation (Where Applicable). | |
| void STDCALL | context_switch (void *oldstack, void *newstack, THREAD_HANDLE newthread) |
| Perform a Context Switch from one thread to another. | |
| void STDCALL | context_switch_irq (void *oldstack, void *newstack, THREAD_HANDLE newthread) |
| Perform a Context Switch from one thread to another from an IRQ handler. | |
| void STDCALL | context_switch_fiq (void *oldstack, void *newstack, THREAD_HANDLE newthread) |
| Perform a Context Switch from one thread to another from an FIQ handler. | |
| void STDCALL | context_switch_swi (void *oldstack, void *newstack, THREAD_HANDLE newthread) |
| Perform a Context Switch from one thread to another from a software interrupt handler. | |
| int32_t STDCALL | interlocked_or (int32_t *target, int32_t value) |
| Perform an atomic OR operation. | |
| int32_t STDCALL | interlocked_xor (int32_t *target, int32_t value) |
| Perform an atomic XOR operation. | |
| int32_t STDCALL | interlocked_and (int32_t *target, int32_t value) |
| Perform an atomic AND operation. | |
| int32_t STDCALL | interlocked_decrement (int32_t *target) |
| Perform an atomic decrement operation. | |
| int32_t STDCALL | interlocked_increment (int32_t *target) |
| Perform an atomic increment operation. | |
| int32_t STDCALL | interlocked_exchange (int32_t *target, int32_t source) |
| Perform an atomic exchange operation. | |
| int32_t STDCALL | interlocked_add_exchange (int32_t *target, int32_t source) |
| Perform an atomic add and exchange operation. | |
| int32_t STDCALL | interlocked_compare_exchange (int32_t *target, int32_t source, int32_t compare) |
| Perform an atomic compare and exchange operation. | |
| uint32_t STDCALL | page_table_get_levels (void) |
| Get the number of page table levels for the current platform. | |
| size_t STDCALL | page_directory_get_base (void) |
| Get the base address of the first level page directory (Where applicable). | |
| uint32_t STDCALL | page_directory_get_size (void) |
| Get the size of the first level page directory (Where applicable). | |
| size_t STDCALL | page_table_get_base (void) |
| Get the base address of the first or second level page table. | |
| uint32_t STDCALL | page_table_get_size (void) |
| Get the size of the first or second level page table. | |
| void STDCALL | page_table_get_entry (size_t address, PAGE_TABLE_ENTRY *entry) |
| Get the Page Table entry that corresponds to the supplied virtual address. | |
| uint32_t STDCALL | page_table_set_entry (PAGE_TABLE_ENTRY *entry) |
| Set the Page Table entry that corresponds to the supplied virtual address. | |
| uint32_t STDCALL | page_table_get_page_size (size_t address) |
| Get the Size from the Page Table page that corresponds to the supplied virtual address. | |
| uint32_t STDCALL | page_table_get_page_flags (size_t address) |
| Get the Flags from the Page Table page that corresponds to the supplied virtual address. | |
| size_t STDCALL | page_table_get_page_physical (size_t address) |
| Get the Physical Address from the Page Table page that corresponds to the supplied virtual address. | |
| size_t STDCALL | page_tables_get_address (void) |
| Get the address of the second or third level page tables. | |
| uint32_t STDCALL | page_tables_get_length (void) |
| Get the size of the second or third level page tables. | |
| uint32_t STDCALL | page_tables_get_count (void) |
| Get the number of second or third level page tables. | |
| uint32_t STDCALL | page_tables_get_shift (void) |
| Get the multiplier to convert count to actual size of the second or third level page tables. | |
| size_t STDCALL | page_tables_get_next (void) |
| Get the address of the next available second or third level page table. | |
| uint32_t STDCALL | page_tables_get_used (void) |
| Get the number of used second or third level page tables. | |
| uint32_t STDCALL | page_tables_get_free (void) |
| Get the number of available second or third level page tables. | |
| size_t STDCALL | vector_table_get_base (void) |
| Get the base address of the interrupt vector table. | |
| uint32_t STDCALL | vector_table_get_size (void) |
| Get the size in bytes of the interrupt vector table. | |
| uint32_t STDCALL | vector_table_get_count (void) |
| Get the number of entries in the interrupt vector table. | |
| size_t STDCALL | vector_table_get_entry (uint32_t number) |
| Get the interrupt vector table entry that corresponds to the supplied number. | |
| uint32_t STDCALL | vector_table_set_entry (uint32_t number, size_t address) |
| Set the interrupt vector table entry that corresponds to the supplied number. | |
| BOOL STDCALL | console_get_key (char *ch, void *userdata) |
| BOOL STDCALL | console_peek_key (char *ch, void *userdata) |
| BOOL STDCALL | console_write_char (char ch, void *userdata) |
| BOOL STDCALL | console_read_char (char *ch, void *userdata) |
| BOOL STDCALL | console_read_wide_char (WCHAR *ch, void *userdata) |
| BOOL STDCALL | console_hide_mouse (void *userdata) |
| BOOL STDCALL | console_show_mouse (uint32_t x, uint32_t y, void *userdata) |
| BOOL STDCALL | console_read_mouse (uint32_t *x, uint32_t *y, uint32_t *buttons, void *userdata) |
| WCHAR STDCALL | code_page_to_wide_char (char ch) |
| char STDCALL | wide_char_to_code_page (WCHAR ch) |
| uint32_t STDCALL | host_get_name (char *name, uint32_t len) |
| BOOL STDCALL | host_set_name (const char *name) |
| uint32_t STDCALL | host_get_domain (char *domain, uint32_t len) |
| BOOL STDCALL | host_set_domain (const char *domain) |
| HANDLE STDCALL | module_load (const char *name) |
| HANDLE STDCALL | module_load_ex (const char *name, uint32_t flags) |
| BOOL STDCALL | module_unload (HANDLE handle) |
| uint32_t STDCALL | module_get_name (HANDLE handle, char *name, uint32_t len) |
| HANDLE STDCALL | module_get_handle (char *name) |
| BOOL STDCALL | symbol_add (HANDLE handle, const char *name, size_t address) |
| BOOL STDCALL | symbol_remove (HANDLE handle, const char *name) |
| size_t STDCALL | symbol_get_address (HANDLE handle, const char *name) |
| void STDCALL | logging_output (const char *text) |
| void STDCALL | logging_output_ex (uint32_t facility, uint32_t severity, const char *tag, const char *content) |
| int STDCALL | logging_outputf (const char *format,...) _ATTRIBUTE((__format__(__printf__ |
| Output formatted text to the default logging. | |
| int STDCALL uint32_t STDCALL | environment_get (const char *name, char *value, uint32_t len) |
| Locate an environment variable and return the current value. | |
| uint32_t STDCALL | environment_set (const char *name, const char *value) |
| Add an environment variable or update an existing variable. | |
| uint32_t STDCALL | environment_count (BOOL reset) |
| Get the current number of environment variables. | |
| uint32_t STDCALL | environment_index (const char *name) |
| Locate an environment variable and return the index. | |
| uint32_t STDCALL | environment_string (uint32_t index, char *string, uint32_t len) |
| Get an environment variable by index. | |
| int | setenv (const char *name, const char *value, int overwrite) |
| int | unsetenv (const char *name) |
| uint32_t STDCALL | first_bit_set (uint32_t value) |
| Find the first set bit in a nonzero 32 bit value. | |
| uint32_t STDCALL | last_bit_set (uint32_t value) |
| Find the last set bit in a nonzero 32 bit value. | |
| uint32_t STDCALL | count_leading_zeros (uint32_t value) |
| Count the number of leading 0 bits in a nonzero 32 bit value. | |
| uint32_t STDCALL | count_trailing_zeros (uint32_t value) |
| Count the number of trailing 0 bits in a nonzero 32 bit value. | |
| size_t STDCALL | physical_to_io_address (void *address) |
| Convert Physical address to an IO addresses (Where Applicable). | |
| size_t STDCALL | io_address_to_physical (void *address) |
| Convert an IO address to a Physical address (Where Applicable). | |
| size_t STDCALL | physical_to_bus_address (void *address) |
| Convert a Physical address to a Bus address (Where Applicable). | |
| size_t STDCALL | bus_address_to_physical (void *address) |
| Convert a Bus address to a Physical address (Where Applicable). | |
| void STDCALL | nanosecond_delay (uint32_t nanoseconds) |
| Non sleep wait for a number of nanoseconds. | |
| void STDCALL | microsecond_delay (uint32_t microseconds) |
| Non sleep wait for a number of microseconds. | |
| void STDCALL | millisecond_delay (uint32_t milliseconds) |
| Non sleep wait for a number of milliseconds. | |
| void STDCALL | nanosecond_delay_ex (uint32_t nanoseconds, BOOL wait) |
| Non sleep wait for a number of nanoseconds. | |
| void STDCALL | microsecond_delay_ex (uint32_t microseconds, BOOL wait) |
| Non sleep wait for a number of microseconds. | |
| void STDCALL | millisecond_delay_ex (uint32_t milliseconds, BOOL wait) |
| Non sleep wait for a number of milliseconds. | |
| uint32_t | get_tick_count (void) |
| uint64_t | get_tick_count64 (void) |
| int | posix_memalign (void **memptr, size_t alignment, size_t size) |
| char * | realpath (const char *__restrict path, char *__restrict resolved_path) |
| int | getpagesize (void) |
| int | dup3 (int oldfd, int newfd, int flags) |
| int | getentropy (void *buffer, size_t length) |
| int | usleep (useconds_t useconds) |
| int | symlink (const char *path1, const char *path2) |
| int | ftruncate (int fd, off_t length) |
| int | truncate (const char *path, off_t length) |
| int | fdatasync (int fd) |
| int | sethostname (const char *name, size_t size) |
| int | gethostname (char *name, size_t size) |
| void * | mmap (void *addr, size_t length, int prot, int flags, int fd, off_t offset) |
| int | munmap (void *addr, size_t length) |
| int | settimeofday (const struct timeval *tv, const struct timezone *tz) |
| int | sched_getcpu (void) |
| void | msleep (unsigned int msecs) |
| pid_t | gettid (void) |
| HANDLE | fd_handle (int fd) |
| #define HANDLE_FLAG_NONE 0x00000000 |
Platform specific constants Handle Flags
| #define HANDLE_FLAG_NAMED 0x00000001 |
Set if the handle has a name.
| #define HANDLE_FLAG_DUPLICATE 0x00000002 |
Set if the handle can be duplicated.
| #define HANDLE_FLAG_INTERNAL HANDLE_FLAG_NONE + 0x80000000 |
Note: Temporary value to avoid warning.
| #define HANDLE_SIGNATURE 0xCD15E20A |
Handle constants
| #define HANDLE_TABLE_MIN 0x100 |
Minimum handle number (Skip first 256).
| #define HANDLE_TABLE_MAX 0x7FFFFFFF |
Maximum handle number (Avoid MSB as THandle is a signed value).
| #define HANDLE_TABLE_MASK 0x7FF |
2048 buckets for handle lookups
| #define HANDLE_NAME_LENGTH 256 |
Maximum length of handle name.
| #define DMA_DATA_FLAG_NONE 0x00000000 |
DMA Data Flags
| #define DMA_DATA_FLAG_STRIDE 0x00000001 |
Transfer from the source to the destination using 2D stride (If supported).
| #define DMA_DATA_FLAG_SOURCE_NOINCREMENT 0x00000002 |
Don't increment the source address during the DMA request (If supported).
| #define DMA_DATA_FLAG_DEST_NOINCREMENT 0x00000004 |
Don't increment the dest address during the DMA request (If supported).
| #define DMA_DATA_FLAG_SOURCE_DREQ 0x00000008 |
Use DREQ gating on the source address during the DMA request (If supported).
| #define DMA_DATA_FLAG_DEST_DREQ 0x00000010 |
Use DREQ gating on the dest address during the DMA request (If supported).
| #define DMA_DATA_FLAG_SOURCE_WIDE 0x00000020 |
Use wide reads on the source address during the DMA request (If supported).
| #define DMA_DATA_FLAG_DEST_WIDE 0x00000040 |
Use wide writes on the dest address during the DMA request (If supported).
| #define DMA_DATA_FLAG_NOREAD 0x00000080 |
Ignore the source address and zero fill the destination (If supported).
| #define DMA_DATA_FLAG_NOWRITE 0x00000100 |
Ignore the dest address and cache fill from the source (If supported).
| #define DMA_DATA_FLAG_NOCLEAN 0x00000200 |
Do not perform cache clean on the source address (If applicable).
| #define DMA_DATA_FLAG_NOINVALIDATE 0x00000400 |
Do not perform cache invalidate on the dest address (If applicable).
| #define DMA_DATA_FLAG_BULK 0x00000800 |
Perform a bulk transfer (Higher transfer throughput)(If applicable).
| #define DMA_DATA_FLAG_LITE 0x00001000 |
Perform a "lite" transfer (Lower transfer throughput but less waiting for free channel) (If applicable).
| #define DMA_DATA_FLAG_40BIT 0x00002000 |
Perform a 40-bit address transfer (Address to memory above 1GB or 4GB depending on SoC) (If applicable).
| #define PAGE_TABLE_FLAG_NONE 0x00000000 |
Page Table Flags
| #define PAGE_TABLE_FLAG_NORMAL 0x00000002 |
Page Table Entry represents Normal memory.
Reserved 0x00000001 (Previously used incorrectly for PAGE_TABLE_FLAG_NONE)
| #define PAGE_TABLE_FLAG_DEVICE 0x00000004 |
Page Table Entry represents Device memory.
| #define PAGE_TABLE_FLAG_ORDERED 0x00000008 |
Page Table Entry represents Ordered memory.
| #define PAGE_TABLE_FLAG_SHARED 0x00000010 |
Page Table Entry represents Shared memory.
| #define PAGE_TABLE_FLAG_CACHEABLE 0x00000020 |
Page Table Entry represents Cacheable memory.
| #define PAGE_TABLE_FLAG_READONLY 0x00000040 |
Page Table Entry represents Read Only memory.
| #define PAGE_TABLE_FLAG_READWRITE 0x00000080 |
Page Table Entry represents Read Write memory.
| #define PAGE_TABLE_FLAG_EXECUTABLE 0x00000100 |
Page Table Entry represents Executable memory.
| #define PAGE_TABLE_FLAG_WRITEBACK 0x00000200 |
Page Table Entry is Writeback Cacheable memory.
| #define PAGE_TABLE_FLAG_WRITETHROUGH 0x00000400 |
Page Table Entry is Writethrough Cacheable memory.
| #define PAGE_TABLE_FLAG_WRITEALLOCATE 0x00000800 |
Page Table Entry is Writeallocate Cacheable memory.
| #define INTERRUPT_FLAG_NONE 0x00000000 |
Interrupt Entry Flags
| #define INTERRUPT_FLAG_SHARED 0x00000001 |
A shared interrupt, multiple devices can register for the same interrupt and each will be called until one returns INTERRUPT_RETURN_HANDLED.
| #define INTERRUPT_FLAG_LOCAL 0x00000002 |
A local interrupt, generated only on the CPU it is associated with.
| #define INTERRUPT_FLAG_IPI 0x00000004 |
A software interrupt or inter processor interrupt, generated by a software request instead of hardware.
| #define INTERRUPT_FLAG_FIQ 0x00000008 |
A fast interrupt, takes precedence over all other interrupts (where applicable).
| #define INTERRUPT_FLAG_CHAINED 0x00000010 |
A chained interrupt, multiple devices can register for the same interrupt and all will be called when it occurs.
| #define INTERRUPT_PRIORITY_MAXIMUM 0x00 |
Interrupt Priority Values
| #define INTERRUPT_PRIORITY_FIQ 0x40 |
| #define INTERRUPT_PRIORITY_DEFAULT 0xA0 |
| #define INTERRUPT_PRIORITY_MINIMUM 0xF0 |
| #define INTERRUPT_RETURN_NONE 0 |
Shared interrupt not handled or not for this device.
Interrupt Return Values
| #define INTERRUPT_RETURN_HANDLED 1 |
Shared interrupt handled, no further processing.
| #define VECTOR_TABLE_ENTRY_ARM_RESET 0 |
ARM Reset Vector.
Vector Table Entries ARM
| #define VECTOR_TABLE_ENTRY_ARM_UNDEFINED 1 |
ARM Undefined Vector.
| #define VECTOR_TABLE_ENTRY_ARM_SWI 2 |
ARM Software Interrupt (SWI) Vector.
| #define VECTOR_TABLE_ENTRY_ARM_PREFETCH 3 |
ARM Prefetch Abort Vector.
| #define VECTOR_TABLE_ENTRY_ARM_ABORT 4 |
ARM Data Abort Vector.
| #define VECTOR_TABLE_ENTRY_ARM_RESERVED 5 |
ARM Reserved Vector.
| #define VECTOR_TABLE_ENTRY_ARM_IRQ 6 |
ARM IRQ Vector.
| #define VECTOR_TABLE_ENTRY_ARM_FIQ 7 |
ARM FIQ Vector.
| #define SHUTDOWN_FLAG_NONE 0x00000000 |
AARCH64 Shutdown Flags
| #define SHUTDOWN_FLAG_RESTART 0x00000001 |
The system is shutting down and restarting.
| #define SHUTDOWN_FLAG_FORCE 0x00000002 |
Forced shutdown or restart requested, registered callbacks will be bypassed.
| #define SHUTDOWN_SIGNATURE 0xA73D8B0C |
Shutdown constants
| #define SHUTDOWN_DEFAULT_DELAY 1000 |
Default delay before starting a shutdown or restart (Milliseconds).
| #define SHUTDOWN_MINIMUM_DELAY 10 |
Minimum delay before starting a shutdown or restart (Milliseconds).
| #define SHUTDOWN_DEFAULT_TIMEOUT 5000 |
Default time to wait for a shutdown callback to complete before continuing (Milliseconds).
| #define EXCEPTION_TYPE_DATA_ABORT 1 |
Exception Types
| #define EXCEPTION_TYPE_PREFETCH_ABORT 2 |
| #define EXCEPTION_TYPE_UNDEFINED_INSTRUCTION 3 |
| #define FIRMWARE_THROTTLE_NONE (0 << 0) |
Firmware Throttling Flags
| #define FIRMWARE_THROTTLE_UNDER_VOLTAGE (1 << 0) |
Under voltage is occurring.
| #define FIRMWARE_THROTTLE_FREQUENCY_LIMIT (1 << 1) |
Frequency limiting is occurring.
| #define FIRMWARE_THROTTLE_THROTTLED (1 << 2) |
Throttling is occurring.
| #define FIRMWARE_THROTTLE_SOFT_TEMP_LIMIT (1 << 3) |
Soft temperature limit is active.
| #define FIRMWARE_THROTTLE_WAS_UNDER_VOLTAGE (1 << 16) |
Under voltage has occurred.
| #define FIRMWARE_THROTTLE_WAS_FREQUENCY_LIMIT (1 << 17) |
Frequency limiting has occurred.
| #define FIRMWARE_THROTTLE_WAS_THROTTLED (1 << 18) |
Throttling has occurred.
| #define FIRMWARE_THROTTLE_WAS_SOFT_TEMP_LIMIT (1 << 19) |
Soft temperature limit has occurred.
| typedef uint32_t IRQ_MASK |
Platform specific types IRQ/FIQ Masks
| typedef uint32_t FIQ_MASK |
| typedef uint32_t IRQ_FIQ_MASK |
| typedef uint32_t ABORT_MASK |
Abort Masks
| typedef struct _SYSTEM_CALL_REQUEST SYSTEM_CALL_REQUEST |
System Call Request (SWI)
| typedef struct _HANDLE_ENTRY HANDLE_ENTRY |
Handle Entry
| typedef uint32_t STDCALL(* handle_enumerate_cb) (HANDLE_ENTRY *handle, void *data) |
Handle Enumeration Callback
| typedef uint32_t STDCALL(* shutdown_cb) (uint32_t flags, void *parameter) |
Prototype for Shutdown Callback
| typedef void STDCALL(* interrupt_handler) (void *parameter) |
Prototypes for Interrupt (IRQ/FIQ) Handlers
| typedef THREAD_HANDLE STDCALL(* interrupt_ex_handler) (uint32_t cpuid, THREAD_HANDLE thread, void *parameter) |
| typedef uint32_t STDCALL(* shared_interrupt_handler) (uint32_t number, uint32_t cpuid, uint32_t flags, void *parameter) |
| typedef struct _INTERRUPT_ENTRY INTERRUPT_ENTRY |
Interrupt Entry (IRQ/FIQ
| typedef struct _SYSTEM_CALL_ENTRY SYSTEM_CALL_ENTRY |
System Call Entry (SWI)
| typedef struct _PAGE_TABLE_ENTRY PAGE_TABLE_ENTRY |
Page Table Entry
| typedef shared_interrupt_handler ipi_handler |
Prototype for Inter Processor Interrupt (IPI) Handlers Note: When used for IPI the CPUID parameter will be the sending CPU
| typedef void STDCALL(* system_call_handler) (SYSTEM_CALL_REQUEST *request) |
Prototype for System Call (SWI) Handlers
| typedef THREAD_HANDLE STDCALL(* system_call_ex_handler) (uint32_t cpuid, THREAD_HANDLE thread, SYSTEM_CALL_REQUEST *request) |
| typedef uint32_t STDCALL(* thread_yield_proc) (void) |
Prototypes for Thread Yield/Wait/Release/Abandon Handlers
| typedef uint32_t STDCALL(* thread_wait_proc) (LIST_HANDLE list, SPIN_HANDLE lock, uint32_t flags) |
| typedef uint32_t STDCALL(* thread_wait_ex_proc) (LIST_HANDLE list, SPIN_HANDLE lock, uint32_t flags, uint32_t timeout) |
| typedef uint32_t STDCALL(* thread_release_proc) (LIST_HANDLE list) |
| typedef uint32_t STDCALL(* thread_abandon_proc) (LIST_HANDLE list) |
| typedef void STDCALL(* timer_event_proc) (void *data) |
Prototype for Timer Event Handler
| typedef void STDCALL(* worker_task_proc) (void *data) |
Prototype for Worker Task/Callback Handlers
| typedef void STDCALL(* worker_cb) (void *data) |
| typedef void STDCALL(* counter_event_cb) (void *data) |
Prototype for Counter Callback Handlers
| typedef void STDCALL(* gpio_event_cb) (void *data, uint32_t pin, uint32_t trigger) |
Prototype for GPIO Callback Handlers
Check if valid Device Tree information was provided by the firmware/bootloader.
Device Tree Functions
| size_t STDCALL device_tree_get_base | ( | void | ) |
Get the base address of the Device Tree Blob (Where Applicable).
| uint32_t STDCALL device_tree_get_size | ( | void | ) |
Get the total size of the Device Tree Blob (Where Applicable).
| uint32_t STDCALL device_tree_read | ( | const char * | path, |
| const char * | name, | ||
| void * | buffer, | ||
| uint32_t * | size ) |
Read the raw value of a Device Tree property (Where Applicable).
| Path | The path of the requested property |
| Name | The name of the requested property |
| Buffer | A pointer to a buffer to receive the raw value |
| Size | The size in byte of the buffer, updated on return with the actual size of the value |
| uint32_t STDCALL device_tree_read32 | ( | const char * | path, |
| const char * | name, | ||
| uint32_t * | value ) |
Read a 32-bit value from a Device Tree property (Where Applicable).
| Path | The path of the requested property |
| Name | The name of the requested property |
| Value | The returned value of the property |
| uint32_t STDCALL device_tree_read64 | ( | const char * | path, |
| const char * | name, | ||
| uint64_t * | value ) |
Read a 64-bit value from a Device Tree property (Where Applicable).
| Path | The path of the requested property |
| Name | The name of the requested property |
| Value | The returned value of the property |
| uint32_t STDCALL device_tree_read_string | ( | const char * | path, |
| const char * | name, | ||
| char * | value, | ||
| uint32_t | len ) |
Read a string value from a Device Tree property (Where Applicable).
| Path | The path of the requested property |
| Name | The name of the requested property |
| Value | The returned value of the property |
| void STDCALL boot_blink | ( | void | ) |
Blink the Activity LED (Where Applicable).
Boot Functions
| void STDCALL boot_output | ( | uint32_t | value | ) |
Output boot time information (Where Applicable).
| void STDCALL boot_console_start | ( | void | ) |
Start the boot time console display (Where Applicable).
| void STDCALL boot_console_write | ( | const char * | value | ) |
Output text to the boot time console display (Where Applicable).
| void STDCALL boot_console_write_ex | ( | const char * | value, |
| uint32_t | x, | ||
| uint32_t | y ) |
Output text to the boot time console display at the specified X and Y position (Where Applicable).
| uint32_t STDCALL boot_console_get_x | ( | void | ) |
Get the current X position of the boot time console display (Where Applicable).
| uint32_t STDCALL boot_console_get_y | ( | void | ) |
Get the current Y position of the boot time console display (Where Applicable).
| void STDCALL power_led_enable | ( | void | ) |
Enable the Power LED (Where Applicable).
LED Functions
| void STDCALL power_led_on | ( | void | ) |
Turn On the Power LED (Where Applicable).
| void STDCALL power_led_off | ( | void | ) |
Turn Off the Power LED (Where Applicable).
| void STDCALL activity_led_enable | ( | void | ) |
Enable the Activity LED (Where Applicable).
| void STDCALL activity_led_on | ( | void | ) |
Turn On the Activity LED (Where Applicable).
| void STDCALL activity_led_off | ( | void | ) |
Turn Off the Activity LED (Where Applicable).
Check if a counter is currently available.
Counter Functions (Timer device)
| uint32_t STDCALL counter_read | ( | void | ) |
Read the current value of the default counter.
| int64_t STDCALL counter_read64 | ( | void | ) |
Read the current value of the default counter.
| uint32_t STDCALL counter_wait | ( | void | ) |
Wait for the current interval to expire on the default counter.
| uint32_t STDCALL counter_event | ( | counter_event_cb | callback, |
| void * | data ) |
Schedule a function to be called when the current interval expires on the default counter.
| Callback | The function to be called when the interval expires |
| Data | A pointer to be pass to the function when the interval expires (Optional) |
| uint32_t STDCALL counter_cancel | ( | void | ) |
Cancel a previously scheduled event callback function on the default counter.
| uint32_t STDCALL counter_get_rate | ( | void | ) |
Get the current clock rate in Hz of the default counter.
| uint32_t STDCALL counter_set_rate | ( | uint32_t | rate | ) |
Set the current clock rate in Hz of the default counter.
| Rate | The clock rate in Hz to set |
| uint32_t STDCALL counter_get_interval | ( | void | ) |
Get the current interval in ticks of the default counter.
| uint32_t STDCALL counter_set_interval | ( | uint32_t | interval | ) |
Set the current interval in ticks of the default counter.
| Interval | The interval in ticks to set |
| uint32_t STDCALL mailbox_receive | ( | uint32_t | mailbox, |
| uint32_t | channel ) |
Receive from specified mailbox on specified channel.
Mailbox Functions
| void STDCALL mailbox_send | ( | uint32_t | mailbox, |
| uint32_t | channel, | ||
| uint32_t | data ) |
Send to specified mailbox on specified channel.
| uint32_t STDCALL mailbox_call | ( | uint32_t | mailbox, |
| uint32_t | channel, | ||
| uint32_t | data, | ||
| uint32_t * | response ) |
Perform a transaction (Send/Receive) to specified mailbox on specified channel.
| uint32_t STDCALL mailbox_call_ex | ( | uint32_t | mailbox, |
| uint32_t | channel, | ||
| uint32_t | data, | ||
| uint32_t * | response, | ||
| uint32_t | timeout ) |
Perform a transaction (Send/Receive) to specified mailbox on specified channel.
| uint32_t STDCALL mailbox_property_call | ( | uint32_t | mailbox, |
| uint32_t | channel, | ||
| void * | data, | ||
| uint32_t * | response ) |
Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel.
| uint32_t STDCALL mailbox_property_call_ex | ( | uint32_t | mailbox, |
| uint32_t | channel, | ||
| void * | data, | ||
| uint32_t * | response, | ||
| uint32_t | timeout ) |
Perform a property tag transaction (Send/Receive) to specified mailbox on specified channel.
| uint32_t STDCALL mailbox_property_tag | ( | uint32_t | tag, |
| void * | data, | ||
| uint32_t | size ) |
Request a property tag (Get/Set) from the mailbox property channel.
Check if a hardware random number generator is currently available The software random number generator from the RTL is always available.
Random Number Functions
| void STDCALL random_seed | ( | uint32_t | seed | ) |
| int32_t STDCALL random_read_longint | ( | int32_t | limit | ) |
| int64_t STDCALL random_read_int64 | ( | int64_t | limit | ) |
| double_t STDCALL random_read_double | ( | void | ) |
| double_t STDCALL random_read_extended | ( | void | ) |
Check if a watchdog timer is currently available.
Watchdog Functions
| uint32_t STDCALL watchdog_start | ( | uint32_t | milliseconds | ) |
| uint32_t STDCALL watchdog_stop | ( | void | ) |
| uint32_t STDCALL watchdog_refresh | ( | uint32_t | milliseconds | ) |
| uint32_t STDCALL request_irq | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| interrupt_handler | handler, | ||
| void * | parameter ) |
Request registration of the supplied handler to the specified IRQ number.
Interrupt Request (IRQ) Functions
| CPUID | CPU to route IRQ to |
| Number | IRQ number to register |
| Handler | Interrupt handler function to register |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL release_irq | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| interrupt_handler | handler, | ||
| void * | parameter ) |
Request deregistration of the supplied handler from the specified IRQ number.
| CPUID | CPU to unroute IRQ from |
| Number | IRQ number to deregister |
| Handler | Interrupt handler function to deregister |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL request_ex_irq | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| interrupt_handler | handler, | ||
| interrupt_ex_handler | handlerex, | ||
| void * | parameter ) |
Request registration of the supplied extended handler to the specified IRQ number.
| CPUID | CPU to route IRQ to |
| Number | IRQ number to register |
| Handler | Interrupt handler function to register |
| HandlerEx | Extended Interrupt handler function to register |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL release_ex_irq | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| interrupt_handler | handler, | ||
| interrupt_ex_handler | handlerex, | ||
| void * | parameter ) |
Request deregistration of the supplied extended handler from the specified IRQ number.
| CPUID | CPU to unroute IRQ from |
| Number | IRQ number to deregister |
| Handler | Interrupt handler function to deregister |
| HandlerEx | Extended Interrupt handler function to deregister |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL request_fiq | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| interrupt_handler | handler, | ||
| void * | parameter ) |
Request registration of the supplied handler to the specified FIQ number (Where Applicable).
Fast Interrupt Request (FIQ) Functions
| CPUID | CPU to route FIQ to |
| Number | FIQ number to register |
| Handler | Interrupt handler function to register |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL release_fiq | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| interrupt_handler | handler, | ||
| void * | parameter ) |
Request deregistration of the supplied handler from the specified FIQ number (Where Applicable).
| CPUID | CPU to unroute FIQ from |
| Number | FIQ number to deregister |
| Handler | Interrupt handler function to deregister |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL request_ex_fiq | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| interrupt_handler | handler, | ||
| interrupt_ex_handler | handlerex, | ||
| void * | parameter ) |
Request registration of the supplied extended handler to the specified FIQ number (Where Applicable).
| CPUID | CPU to route FIQ to |
| Number | FIQ number to register |
| Handler | Interrupt handler function to register |
| HandlerEx | Extended Interrupt handler function to register |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL release_ex_fiq | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| interrupt_handler | handler, | ||
| interrupt_ex_handler | handlerex, | ||
| void * | parameter ) |
Request deregistration of the supplied extended handler from the specified FIQ number (Where Applicable).
| CPUID | CPU to unroute FIQ from |
| Number | FIQ number to deregister |
| Handler | Interrupt handler function to deregister |
| HandlerEx | Extended Interrupt handler function to deregister |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL request_ipi | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| ipi_handler | handler, | ||
| void * | parameter ) |
Request registration of the supplied handler to the specified IPI (Inter-processor interrupt) number (Where Applicable).
Inter Processor Interrupt (IPI) Functions
| CPUID | CPU to route IPI to |
| Number | IPI number to register |
| Handler | Interrupt handler function to register |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL release_ipi | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| ipi_handler | handler, | ||
| void * | parameter ) |
Request deregistration of the supplied handler from the specified IPI (Inter-processor interrupt) number (Where Applicable).
| CPUID | CPU to unroute IPI from |
| Number | IPI number to deregister |
| Handler | Interrupt handler function to deregister |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL register_interrupt | ( | uint32_t | number, |
| uint32_t | mask, | ||
| uint32_t | priority, | ||
| uint32_t | flags, | ||
| shared_interrupt_handler | handler, | ||
| void * | parameter ) |
Request registration of the supplied handler to the specified interrupt number (Where Applicable).
Interrupt Register/Deregister Functions
| Number | The interrupt number to register the handler for |
| Mask | The mask of CPUs to register the handler for (eg CPU_MASK_0, CPU_MASK_1) (Where Applicable) |
| Priority | The priority level of the interrupt to be registered (eg INTERRUPT_PRIORITY_MAXIMUM) (Where Applicable) |
| Flags | The flags to control the registration of the interrupt (eg INTERRUPT_FLAG_SHARED) (Where Applicable) |
| Handler | The shared interrupt handler to be called when the interrupt occurs |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| uint32_t STDCALL deregister_interrupt | ( | uint32_t | number, |
| uint32_t | mask, | ||
| uint32_t | priority, | ||
| uint32_t | flags, | ||
| shared_interrupt_handler | handler, | ||
| void * | parameter ) |
Request deregistration of the supplied handler from the specified interrupt number (Where Applicable).
| Number | The interrupt number to deregister the hanlder for |
| Mask | The mask of CPUs to deregister the handler for (eg CPU_MASK_0, CPU_MASK_1) (Where Applicable) |
| Priority | The priority level of the interrupt to be deregistered (eg INTERRUPT_PRIORITY_MAXIMUM) (Where Applicable) |
| Flags | The flags to control the deregistration of the interrupt (eg INTERRUPT_FLAG_SHARED, INTERRUPT_FLAG_LOCAL, INTERRUPT_FLAG_FIQ) (Where Applicable) |
| Handler | The shared interrupt handler to be called when the interrupt occurs |
| Parameter | A pointer to be passed to the handler when the interrupt occurs (Optional) |
| void STDCALL system_call | ( | uint32_t | number, |
| size_t | param1, | ||
| size_t | param2, | ||
| size_t | param3 ) |
Perform a System Call function with the supplied parameters (Where Applicable).
System Call (SWI) Functions
| Number | The System Call number to be called |
| Param1 | The first parameter to pass to the function (Optional / Function defined) |
| Param2 | The second parameter to pass to the function (Optional / Function defined) |
| Param3 | The third parameter to pass to the function (Optional / Function defined) |
| uint32_t STDCALL register_system_call | ( | uint32_t | number, |
| system_call_handler | handler ) |
Request registration of the supplied handler to the specified System Call number (Where Applicable).
| Number | The System Call number to be registered |
| Handler | The handler function to be registered |
| uint32_t STDCALL deregister_system_call | ( | uint32_t | number, |
| system_call_handler | handler ) |
Request deregistration of the supplied handler from the specified System Call number (Where Applicable).
| Number | The System Call number to be deregistered |
| Handler | The handler function to be deregistered |
| uint32_t STDCALL register_system_call_ex | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| system_call_handler | handler, | ||
| system_call_ex_handler | handlerex ) |
Request registration of the supplied extended handler to the specified System Call number (Where Applicable).
| CPUID | The CPU ID to register the System Call against (or CPU_ID_ALL) |
| Number | The System Call number to be registered |
| Handler | The handler function to be registered (Optional) (Handler or HandlerEx must be specified, not both) |
| HandlerEx | The extended handler function to be registered (Optional) (Handler or HandlerEx must be specified, not both) |
| uint32_t STDCALL deregister_system_call_ex | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| system_call_handler | handler, | ||
| system_call_ex_handler | handlerex ) |
Request deregistration of the supplied extended handler from the specified System Call number (Where Applicable).
| CPUID | The CPU ID to deregister the System Call from (or CPU_ID_ALL) |
| Number | The System Call number to be deregistered |
| Handler | The handler function to be deregistered (Optional) (Handler or HandlerEx must be specified, not both) |
| HandlerEx | The extended handler function to be deregistered (Optional) (Handler or HandlerEx must be specified, not both) |
| uint32_t STDCALL get_interrupt_count | ( | void | ) |
Get the number of interrupt entries for the current platform.
Interrupt Entry Functions
| uint32_t STDCALL get_interrupt_start | ( | void | ) |
Get the starting number of interrupt entries for the current platform.
| uint32_t STDCALL get_interrupt_entry | ( | uint32_t | number, |
| uint32_t | instance, | ||
| INTERRUPT_ENTRY * | interrupt ) |
Get the interrupt entry for the specified interrupt number and instance.
| uint32_t STDCALL get_local_interrupt_count | ( | void | ) |
Get the number of local interrupt entries for the current platform (Where Applicable).
Local Interrupt Entry Functions
| uint32_t STDCALL get_local_interrupt_start | ( | void | ) |
Get the starting number of local interrupt entries for the current platform (Where Applicable).
| uint32_t STDCALL get_local_interrupt_entry | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| uint32_t | instance, | ||
| INTERRUPT_ENTRY * | interrupt ) |
Get the local interrupt entry for the specified interrupt number (Where Applicable).
| uint32_t STDCALL get_software_interrupt_count | ( | void | ) |
Get the number of software interrupt entries for the current platform (Where Applicable).
Software Interrupt Entry (IPI) Functions
| uint32_t STDCALL get_software_interrupt_start | ( | void | ) |
Get the starting number of software interrupt entries for the current platform (Where Applicable).
| uint32_t STDCALL get_software_interrupt_entry | ( | uint32_t | cpuid, |
| uint32_t | number, | ||
| uint32_t | instance, | ||
| INTERRUPT_ENTRY * | interrupt ) |
Get the software interrupt entry for the specified interrupt number and instance (Where Applicable).
| uint32_t STDCALL get_system_call_count | ( | void | ) |
Get the number of system call entries for the current platform (Where Applicable).
System Call Entry Functions
| SYSTEM_CALL_ENTRY STDCALL get_system_call_entry | ( | uint32_t | number | ) |
Get the system call entry for the specified system call number (Where Applicable).
| uint32_t STDCALL system_restart | ( | uint32_t | delay | ) |
Restart the system.
System Functions
| Delay | How long to delay before commencing the restart (Milliseconds) |
| uint32_t STDCALL system_shutdown | ( | uint32_t | delay | ) |
Shutdown the system.
| Delay | How long to delay before commencing the shutdown (Milliseconds) |
| uint32_t STDCALL system_register_shutdown | ( | shutdown_cb | callback, |
| void * | parameter, | ||
| uint32_t | timeout ) |
Register a procedure to be called during system shutdown or restart.
| Callback | The procedure to be called on shutdown or restart |
| Parameter | A pointer to be passed to the callback procedure |
| Timeout | Time the shutdown process should wait for this callback to complete (0 for the default timeout) (Milliseconds) |
| uint32_t STDCALL system_deregister_shutdown | ( | shutdown_cb | callback, |
| void * | parameter ) |
Deregister a procedure from being called during system shutdown or restart.
| Callback | The procedure previously registered for shutdown or restart |
| Parameter | The pointer previously registered for the callback procedure |
| int64_t STDCALL system_get_uptime | ( | void | ) |
Get the current system up time in 100 nanosecond ticks since 1 January 1601.
| uint32_t STDCALL system_get_command_line | ( | char * | commandline, |
| uint32_t | len ) |
Get the current command line.
| void *STDCALL system_get_environment | ( | void | ) |
Get the current environment.
| uint32_t STDCALL system_date_to_string | ( | double_t | date, |
| char * | value, | ||
| uint32_t | len ) |
Return the supplied date value as a string in the system defined format.
| Date | The date in Pascal TDateTime format |
| uint32_t STDCALL system_time_to_string | ( | double_t | time, |
| char * | value, | ||
| uint32_t | len ) |
Return the supplied time value as a string in the system defined format.
| Time | The time in Pascal TDateTime format |
| uint32_t STDCALL system_date_time_to_string | ( | double_t | datetime, |
| char * | value, | ||
| uint32_t | len ) |
Return the supplied date and time value as a string in the system defined format.
| DateTime | The date and time in Pascal TDateTime format |
| uint32_t STDCALL system_interval_to_string | ( | double_t | interval, |
| char * | value, | ||
| uint32_t | len ) |
Return the supplied time interval as a string in the system defined format.
| Interval | The time interval in Pascal TDateTime format |
| uint32_t STDCALL cpu_get_arch | ( | void | ) |
Get the CPU architecture for this board.
CPU Functions
| uint32_t STDCALL cpu_get_type | ( | void | ) |
Get the CPU type for this board.
| uint32_t STDCALL cpu_get_boot | ( | void | ) |
Get the boot CPU for this board.
| uint32_t STDCALL cpu_get_mask | ( | void | ) |
Get the CPU mask for this board.
| uint32_t STDCALL cpu_get_count | ( | void | ) |
Get the CPU count for this board.
| uint32_t STDCALL cpu_get_mode | ( | void | ) |
Get the current CPU mode.
| uint32_t STDCALL cpu_get_state | ( | void | ) |
Get the current CPU state.
| uint32_t STDCALL cpu_get_group | ( | void | ) |
Get the current CPU group.
| uint32_t STDCALL cpu_get_current | ( | void | ) |
Get the current CPU ID.
| uint32_t STDCALL cpu_get_memory | ( | size_t * | address, |
| uint64_t * | length ) |
Get the memory start and size available to the CPU.
| double_t STDCALL cpu_get_percentage | ( | uint32_t | cpuid | ) |
Get the last second utilization of the specified CPU in percentage.
| CPUID | The CPU to get utilization from or CPU_ID_ALL for average of all CPUs |
| uint32_t STDCALL cpu_get_utilization | ( | uint32_t | cpuid | ) |
Get the last second utilization of the specified CPU.
| CPUID | The CPU to get utilization from or CPU_ID_ALL for average of all CPUs |
| uint32_t STDCALL cpu_get_model | ( | void | ) |
Get the CPU model of the current CPU.
| uint32_t STDCALL cpu_get_revision | ( | void | ) |
Get the CPU revision of the current CPU.
| uint32_t STDCALL cpu_get_description | ( | char * | description, |
| uint32_t | len ) |
Get the CPU description of the current CPU.
| uint32_t STDCALL fpu_get_type | ( | void | ) |
Get the FPU type for this board.
FPU Functions
| uint32_t STDCALL fpu_get_state | ( | void | ) |
Get the current FPU state.
| uint32_t STDCALL gpu_get_type | ( | void | ) |
Get the GPU type for this board.
GPU Functions
| uint32_t STDCALL gpu_get_state | ( | void | ) |
Get the current GPU state.
| uint32_t STDCALL gpu_get_memory | ( | size_t * | address, |
| uint64_t * | length ) |
Get the memory start and size available to the GPU.
| uint32_t STDCALL l1_cache_get_type | ( | void | ) |
Get the L1 cache type for this board.
Cache Functions
| uint32_t STDCALL l1_data_cache_get_size | ( | void | ) |
Get the L1 data cache size for this board.
| uint32_t STDCALL l1_data_cache_get_line_size | ( | void | ) |
Get the L1 data cache line size for this board.
| uint32_t STDCALL l1_instruction_cache_get_size | ( | void | ) |
Get the L1 instruction cache size for this board.
| uint32_t STDCALL l1_instruction_cache_get_line_size | ( | void | ) |
Get the L1 instruction cache line size for this board.
| uint32_t STDCALL l2_cache_get_type | ( | void | ) |
Get the L2 cache type for this board.
| uint32_t STDCALL l2_cache_get_size | ( | void | ) |
Get the L2 cache size for this board.
| uint32_t STDCALL l2_cache_get_line_size | ( | void | ) |
Get the L2 cache line size for this board.
| void STDCALL version_get_info | ( | uint32_t * | major, |
| uint32_t * | minor, | ||
| uint32_t * | revision ) |
Get the version information of the currently running system.
Version Functions
| uint32_t STDCALL version_get_date | ( | char * | date, |
| uint32_t | len ) |
Get the version release date of the currently running system.
| uint32_t STDCALL version_get_name | ( | char * | name, |
| uint32_t | len ) |
Get the version release name of the currently running system.
| uint32_t STDCALL version_get_version | ( | char * | version, |
| uint32_t | len ) |
Get the version string of the currently running system.
| uint32_t STDCALL board_get_type | ( | void | ) |
Get the current Board type.
Board Functions
| uint32_t STDCALL board_get_model | ( | void | ) |
Get the current Board model.
| int64_t STDCALL board_get_serial | ( | void | ) |
Get the current Board serial number.
| uint32_t STDCALL board_get_revision | ( | void | ) |
Get the current Board revision number.
| uint32_t STDCALL board_get_mac_address | ( | char * | address, |
| uint32_t | len ) |
Get the current Board MAC address (Where Applicable).
| uint32_t STDCALL chip_get_revision | ( | void | ) |
Get the current Chip revision number.
Chip Functions
| uint32_t STDCALL firmware_get_revision | ( | void | ) |
Get the current board Firmware Revision.
Firmware Functions
| uint32_t STDCALL firmware_get_throttled | ( | void | ) |
Get the current throttling state from the firmware.
| uint32_t STDCALL machine_get_type | ( | void | ) |
Get the current Machine type.
Machine Functions
| size_t STDCALL memory_get_base | ( | void | ) |
Get the base address of system memory.
Memory Functions
| uint64_t STDCALL memory_get_size | ( | void | ) |
Get the total size of system memory.
| uint32_t STDCALL memory_get_page_size | ( | void | ) |
Get the page size of system memory.
| uint32_t STDCALL memory_get_large_page_size | ( | void | ) |
Get the large page size of system memory (Where Applicable).
| uint32_t STDCALL memory_get_section_size | ( | void | ) |
Get the section size of system memory (Where Applicable).
| uint32_t STDCALL memory_get_large_section_size | ( | void | ) |
Get the large section size of system memory (Where Applicable).
| uint32_t STDCALL power_on | ( | uint32_t | powerid | ) |
Power On the specified device.
Power Functions
| uint32_t STDCALL power_off | ( | uint32_t | powerid | ) |
Power Off the specified device.
| uint32_t STDCALL power_get_wait | ( | uint32_t | powerid | ) |
Get the enable wait time in Microseconds of the specified device.
| uint32_t STDCALL power_get_state | ( | uint32_t | powerid | ) |
Get the power state of the specified device.
Set the power state of the specified device (Optionally waiting for ready).
| uint32_t STDCALL clock_ticks | ( | void | ) |
Get the current number of clock ticks (When this reaches CLOCK_TICKS_PER_SECOND then ClockSeconds is incremented and this is reset to zero).
Clock Functions
| uint32_t STDCALL clock_seconds | ( | void | ) |
Get the number of clock seconds since the system was started (This forms the system clock).
| int64_t STDCALL clock_milliseconds | ( | void | ) |
Get the number of clock milliseconds since the system was started.
| int64_t STDCALL clock_microseconds | ( | void | ) |
Get the number of clock microseconds since the system was started.
| int64_t STDCALL clock_nanoseconds | ( | void | ) |
Get the number of clock nanoseconds since the system was started.
| int64_t STDCALL clock_get_base | ( | void | ) |
Get the current clock base in 100 nanosecond ticks since 1 January 1601.
| int64_t STDCALL clock_get_time | ( | void | ) |
Get the current system time in 100 nanosecond ticks since 1 January 1601.
Set the current system time in 100 nanosecond ticks since 1 January 1601.
| Time | The time to be set |
| RTC | Set the default RTC (real time clock) if available |
| uint32_t STDCALL clock_get_count | ( | void | ) |
Gets the current system clock count (32 least significant bits of total).
| int64_t STDCALL clock_get_total | ( | void | ) |
Gets the total system clock count.
| uint32_t STDCALL clock_update_offset | ( | void | ) |
Update the system time offset between UTC and Local.
Calculate the system time offset between UTC and Local at the given date and time.
| DateTime | The date and time to calculate the offset for (Assumed to be Local) |
| Offset | The returned Offset in minutes |
| Daylight | True on return if daylight savings is in effect at the specified date and time |
| uint32_t STDCALL clock_get_rate | ( | uint32_t | clockid | ) |
Get the clock rate in Hz of the specified Clock.
Set the clock rate in Hz of the specified Clock.
| uint32_t STDCALL clock_get_state | ( | uint32_t | clockid | ) |
Get the state of the specified Clock.
| uint32_t STDCALL clock_set_state | ( | uint32_t | clockid, |
| uint32_t | state ) |
Set the state of the specified Clock.
| uint32_t STDCALL clock_get_min_rate | ( | uint32_t | clockid | ) |
Get the minimum clock rate in Hz of the specified Clock.
| uint32_t STDCALL clock_get_max_rate | ( | uint32_t | clockid | ) |
Get the maximum clock rate in Hz of the specified Clock.
| uint32_t STDCALL clock_get_measured_rate | ( | uint32_t | clockid | ) |
Get the measured or actual clock rate in Hz of the specified Clock.
| uint32_t STDCALL turbo_get_state | ( | uint32_t | turboid | ) |
Get the Turbo state (0 equals Off / 1 equals On) of the specified device.
Turbo Functions
| uint32_t STDCALL turbo_set_state | ( | uint32_t | turboid, |
| uint32_t | state ) |
Set the Turbo state (0 equals Off / 1 equals On) of the specified device.
| uint32_t STDCALL voltage_get_value | ( | uint32_t | voltageid | ) |
Get the current voltage level of the specified device.
Voltage Functions
| uint32_t STDCALL voltage_set_value | ( | uint32_t | voltageid, |
| uint32_t | value ) |
Set the current voltage level of the specified device.
| uint32_t STDCALL voltage_get_min_value | ( | uint32_t | voltageid | ) |
Get the minimum voltage level of the specified device.
| uint32_t STDCALL voltage_get_max_value | ( | uint32_t | voltageid | ) |
Get the maximum voltage level of the specified device.
| uint32_t STDCALL temperature_get_current | ( | uint32_t | temperatureid | ) |
Get the current temperature in thousandths of a degree C of the specified device.
Temperature Functions
| uint32_t STDCALL temperature_get_maximum | ( | uint32_t | temperatureid | ) |
Get the maximum temperature in thousandths of a degree C of the specified device.
Allocate memory from the GPU.
GPU Memory Functions
Lock memory allocated from the GPU and return an address.
| uint32_t STDCALL gpu_execute_code | ( | void * | address, |
| uint32_t | r0, | ||
| uint32_t | r1, | ||
| uint32_t | r2, | ||
| uint32_t | r3, | ||
| uint32_t | r4, | ||
| uint32_t | r5 ) |
Execute a block of code on the GPU.
GPU Misc Functions
Convert a Dispmanx Resource handle to a Memory handle (Which can be passed to Lock/Unlock above).
| uint32_t STDCALL edid_block_get | ( | uint32_t | block, |
| void * | buffer, | ||
| uint32_t | length ) |
Get an EDID block from HDMI.
Check if a framebuffer device is currently available.
Framebuffer Functions
| uint32_t STDCALL framebuffer_allocate | ( | uint32_t | alignment, |
| uint32_t * | address, | ||
| uint32_t * | length ) |
Allocate a new Framebuffer.
| uint32_t STDCALL framebuffer_release | ( | void | ) |
Release the current Framebuffer.
| uint32_t STDCALL framebuffer_set_state | ( | uint32_t | state | ) |
Set the current Framebuffer (Display) state (0 for Off / 1 for On).
| uint32_t STDCALL framebuffer_get_dimensions | ( | uint32_t * | width, |
| uint32_t * | height, | ||
| uint32_t * | top, | ||
| uint32_t * | bottom, | ||
| uint32_t * | left, | ||
| uint32_t * | right ) |
Get the default Dimensions of the Framebuffer (Physical Width, Height and Overscan Top, Bottom, Left, Right in Pixels).
| uint32_t STDCALL framebuffer_get_physical | ( | uint32_t * | width, |
| uint32_t * | height ) |
Get the Physical Framebuffer Width and Height in Pixels.
| uint32_t STDCALL framebuffer_set_physical | ( | uint32_t * | width, |
| uint32_t * | height ) |
Set the Physical Framebuffer Width and Height in Pixels.
| uint32_t STDCALL framebuffer_test_physical | ( | uint32_t * | width, |
| uint32_t * | height ) |
Test the Physical Framebuffer Width and Height in Pixels.
| uint32_t STDCALL framebuffer_get_virtual | ( | uint32_t * | width, |
| uint32_t * | height ) |
Get the Virtual Framebuffer Width and Height in Pixels.
| uint32_t STDCALL framebuffer_set_virtual | ( | uint32_t * | width, |
| uint32_t * | height ) |
Set the Virtual Framebuffer Width and Height in Pixels.
| uint32_t STDCALL framebuffer_test_virtual | ( | uint32_t * | width, |
| uint32_t * | height ) |
Test the Virtual Framebuffer Width and Height in Pixels.
| uint32_t STDCALL framebuffer_get_depth | ( | uint32_t * | depth | ) |
Get the Framebuffer Depth in Bits per Pixel.
| uint32_t STDCALL framebuffer_set_depth | ( | uint32_t * | depth | ) |
Set the Framebuffer Depth in Bits per Pixel.
| uint32_t STDCALL framebuffer_test_depth | ( | uint32_t * | depth | ) |
Test the Framebuffer Depth in Bits per Pixel.
| uint32_t STDCALL framebuffer_get_pixel_order | ( | uint32_t * | order | ) |
Get the Framebuffer Pixel Order (0 = BGR / 1 = RGB).
| uint32_t STDCALL framebuffer_set_pixel_order | ( | uint32_t * | order | ) |
Set the Framebuffer Pixel Order (0 = BGR / 1 = RGB).
| uint32_t STDCALL framebuffer_test_pixel_order | ( | uint32_t * | order | ) |
Test the Framebuffer Pixel Order (0 = BGR / 1 = RGB).
| uint32_t STDCALL framebuffer_get_alpha_mode | ( | uint32_t * | mode | ) |
Get the Framebuffer Alpha Mode.
| uint32_t STDCALL framebuffer_set_alpha_mode | ( | uint32_t * | mode | ) |
Set the Framebuffer Alpha Mode.
| uint32_t STDCALL framebuffer_test_alpha_mode | ( | uint32_t * | mode | ) |
Test the Framebuffer Alpha Mode.
| uint32_t STDCALL framebuffer_get_pitch | ( | void | ) |
Get the Framebuffer Pitch in Bytes per Line.
| uint32_t STDCALL framebuffer_get_offset | ( | uint32_t * | x, |
| uint32_t * | y ) |
Get the Framebuffer Virtual Offset in Pixels.
| uint32_t STDCALL framebuffer_set_offset | ( | uint32_t * | x, |
| uint32_t * | y ) |
Set the Framebuffer Virtual Offset in Pixels.
| uint32_t STDCALL framebuffer_test_offset | ( | uint32_t * | x, |
| uint32_t * | y ) |
Test the Framebuffer Virtual Offset in Pixels.
| uint32_t STDCALL framebuffer_get_overscan | ( | uint32_t * | top, |
| uint32_t * | bottom, | ||
| uint32_t * | left, | ||
| uint32_t * | right ) |
Get the Framebuffer Top, Bottom, Left and Right Overscan in Pixels.
| uint32_t STDCALL framebuffer_set_overscan | ( | uint32_t * | top, |
| uint32_t * | bottom, | ||
| uint32_t * | left, | ||
| uint32_t * | right ) |
Set the Framebuffer Top, Bottom, Left and Right Overscan in Pixels.
| uint32_t STDCALL framebuffer_test_overscan | ( | uint32_t * | top, |
| uint32_t * | bottom, | ||
| uint32_t * | left, | ||
| uint32_t * | right ) |
Test the Framebuffer Top, Bottom, Left and Right Overscan in Pixels.
| uint32_t STDCALL framebuffer_get_palette | ( | void * | buffer, |
| uint32_t | length ) |
Get the Framebuffer Palette in RGBA values.
| uint32_t STDCALL framebuffer_set_palette | ( | uint32_t | start, |
| uint32_t | count, | ||
| void * | buffer, | ||
| uint32_t | length ) |
Set the Framebuffer Palette in RGBA values.
| uint32_t STDCALL framebuffer_test_palette | ( | uint32_t | start, |
| uint32_t | count, | ||
| void * | buffer, | ||
| uint32_t | length ) |
Test the Framebuffer Palette in RGBA values.
| uint32_t STDCALL framebuffer_get_layer | ( | int32_t * | layer | ) |
Get the Framebuffer Layer.
| uint32_t STDCALL framebuffer_set_layer | ( | int32_t * | layer | ) |
Set the Framebuffer Layer.
| uint32_t STDCALL framebuffer_test_layer | ( | int32_t * | layer | ) |
Test the Framebuffer Layer.
| uint32_t STDCALL framebuffer_test_vsync | ( | void | ) |
Test the Framebuffer Vertical Sync (Where Applicable).
| uint32_t STDCALL framebuffer_set_vsync | ( | void | ) |
Set (Wait For) the Framebuffer Vertical Sync (Where Applicable).
| uint32_t STDCALL framebuffer_set_backlight | ( | uint32_t | brightness | ) |
Set the Framebuffer Backlight brightness (Where Applicable).
| uint32_t STDCALL framebuffer_get_num_displays | ( | uint32_t * | numdisplays | ) |
Get the number of framebuffer displays (Where Applicable).
| uint32_t STDCALL framebuffer_get_display_id | ( | uint32_t | displaynum | ) |
Get the display id for the specified display number (Where Applicable).
| uint32_t STDCALL framebuffer_set_display_num | ( | uint32_t | displaynum | ) |
Set the current framebuffer display number (Where Applicable).
| uint32_t STDCALL framebuffer_get_display_settings | ( | uint32_t | displaynum, |
| DISPLAY_SETTINGS * | displaysettings ) |
Get the display settings for the specified display number (Where Applicable).
| uint32_t STDCALL framebuffer_display_id_to_name | ( | uint32_t | displayid, |
| char * | name, | ||
| uint32_t | len ) |
Get the name for the specified display id (Where Applicable).
| uint32_t STDCALL touch_get_buffer | ( | size_t * | address | ) |
Get the Touchscreen memory buffer (Where Applicable).
Touch Functions
| uint32_t STDCALL touch_set_buffer | ( | size_t | address | ) |
Set the Touchscreen memory buffer (Where Applicable).
| uint32_t STDCALL cursor_set_default | ( | void | ) |
Set the default Cursor Info (Where Applicable).
Cursor Functions
| uint32_t STDCALL cursor_set_info | ( | uint32_t | width, |
| uint32_t | height, | ||
| uint32_t | hotspotx, | ||
| uint32_t | hotspoty, | ||
| void * | pixels, | ||
| uint32_t | length ) |
Set the Cursor Info (Width and Height, Hotspot and Pixel image).
Set the Cursor State (Enabled, X and Y).
| Relative | X, Y is relative to Display (Virtual) not Framebuffer (Physical) |
Perform a DMA transfer using the list of DMA data blocks provided.
| Data | A linked list of DMA data blocks for the transfer |
| Direction | The direction of the DMA request (eg DMA_DIR_MEM_TO_MEM) |
| Peripheral | The peripheral ID for data request gating (eg DMA_DREQ_ID_NONE) |
| uint32_t STDCALL dma_fill_memory | ( | void * | dest, |
| uint32_t | size, | ||
| uint8_t | value ) |
Fill memory at the destination address using DMA.
| Dest | The address to start the memory fill |
| Size | The size of memory to fill in bytes |
| Value | The value to fill the memory with |
| uint32_t STDCALL dma_copy_memory | ( | void * | source, |
| void * | dest, | ||
| uint32_t | size ) |
Copy memory from the source to the destination address using DMA.
| Source | The source address to start the memory copy |
| Dest | The destination address to start the memory copy |
| Size | The size of memory to copy in bytes |
| uint32_t STDCALL dma_read_peripheral | ( | void * | address, |
| void * | dest, | ||
| uint32_t | size, | ||
| uint32_t | peripheral ) |
Read from a peripheral address to the destination address using DMA.
| Address | The address of the peripheral register to read from |
| Dest | The destination address to start writing to |
| Size | The size of the read in bytes |
| Peripheral | The peripheral ID for data request gating (eg DMA_DREQ_ID_UART_RX) |
| uint32_t STDCALL dma_write_peripheral | ( | void * | source, |
| void * | address, | ||
| uint32_t | size, | ||
| uint32_t | peripheral ) |
Write to a peripheral address from the source address using DMA.
| Source | The source address to start reading from |
| Address | The address of the peripheral register to write to |
| Size | The size of the write in bytes |
| Peripheral | The peripheral ID for data request gating (eg DMA_DREQ_ID_UART_TX) |
| void *STDCALL dma_allocate_buffer | ( | uint32_t | size | ) |
Allocate a buffer compatible with DMA memory reads or writes.
| Size | The size of the buffer to allocate |
| void *STDCALL dma_allocate_buffer_ex | ( | uint32_t * | size | ) |
Allocate a buffer compatible with DMA memory reads or writes.
| Size | The size of the buffer to allocate (Updated on return to actual size) |
| uint32_t STDCALL dma_release_buffer | ( | void * | buffer | ) |
Release a buffer allocated with DMAAllocateBuffer.
| Buffer | The buffer to be released |
| uint32_t STDCALL dma_get_channels | ( | void | ) |
Get the currently enabled DMA channel bitmap (If supported).
Create and Open a new unnamed handle of the supplied type.
Handle Functions
| Data | Purpose specific data to be referenced by the new handle (Optional) |
| AType | The type of the new handle (eg HANDLE_TYPE_FILE) |
| HANDLE_ENTRY *STDCALL handle_create_ex | ( | const char * | name, |
| uint32_t | flags, | ||
| HANDLE | data, | ||
| uint32_t | _type ) |
Create and Open a new named or unnamed handle of the supplied type.
| Name | The name of the new handle (Optional) |
| Flags | The flags for the new handle (eg HANDLE_FLAG_DUPLICATE) |
| Data | Purpose specific data to be referenced by the new handle (Optional) |
| AType | The type of the new handle (eg HANDLE_TYPE_FILE) |
Close and Destroy a named or unnamed handle.
| Handle | The handle to be closed and destroyed |
| HANDLE_ENTRY *STDCALL handle_get | ( | HANDLE | handle | ) |
Get the handle entry for the supplied handle.
| Handle | The handle to get the entry for |
| HANDLE_ENTRY *STDCALL handle_find | ( | const char * | name | ) |
Find an existing named handle of the supplied type.
| Name | The name of the handle to find |
| uint32_t STDCALL handle_enumerate | ( | handle_enumerate_cb | callback, |
| void * | data ) |
Enumerate all handles in the handle table.
| Callback | The callback function to call for each handle in the table |
| Data | A private data pointer to pass to callback for each device in the table |
Open an existing named handle.
| Name | The name of the handle to open |
Close a named or unnamed handle.
| Handle | The handle to be closed |
Duplicate an existing named or unnamed handle.
| Handle | The handle to be duplicated |
| uint32_t STDCALL gpio_read | ( | uint32_t | reg | ) |
Perform a direct read from a GPIO register.
| Reg | The memory register to read from |
| void STDCALL gpio_write | ( | uint32_t | reg, |
| uint32_t | value ) |
Perform a direct write to a GPIO register.
| Reg | The memory register to write to |
| Value | The value to write to the register |
| uint32_t STDCALL gpio_input_get | ( | uint32_t | pin | ) |
Get the current state of a GPIO input pin.
| Pin | The pin to get the state for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_input_wait | ( | uint32_t | pin, |
| uint32_t | trigger, | ||
| uint32_t | timeout ) |
Wait for the state of a GPIO input pin to change.
| Pin | The pin to wait for the state to change (eg GPIO_PIN_1) |
| Trigger | The trigger event to wait for (eg GPIO_TRIGGER_HIGH) |
| Timeout | Number of milliseconds to wait for the change (INFINITE to wait forever) |
| uint32_t STDCALL gpio_input_event | ( | uint32_t | pin, |
| uint32_t | trigger, | ||
| uint32_t | timeout, | ||
| gpio_event_cb | callback, | ||
| void * | data ) |
Schedule a function to be called when the state of a GPIO input pin changes.
| Pin | The pin to schedule the state change for (eg GPIO_PIN_1) |
| Trigger | The trigger event which will cause the function to be called (eg GPIO_TRIGGER_HIGH) |
| Timeout | The number of milliseconds before the scheduled trigger expires (INFINITE to never expire) |
| Callback | The function to be called when the trigger occurs |
| Data | A pointer to be pass to the function when the trigger occurs (Optional) |
| uint32_t STDCALL gpio_output_set | ( | uint32_t | pin, |
| uint32_t | level ) |
Set the state of a GPIO output pin.
| Pin | The pin to set the state for (eg GPIO_PIN_1) |
| Level | The state to set the pin to (eg GPIO_LEVEL_HIGH) |
| uint32_t STDCALL gpio_level_get | ( | uint32_t | pin | ) |
Get the current level (state) of a GPIO pin.
| Pin | The pin to get the level for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_level_set | ( | uint32_t | pin, |
| uint32_t | level ) |
Set the level (state) of a GPIO pin.
| Pin | The pin to set the level for (eg GPIO_PIN_1) |
| Level | The level to set the pin to (eg GPIO_LEVEL_HIGH) |
| uint32_t STDCALL gpio_pull_get | ( | uint32_t | pin | ) |
Get the current pull state of a GPIO pin.
| Pin | The pin to get the pull state for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_pull_select | ( | uint32_t | pin, |
| uint32_t | mode ) |
Change the pull state of a GPIO pin.
| Pin | The pin to change the pull state for (eg GPIO_PIN_1) |
| Mode | The pull state to set for the pin (eg GPIO_PULL_UP) |
| uint32_t STDCALL gpio_function_get | ( | uint32_t | pin | ) |
Get the current function of a GPIO pin.
| Pin | The pin to get the function for (eg GPIO_PIN_1) |
| uint32_t STDCALL gpio_function_select | ( | uint32_t | pin, |
| uint32_t | mode ) |
Change the function of a GPIO pin.
| Pin | The pin to change the function for (eg GPIO_PIN_1) |
| Mode | The function to set for the pin (eg GPIO_FUNCTION_OUT) |
| uint32_t STDCALL virtual_gpio_input_get | ( | uint32_t | pin | ) |
Get the current state of a virtual GPIO input pin.
Virtual GPIO Functions
| Pin | The pin to get the state for (eg VIRTUAL_GPIO_PIN_1) |
| uint32_t STDCALL virtual_gpio_output_set | ( | uint32_t | pin, |
| uint32_t | level ) |
Set the state of a virtual GPIO output pin.
| Pin | The pin to set the state for (eg GPIO_PIN_1) |
| Level | The state to set the pin to (eg GPIO_LEVEL_HIGH) |
| uint32_t STDCALL virtual_gpio_level_get | ( | uint32_t | pin | ) |
Get the current level (state) of a virtual GPIO pin.
| Pin | The pin to get the level for (eg GPIO_PIN_1) |
| uint32_t STDCALL virtual_gpio_level_set | ( | uint32_t | pin, |
| uint32_t | level ) |
Set the level (state) of a virtual GPIO pin.
| Pin | The pin to set the level for (eg GPIO_PIN_1) |
| Level | The level to set the pin to (eg GPIO_LEVEL_HIGH) |
| uint32_t STDCALL virtual_gpio_function_get | ( | uint32_t | pin | ) |
Get the current function of a virtual GPIO pin.
| Pin | The pin to get the function for (eg GPIO_PIN_1) |
| uint32_t STDCALL virtual_gpio_function_select | ( | uint32_t | pin, |
| uint32_t | mode ) |
Change the function of a virtual GPIO pin.
| Pin | The pin to change the function for (eg GPIO_PIN_1) |
| Mode | The function to set for the pin (eg GPIO_FUNCTION_OUT) |
| uint32_t STDCALL spi_start | ( | uint32_t | mode, |
| uint32_t | clockrate, | ||
| uint32_t | clockphase, | ||
| uint32_t | clockpolarity ) |
Start the default SPI device ready for writing and reading.
| Mode | The device mode to set (eg SPI_MODE_4WIRE) |
| ClockRate | The clock rate to set for the device |
| ClockPhase | The clock phase to set (eg SPI_CLOCK_PHASE_LOW) |
| ClockPolarity | The clock polarity to set (eg SPI_CLOCK_POLARITY_LOW) |
| uint32_t STDCALL spi_stop | ( | void | ) |
Stop the default SPI device and terminate writing and reading.
| uint32_t STDCALL spi_read | ( | uint16_t | chipselect, |
| void * | dest, | ||
| uint32_t | size, | ||
| uint32_t * | count ) |
Read data from the default SPI device Because SPI writes and then reads for each byte, dummy data will be written for each byte to be read.
| ChipSelect | The chip select for the slave to read from (eg SPI_CS_0) |
| Dest | Pointer to a buffer to receive the data |
| Size | The size of the buffer |
| Count | The number of bytes read on return |
| uint32_t STDCALL spi_write | ( | uint16_t | chipselect, |
| void * | source, | ||
| uint32_t | size, | ||
| uint32_t * | count ) |
Write data to the default SPI device Because SPI writes and then reads for each byte, received data will be discarded for each byte written.
| ChipSelect | The chip select for the slave to write to (eg SPI_CS_0) |
| Source | Pointer to a buffer of data to transmit |
| Size | The size of the buffer |
| Count | The number of bytes written on return |
| uint32_t STDCALL spi_write_read | ( | uint16_t | chipselect, |
| void * | source, | ||
| void * | dest, | ||
| uint32_t | size, | ||
| uint32_t * | count ) |
Write data to and Read data from the default SPI device in one operation Because SPI writes and then reads for each byte, both the source and dest buffers must be the same size.
| ChipSelect | The chip select for the slave to write to and read from (eg SPI_CS_0) |
| Source | Pointer to a buffer of data to transmit |
| Dest | Pointer to a buffer to receive the data |
| Size | The size of the buffer |
| Count | The number of bytes written and read on return |
| uint32_t STDCALL spi_get_mode | ( | void | ) |
Get the device mode of the default SPI device.
| uint32_t STDCALL spi_set_mode | ( | uint32_t | mode | ) |
Set the device mode for the default SPI device.
| Mode | The device mode to set (eg SPI_MODE_4WIRE) |
| uint32_t STDCALL spi_get_clock_rate | ( | uint16_t | chipselect | ) |
Get the clock rate of the default SPI device.
| ChipSelect | The chip select number to get clock rate from (SPI_CS_NONE for default) |
| uint32_t STDCALL spi_set_clock_rate | ( | uint16_t | chipselect, |
| uint32_t | clockrate ) |
Set the clock rate for the default SPI device.
| ClockRate | The clock rate to set in Hz |
| ChipSelect | The chip select number to set clock rate for (SPI_CS_NONE for default) |
| uint32_t STDCALL spi_get_clock_phase | ( | void | ) |
Get the clock phase of the default SPI device.
| uint32_t STDCALL spi_set_clock_phase | ( | uint32_t | clockphase | ) |
Set the clock phase for the default SPI device.
| ClockPhase | The clock phase to set (eg SPI_CLOCK_PHASE_LOW) |
| uint32_t STDCALL spi_get_clock_polarity | ( | void | ) |
Get the clock polarity of the default SPI device.
| uint32_t STDCALL spi_set_clock_polarity | ( | uint32_t | clockpolarity | ) |
Set the clock polarity for the default SPI device.
| ClockPolarity | The clock polarity to set (eg SPI_CLOCK_POLARITY_LOW) |
| uint32_t STDCALL spi_get_select_polarity | ( | uint16_t | chipselect | ) |
Get the chip select polarity of the default SPI device.
| ChipSelect | The chip select number to get polarity from (SPI_CS_NONE for default) |
| uint32_t STDCALL spi_set_select_polarity | ( | uint16_t | chipselect, |
| uint32_t | selectpolarity ) |
Set the chip select polarity for the default SPI device.
| ChipSelect | The chip select number to set polarity for (SPI_CS_NONE for default) |
| SelectPolarity | The chip select polarity to set (eg SPI_CS_POLARITY_LOW) |
| uint32_t STDCALL spi_get_description | ( | uint32_t | id, |
| char * | description, | ||
| uint32_t | len ) |
Return the device description of an SPI device.
| Id | The Id number of the SPI device as shown in the official documentation |
| uint32_t STDCALL i2c_start | ( | uint32_t | rate | ) |
Start the default I2C device ready for reading and writing.
| Rate | The clock rate to set for the device (0 to use the default rate) |
| uint32_t STDCALL i2c_stop | ( | void | ) |
Stop the default I2C device and terminate reading and writing.
| uint32_t STDCALL i2c_read | ( | uint16_t | address, |
| void * | buffer, | ||
| uint32_t | size, | ||
| uint32_t * | count ) |
Read data from the default I2C device.
| Address | The slave address to read from (I2C_ADDRESS_INVALID to use the current address) |
| Buffer | Pointer to a buffer to receive the data |
| Size | The size of the buffer |
| Count | The number of bytes read on return |
| uint32_t STDCALL i2c_write | ( | uint16_t | address, |
| void * | buffer, | ||
| uint32_t | size, | ||
| uint32_t * | count ) |
Write data to the default I2C device.
| Address | The slave address to write to (I2C_ADDRESS_INVALID to use the current address) |
| Buffer | Pointer to a buffer of data to transmit |
| Size | The size of the buffer |
| Count | The number of bytes written on return |
| uint32_t STDCALL i2c_write_read | ( | uint16_t | address, |
| void * | initial, | ||
| uint32_t | len, | ||
| void * | data, | ||
| uint32_t | size, | ||
| uint32_t * | count ) |
Write data to and Read data from the default I2C device in one operation Useful for devices that require a register address specified before a read (eg EEPROM devices).
| Address | The slave address to write to (I2C_ADDRESS_INVALID to use the current address) |
| Initial | Pointer to the initial buffer to transmit |
| Len | The size of the initial buffer |
| Data | Pointer to a buffer to receive the data |
| Size | The size of the data buffer |
| Count | The number of bytes read on return |
| uint32_t STDCALL i2c_write_write | ( | uint16_t | address, |
| void * | initial, | ||
| uint32_t | len, | ||
| void * | data, | ||
| uint32_t | size, | ||
| uint32_t * | count ) |
Write 2 data blocks to the default I2C device in one operation Useful for devices that require a register address specified before a write (eg EEPROM devices).
| Address | The slave address to write to (I2C_ADDRESS_INVALID to use the current address) |
| Initial | Pointer to the initial buffer to transmit |
| Len | The size of the initial buffer |
| Data | Pointer to a buffer of data to transmit |
| Size | The size of the data buffer |
| Count | The number of bytes of data written on return |
| uint32_t STDCALL i2c_get_rate | ( | void | ) |
Get the clock rate of the default I2C device.
| uint32_t STDCALL i2c_set_rate | ( | uint32_t | rate | ) |
Set the clock rate for the default I2C device.
| Rate | The clock rate to set in Hz |
| uint16_t STDCALL i2c_get_address | ( | void | ) |
Get the slave address for the default I2C device.
| uint32_t STDCALL i2c_set_address | ( | uint16_t | address | ) |
Set the slave address for the default I2C device.
| Address | The slave address to set |
| uint32_t STDCALL i2c_get_description | ( | uint32_t | id, |
| char * | description, | ||
| uint32_t | len ) |
Get the device description of an I2C device.
| Id | The Id number of the I2C device as shown in the official documentation |
| uint32_t STDCALL i2c_slave_get_description | ( | uint32_t | id, |
| char * | description, | ||
| uint32_t | len ) |
Get the device description of an I2C slave device.
| Id | The Id number of the I2C slave device as shown in the official documentation |
| uint32_t STDCALL pwm_start | ( | void | ) |
Start the default PWM device.
| uint32_t STDCALL pwm_stop | ( | void | ) |
Stop the default PWM device.
| uint32_t STDCALL pwm_write | ( | uint32_t | value | ) |
Write a value to the default PWM device.
| Value | The value to write |
| uint32_t STDCALL pwm_set_mode | ( | uint32_t | mode | ) |
Set the mode for the default PWM device.
| Mode | The mode value to set (eg PWM_MODE_MARKSPACE) |
| uint32_t STDCALL pwm_set_range | ( | uint32_t | range | ) |
Set the range for the default PWM device.
| Range | The range value to set |
| uint32_t STDCALL pwm_set_frequency | ( | uint32_t | frequency | ) |
Set the clock frequency for the default PWM device.
| Frequency | The frequency to set in Hz |
| uint32_t STDCALL pwm_configure | ( | uint32_t | dutyns, |
| uint32_t | periodns ) |
Set the configuration of the default PWM device.
| DutyNS | The "on" time part of the cycle (Nanoseconds) |
| PeriodNS | The duration of one full cycle (Nanoseconds) |
| uint32_t STDCALL pwm_get_description | ( | uint32_t | id, |
| uint32_t | channel, | ||
| char * | description, | ||
| uint32_t | len ) |
Get the device description of an PWM device.
| Id | The Id number of the PWM device as shown in the official documentation |
| Channel | The channel number of the PWM device as shown in the official documentation |
Check if a Real Time Clock (RTC) device is available.
RTC Functions
| int64_t STDCALL rtc_get_time | ( | void | ) |
Get the current time from a Real Time Clock device Returned time is 100 nanosecond ticks since 1 January 1601 The same format as the ClockGetTime function.
| int64_t STDCALL rtc_set_time | ( | int64_t | time | ) |
Set the current time for a Real Time Clock device.
| Time | The time to be set |
| uint32_t STDCALL uart_get_description | ( | uint32_t | id, |
| char * | description, | ||
| uint32_t | len ) |
Get the device description of a UART device.
UART Functions
| Id | The Id number of the UART device as shown in the official documentation |
| uint32_t STDCALL serial_open | ( | uint32_t | baudrate, |
| uint32_t | databits, | ||
| uint32_t | stopbits, | ||
| uint32_t | parity, | ||
| uint32_t | flowcontrol, | ||
| uint32_t | receivedepth, | ||
| uint32_t | transmitdepth ) |
Open the default Serial device ready for sending and receiving.
| BaudRate | Baud rate for the connection (eg 9600, 57600, 115200 etc |
| DataBits | Size of the data (eg SERIAL_DATA_8BIT) |
| StopBits | Number of stop bits (eg SERIAL_STOP_1BIT) |
| Parity | Parity type for the data (eg SERIAL_PARITY_NONE) |
| FlowControl | Flow control for the connection (eg SERIAL_FLOW_NONE) |
| ReceiveDepth | Size of the receive buffer (0 = Default size) |
| TransmitDepth | Size of the transmit buffer (0 = Default size) |
| uint32_t STDCALL serial_close | ( | void | ) |
Close the default Serial device and terminate sending and receiving.
| uint32_t STDCALL serial_read | ( | void * | buffer, |
| uint32_t | size, | ||
| uint32_t * | count ) |
Read data from the default Serial device.
| Buffer | Pointer to a buffer to receive the data |
| Size | The size of the buffer |
| Count | The number of bytes read on return |
| uint32_t STDCALL serial_write | ( | void * | buffer, |
| uint32_t | size, | ||
| uint32_t * | count ) |
Write data to the default Serial device.
| Buffer | Pointer to a buffer of data to transmit |
| Size | The size of the buffer |
| Count | The number of bytes written on return |
| int STDCALL serial_printf | ( | const char * | format, |
| ... ) |
Print formatted text to the default Serial device.
| Format | The formatted text to print (As per printf in standard C library) |
Get the base address of the peripherals.
Peripheral Functions
| uint32_t STDCALL peripheral_get_size | ( | void | ) |
Get the total size of the peripherals.
| uint32_t STDCALL peripheral_read | ( | uint32_t | base, |
| uint32_t | reg ) |
Read from a Peripheral register.
| void STDCALL peripheral_write | ( | uint32_t | base, |
| uint32_t | reg, | ||
| uint32_t | value ) |
Write to a Peripheral register.
| size_t STDCALL local_peripheral_get_base | ( | void | ) |
Get the base address of the local peripherals (Peripherals local to each CPU).
| uint32_t STDCALL local_peripheral_get_size | ( | void | ) |
Get the total size of the local peripherals (Peripherals local to each CPU).
| size_t STDCALL get_sp | ( | void | ) |
Get the current stack pointer (SP).
System Functions
| size_t STDCALL get_pc | ( | void | ) |
Get the current program counter (PC).
| void STDCALL enable_irq | ( | void | ) |
Enable Interrupts (IRQ) unconditionally.
| void STDCALL disable_irq | ( | void | ) |
Disable Interrupts (IRQ) unconditionally.
Disable Interrupts (IRQ) and return the previous state.
Restore Interrupts (IRQ) to a previous state.
| IRQMask | IRQ state to restore |
Get Fast Interrupts (FIQ) state.
| void STDCALL enable_fiq | ( | void | ) |
Enable Fast Interrupts (FIQ) unconditionally.
| void STDCALL disable_fiq | ( | void | ) |
Disable Fast Interrupts (FIQ) unconditionally.
Disable Fast Interrupts (FIQ) and return the previous state.
Restore Fast Interrupts (FIQ) to a previous state.
| FIQMask | FIQ state to restore |
| void STDCALL enable_irq_fiq | ( | void | ) |
Enable Interrupts and Fast Interrupts (IRQ/FIQ) unconditionally.
| void STDCALL disable_irq_fiq | ( | void | ) |
Disable Interrupts and Fast Interrupts (IRQ/FIQ) unconditionally.
| IRQ_FIQ_MASK STDCALL save_irq_fiq | ( | void | ) |
Disable Interrupts and Fast Interrupts (IRQ/FIQ) and return the previous state.
| IRQ_FIQ_MASK STDCALL restore_irq_fiq | ( | IRQ_FIQ_MASK | irqfiqmask | ) |
Restore Interrupts and Fast Interrupts (IRQ/FIQ) to a previous state.
| IRQFIQMask | IRQ/FIQ state to restore |
| void STDCALL enable_abort | ( | void | ) |
Enable Abort unconditionally.
| void STDCALL disable_abort | ( | void | ) |
Disable Abort unconditionally.
| ABORT_MASK STDCALL save_abort | ( | void | ) |
Disable Abort and return the previous state.
| ABORT_MASK STDCALL restore_abort | ( | ABORT_MASK | abortmask | ) |
Restore Abort to a previous state.
| AbortMask | Abort state to restore |
| void STDCALL halt_cpu | ( | void | ) |
Halt the current processor.
| void STDCALL pause_cpu | ( | void | ) |
Pause the current processor and wait for an Event or Interrupt (Where Applicable).
| uint32_t STDCALL halt_thread | ( | uint32_t | exitcode | ) |
Halt the current thread.
| void STDCALL send_event | ( | void | ) |
Send a signal that an Event has occurred (Where Applicable).
| void STDCALL wait_for_event | ( | void | ) |
Wait for an Event to occur (Where Applicable).
| void STDCALL wait_for_interrupt | ( | void | ) |
Wait for an Interrupt to occur (Where Applicable).
| void STDCALL read_memory_barrier | ( | void | ) |
Perform a Read Memory Barrier operation (Where Applicable).
| void STDCALL write_memory_barrier | ( | void | ) |
Perform a Write Memory Barrier operation (Where Applicable).
| void STDCALL data_memory_barrier | ( | void | ) |
Perform a Data Memory Barrier operation (Where Applicable).
| void STDCALL data_synchronization_barrier | ( | void | ) |
Perform a Data Synchronization Barrier operation (Where Applicable).
| void STDCALL instruction_memory_barrier | ( | void | ) |
Perform an Instruction Memory Barrier operation (Where Applicable).
| void STDCALL invalidate_tlb | ( | void | ) |
Perform an Invalidate Entire TLB operation (Where Applicable).
| void STDCALL invalidate_data_tlb | ( | void | ) |
Perform an Invalidate Data TLB operation (Where Applicable).
| void STDCALL invalidate_instruction_tlb | ( | void | ) |
Perform an Invalidate Instruction TLB operation (Where Applicable).
| void STDCALL invalidate_cache | ( | void | ) |
Perform an Invalidate Entire Cache operation (Where Applicable).
| void STDCALL clean_data_cache | ( | void | ) |
Perform a Clean Data Cache operation (Where Applicable).
| void STDCALL invalidate_data_cache | ( | void | ) |
Perform an Invalidate Data Cache operation (Where Applicable).
| void STDCALL clean_and_invalidate_data_cache | ( | void | ) |
Perform a Clean and Invalidate Data Cache operation (Where Applicable).
| void STDCALL invalidate_instruction_cache | ( | void | ) |
Perform an Invalidate Instruction Cache operation (Where Applicable).
| void STDCALL clean_data_cache_range | ( | size_t | address, |
| uint32_t | size ) |
Perform a Clean Data Cache Range operation (Where Applicable).
| void STDCALL invalidate_data_cache_range | ( | size_t | address, |
| uint32_t | size ) |
Perform an Invalidate Data Cache Range operation (Where Applicable).
| void STDCALL clean_and_invalidate_data_cache_range | ( | size_t | address, |
| uint32_t | size ) |
Perform a Clean and Invalidate Data Cache Range operation (Where Applicable).
| void STDCALL invalidate_instruction_cache_range | ( | size_t | address, |
| uint32_t | size ) |
Perform an Invalidate Instruction Cache Range operation (Where Applicable).
| void STDCALL flush_prefetch_buffer | ( | void | ) |
Perform a Flush Prefetch Buffer operation (Where Applicable).
| void STDCALL flush_branch_target_cache | ( | void | ) |
Perform a Flush Entire Branch Target Cache operation (Where Applicable).
| void STDCALL context_switch | ( | void * | oldstack, |
| void * | newstack, | ||
| THREAD_HANDLE | newthread ) |
Perform a Context Switch from one thread to another.
| void STDCALL context_switch_irq | ( | void * | oldstack, |
| void * | newstack, | ||
| THREAD_HANDLE | newthread ) |
Perform a Context Switch from one thread to another from an IRQ handler.
| void STDCALL context_switch_fiq | ( | void * | oldstack, |
| void * | newstack, | ||
| THREAD_HANDLE | newthread ) |
Perform a Context Switch from one thread to another from an FIQ handler.
| void STDCALL context_switch_swi | ( | void * | oldstack, |
| void * | newstack, | ||
| THREAD_HANDLE | newthread ) |
Perform a Context Switch from one thread to another from a software interrupt handler.
| int32_t STDCALL interlocked_or | ( | int32_t * | target, |
| int32_t | value ) |
Perform an atomic OR operation.
| int32_t STDCALL interlocked_xor | ( | int32_t * | target, |
| int32_t | value ) |
Perform an atomic XOR operation.
| int32_t STDCALL interlocked_and | ( | int32_t * | target, |
| int32_t | value ) |
Perform an atomic AND operation.
| int32_t STDCALL interlocked_decrement | ( | int32_t * | target | ) |
Perform an atomic decrement operation.
| int32_t STDCALL interlocked_increment | ( | int32_t * | target | ) |
Perform an atomic increment operation.
| int32_t STDCALL interlocked_exchange | ( | int32_t * | target, |
| int32_t | source ) |
Perform an atomic exchange operation.
| int32_t STDCALL interlocked_add_exchange | ( | int32_t * | target, |
| int32_t | source ) |
Perform an atomic add and exchange operation.
| int32_t STDCALL interlocked_compare_exchange | ( | int32_t * | target, |
| int32_t | source, | ||
| int32_t | compare ) |
Perform an atomic compare and exchange operation.
| uint32_t STDCALL page_table_get_levels | ( | void | ) |
Get the number of page table levels for the current platform.
| size_t STDCALL page_directory_get_base | ( | void | ) |
Get the base address of the first level page directory (Where applicable).
| uint32_t STDCALL page_directory_get_size | ( | void | ) |
Get the size of the first level page directory (Where applicable).
| size_t STDCALL page_table_get_base | ( | void | ) |
Get the base address of the first or second level page table.
| uint32_t STDCALL page_table_get_size | ( | void | ) |
Get the size of the first or second level page table.
| void STDCALL page_table_get_entry | ( | size_t | address, |
| PAGE_TABLE_ENTRY * | entry ) |
Get the Page Table entry that corresponds to the supplied virtual address.
| uint32_t STDCALL page_table_set_entry | ( | PAGE_TABLE_ENTRY * | entry | ) |
Set the Page Table entry that corresponds to the supplied virtual address.
| uint32_t STDCALL page_table_get_page_size | ( | size_t | address | ) |
Get the Size from the Page Table page that corresponds to the supplied virtual address.
| uint32_t STDCALL page_table_get_page_flags | ( | size_t | address | ) |
Get the Flags from the Page Table page that corresponds to the supplied virtual address.
| size_t STDCALL page_table_get_page_physical | ( | size_t | address | ) |
Get the Physical Address from the Page Table page that corresponds to the supplied virtual address.
| size_t STDCALL page_tables_get_address | ( | void | ) |
Get the address of the second or third level page tables.
| uint32_t STDCALL page_tables_get_length | ( | void | ) |
Get the size of the second or third level page tables.
| uint32_t STDCALL page_tables_get_count | ( | void | ) |
Get the number of second or third level page tables.
| uint32_t STDCALL page_tables_get_shift | ( | void | ) |
Get the multiplier to convert count to actual size of the second or third level page tables.
| size_t STDCALL page_tables_get_next | ( | void | ) |
Get the address of the next available second or third level page table.
| uint32_t STDCALL page_tables_get_used | ( | void | ) |
Get the number of used second or third level page tables.
| uint32_t STDCALL page_tables_get_free | ( | void | ) |
Get the number of available second or third level page tables.
| size_t STDCALL vector_table_get_base | ( | void | ) |
Get the base address of the interrupt vector table.
| uint32_t STDCALL vector_table_get_size | ( | void | ) |
Get the size in bytes of the interrupt vector table.
| uint32_t STDCALL vector_table_get_count | ( | void | ) |
Get the number of entries in the interrupt vector table.
| size_t STDCALL vector_table_get_entry | ( | uint32_t | number | ) |
Get the interrupt vector table entry that corresponds to the supplied number.
| uint32_t STDCALL vector_table_set_entry | ( | uint32_t | number, |
| size_t | address ) |
Set the interrupt vector table entry that corresponds to the supplied number.
| uint32_t STDCALL host_get_name | ( | char * | name, |
| uint32_t | len ) |
Name Functions
| uint32_t STDCALL host_get_domain | ( | char * | domain, |
| uint32_t | len ) |
| void STDCALL logging_output | ( | const char * | text | ) |
Logging Functions
| void STDCALL logging_output_ex | ( | uint32_t | facility, |
| uint32_t | severity, | ||
| const char * | tag, | ||
| const char * | content ) |
| int STDCALL logging_outputf | ( | const char * | format, |
| ... ) |
Output formatted text to the default logging.
| Format | The formatted text to output (As per printf in standard C library) |
Locate an environment variable and return the current value.
Environment Functions
| Name | The name of the variable to locate (eg TZ) |
| uint32_t STDCALL environment_set | ( | const char * | name, |
| const char * | value ) |
Add an environment variable or update an existing variable.
| Name | The name of the variable to add or update (eg TZ) |
| Value | The new value of the variable (eg EST+5) |
Get the current number of environment variables.
| Reset | If True then force a recount |
| uint32_t STDCALL environment_index | ( | const char * | name | ) |
Locate an environment variable and return the index.
| Name | The name of the variable to locate (eg TZ) |
| uint32_t STDCALL environment_string | ( | uint32_t | index, |
| char * | string, | ||
| uint32_t | len ) |
Get an environment variable by index.
| Index | The index of the variable to get (1 to EnvironmentCount) |
| int setenv | ( | const char * | name, |
| const char * | value, | ||
| int | overwrite ) |
Environment Functions (From stdlib.h)
| int unsetenv | ( | const char * | name | ) |
| uint32_t STDCALL first_bit_set | ( | uint32_t | value | ) |
Find the first set bit in a nonzero 32 bit value.
Utility Functions
| uint32_t STDCALL last_bit_set | ( | uint32_t | value | ) |
Find the last set bit in a nonzero 32 bit value.
| uint32_t STDCALL count_leading_zeros | ( | uint32_t | value | ) |
Count the number of leading 0 bits in a nonzero 32 bit value.
| uint32_t STDCALL count_trailing_zeros | ( | uint32_t | value | ) |
Count the number of trailing 0 bits in a nonzero 32 bit value.
| size_t STDCALL physical_to_io_address | ( | void * | address | ) |
Convert Physical address to an IO addresses (Where Applicable).
| size_t STDCALL io_address_to_physical | ( | void * | address | ) |
Convert an IO address to a Physical address (Where Applicable).
| size_t STDCALL physical_to_bus_address | ( | void * | address | ) |
Convert a Physical address to a Bus address (Where Applicable).
| size_t STDCALL bus_address_to_physical | ( | void * | address | ) |
Convert a Bus address to a Physical address (Where Applicable).
| void STDCALL nanosecond_delay | ( | uint32_t | nanoseconds | ) |
Non sleep wait for a number of nanoseconds.
| Nanoseconds | Number of nanoseconds to wait |
| void STDCALL microsecond_delay | ( | uint32_t | microseconds | ) |
Non sleep wait for a number of microseconds.
| Microseconds | Number of microseconds to wait |
| void STDCALL millisecond_delay | ( | uint32_t | milliseconds | ) |
Non sleep wait for a number of milliseconds.
| Milliseconds | Number of milliseconds to wait |
Non sleep wait for a number of nanoseconds.
| Nanoseconds | Number of nanoseconds to wait |
| Wait | Use WaitForEvent on each loop to reduce power consumption |
Non sleep wait for a number of microseconds.
| Microseconds | Number of microseconds to wait |
| Wait | Use WaitForEvent on each loop to reduce power consumption |
Non sleep wait for a number of milliseconds.
| Milliseconds | Number of milliseconds to wait |
| Wait | Use WaitForEvent on each loop to reduce power consumption |
| uint32_t get_tick_count | ( | void | ) |
RTL Functions
| uint64_t get_tick_count64 | ( | void | ) |
| int posix_memalign | ( | void ** | memptr, |
| size_t | alignment, | ||
| size_t | size ) |
LIBC Functions (From stdlib.h)
| char * realpath | ( | const char *__restrict | path, |
| char *__restrict | resolved_path ) |
| int getpagesize | ( | void | ) |
| int dup3 | ( | int | oldfd, |
| int | newfd, | ||
| int | flags ) |
LIBC Functions (From unistd.h)
| int getentropy | ( | void * | buffer, |
| size_t | length ) |
| int usleep | ( | useconds_t | useconds | ) |
| int symlink | ( | const char * | path1, |
| const char * | path2 ) |
| int ftruncate | ( | int | fd, |
| off_t | length ) |
| int truncate | ( | const char * | path, |
| off_t | length ) |
| int fdatasync | ( | int | fd | ) |
| int sethostname | ( | const char * | name, |
| size_t | size ) |
| int gethostname | ( | char * | name, |
| size_t | size ) |
winsock[2].h defines as __stdcall, and with int as 2nd arg
| void * mmap | ( | void * | addr, |
| size_t | length, | ||
| int | prot, | ||
| int | flags, | ||
| int | fd, | ||
| off_t | offset ) |
LIBC Functions (From sys/mman.h)
| int munmap | ( | void * | addr, |
| size_t | length ) |
| int settimeofday | ( | const struct timeval * | tv, |
| const struct timezone * | tz ) |
LIBC Functions (From sys/time.h)
| int sched_getcpu | ( | void | ) |
LIBC Functions (From sched.h)
| void msleep | ( | unsigned int | msecs | ) |
LIBC Functions (Non Standard)
| pid_t gettid | ( | void | ) |
| HANDLE fd_handle | ( | int | fd | ) |