mu_lib 0.2.2

XCENA mu Library
Documentation
//! Message handling module providing synchronous and asynchronous message operations
//!
//! This module provides functions for sending messages in both synchronous and asynchronous modes.

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]

pub use crate::bindings::root::{asyncMessageRB, syncMessageRB};

/// Function to send an asynchronous message
///
/// # Arguments
/// * `src` - Pointer to the source data
/// * `size` - Size of the data in bytes
///
/// # Safety
/// This function is unsafe because it dereferences raw pointers
pub fn async_message(src: *mut core::ffi::c_void, size: u64) {
    unsafe { asyncMessageRB(src, size) }
}

/// Function to send a synchronous message
///
/// # Arguments
/// * `src` - Pointer to the source data
/// * `size` - Size of the data in bytes
///
/// # Safety
/// This function is unsafe because it dereferences raw pointers
pub fn sync_message(src: *mut core::ffi::c_void, size: u64) {
    unsafe { syncMessageRB(src, size) }
}