On Sat, Jan 25, 2025 at 1:32 PM Zhao Liu wrote:
+fn init_gpio_in FnCall<(&'a Self::Target, u32, u32)>>(&self,
num_lines: u32, _f: F) {
+unsafe extern "C" fn rust_irq_handler FnCall<(&'a T, u32,
u32)>>(
+opaque: *mut c_void,
+line: c_int,
+leve
Wrap qdev_init_gpio_{in|out} as methods in DeviceMethods. And for
qdev_init_gpio_in, based on FnCall, it can support idiomatic Rust
callback without the need for C style wrapper.
Signed-off-by: Zhao Liu
---
Changes since RFC:
* Use FnCall to support gpio in callback.
* Place gpio_{in|out} in De