Rust Bindings: reg_read_batch and reg_write_batch (#2060)

* Added binding for rust reg_{read,write}_batch

* Fix reg_write_batch values pointer
This commit is contained in:
Sai Ashwin
2024-12-07 12:19:23 +05:30
committed by GitHub
parent 7d8fe2ab11
commit 3a01515367
3 changed files with 93 additions and 0 deletions

View File

@@ -23,7 +23,19 @@ extern "C" {
pub fn uc_errno(engine: uc_handle) -> uc_error;
pub fn uc_strerror(error_code: uc_error) -> *const c_char;
pub fn uc_reg_write(engine: uc_handle, regid: c_int, value: *const c_void) -> uc_error;
pub fn uc_reg_write_batch(
engine: uc_handle,
regids: *const c_int,
values: *const *const c_void,
count: c_int,
) -> uc_error;
pub fn uc_reg_read(engine: uc_handle, regid: c_int, value: *mut c_void) -> uc_error;
pub fn uc_reg_read_batch(
engine: uc_handle,
regids: *const c_int,
values: *const *mut c_void,
count: c_int,
) -> uc_error;
pub fn uc_mem_write(
engine: uc_handle,
address: u64,