diff options
author | Alex White <alex.white@oarcorp.com> | 2023-05-18 13:47:30 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2023-05-19 12:32:18 -0500 |
commit | 9b7a1da8047ba630ea05f6969728af2fd14ce9b4 (patch) | |
tree | e440792ee93a57be87d5b9a78a3efd694db26099 /bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h | |
parent | bsps/microblaze: Remove GPIO build system options (diff) | |
download | rtems-9b7a1da8047ba630ea05f6969728af2fd14ce9b4.tar.bz2 |
bsps/microblaze: Add device tree support to GPIO
Diffstat (limited to '')
-rw-r--r-- | bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h b/bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h index a3d79ff70f..e8f569c8fd 100644 --- a/bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h +++ b/bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h @@ -129,6 +129,24 @@ typedef struct { bool has_interrupts; } Microblaze_GPIO_context; +#ifdef BSP_MICROBLAZE_FPGA_USE_FDT +/** + * @brief Initialize GPIO context from FDT. + * + * @param[in] context the GPIO context to initialize + * @param[in] index the zero-based GPIO index in the FDT + * + * @retval RTEMS_SUCCESSFUL on success + * @retval RTEMS_INVALID_NUMBER if the index is invalid or the node is missing a + * required property + * @retval RTEMS_INVALID_ADDRESS if the context is NULL + */ +rtems_status_code microblaze_gpio_init_context_from_fdt( + Microblaze_GPIO_context *context, + int index +); +#endif /* BSP_MICROBLAZE_FPGA_USE_FDT */ + /** * @brief Set pin configuration for the specified GPIO channel. * |