1use autd3_driver::{common::Phase, defined::float};
15
16pub const DEFAULT_CORRECTED_ALPHA: float = 0.803;
17
18#[no_mangle]
19#[must_use]
20pub unsafe extern "C" fn AUTDEmitIntensityWithCorrectionAlpha(value: u8, alpha: float) -> u8 {
21 autd3_driver::common::EmitIntensity::with_correction_alpha(value, alpha).value()
22}
23
24#[no_mangle]
25#[must_use]
26pub unsafe extern "C" fn AUTDPhaseFromRad(value: float) -> u8 {
27 Phase::from_rad(value).value()
28}
29
30#[no_mangle]
31#[must_use]
32pub unsafe extern "C" fn AUTDPhaseToRad(value: u8) -> float {
33 Phase::new(value).radian()
34}
35
36#[derive(Debug, Clone, Copy)]
37#[repr(C)]
38pub struct Drive {
39 pub phase: u8,
40 pub intensity: u8,
41}