cpukit/libmisc/rtems-fdt: Add shell read and write handler support

The handlers allow indirect access to FDT resources registered with the
shell.

Closes #5152
This commit is contained in:
Chris Johns
2024-11-16 17:40:05 +11:00
parent b3be636863
commit 133b335bae
2 changed files with 62 additions and 2 deletions
+22
View File
@@ -54,6 +54,28 @@ void rtems_fdt_add_shell_command (void);
*/
rtems_fdt_handle* rtems_fdt_get_shell_handle (void);
/**
* Write handler call to write from the address property.
*/
typedef void (*rtems_fdt_write_handler)(uintptr_t address, uint32_t value);
/**
* Read handler call to read from the address property.
*/
typedef uint32_t (*rtems_fdt_read_handler)(uintptr_t address);
/**
* Set the write handler returning the current handler.
*/
rtems_fdt_write_handler
rtems_fdt_set_shell_write_handler (rtems_fdt_write_handler handler);
/**
* Set the read handler returning the current handler.
*/
rtems_fdt_read_handler
rtems_fdt_set_shell_read_handler (rtems_fdt_read_handler handler);
#ifdef __cplusplus
}
#endif /* __cplusplus */