hc32f460_driver_sys 0.1.1

Provide driver function binding for HDSC's HC32F460 MCU.
Documentation
/* automatically generated by rust-bindgen 0.72.1 */

pub const EVT_PORT_1: u32 = 0;
pub const EVT_PORT_2: u32 = 1;
pub const EVT_PORT_3: u32 = 2;
pub const EVT_PORT_4: u32 = 3;
pub const EVT_PIN_00: u32 = 1;
pub const EVT_PIN_01: u32 = 2;
pub const EVT_PIN_02: u32 = 4;
pub const EVT_PIN_03: u32 = 8;
pub const EVT_PIN_04: u32 = 16;
pub const EVT_PIN_05: u32 = 32;
pub const EVT_PIN_06: u32 = 64;
pub const EVT_PIN_07: u32 = 128;
pub const EVT_PIN_08: u32 = 256;
pub const EVT_PIN_09: u32 = 512;
pub const EVT_PIN_10: u32 = 1024;
pub const EVT_PIN_11: u32 = 2048;
pub const EVT_PIN_12: u32 = 4096;
pub const EVT_PIN_13: u32 = 8192;
pub const EVT_PIN_14: u32 = 16384;
pub const EVT_PIN_15: u32 = 32768;
pub const EVT_PIN_All: u32 = 65535;
pub const EVT_PIN_MASK: u32 = 65535;
pub const EP_DIR_IN: u32 = 0;
pub const EP_DIR_OUT: u32 = 1;
pub const EP_FILTER_OFF: u32 = 0;
pub const EP_FILTER_ON: u32 = 1;
pub const EP_FCLK_DIV1: u32 = 0;
pub const EP_FCLK_DIV8: u32 = 2;
pub const EP_FCLK_DIV32: u32 = 4;
pub const EP_FCLK_DIV64: u32 = 6;
pub const EP_TRIG_NONE: u32 = 0;
pub const EP_TRIG_FALLING: u32 = 1;
pub const EP_TRIG_RISING: u32 = 2;
pub const EP_TRIG_BOTH: u32 = 3;
pub const EP_OPS_NONE: u32 = 0;
pub const EP_OPS_LOW: u32 = 1;
pub const EP_OPS_HIGH: u32 = 2;
pub const EP_OPS_TOGGLE: u32 = 3;
#[doc = "< Pin reset"]
pub const en_ep_state_t_EVT_PIN_RESET: en_ep_state_t = 0;
#[doc = "< Pin set"]
pub const en_ep_state_t_EVT_PIN_SET: en_ep_state_t = 1;
#[doc = " @brief  Event Pin Set and Reset enumeration"]
pub type en_ep_state_t = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct stc_ep_init_t {
    #[doc = "< Input/Output setting, @ref EP_PinDirection_Sel for details"]
    pub u32PinDir: u32,
    #[doc = "< Corresponding pin initial state, @ref en_ep_state_t for details"]
    pub enPinState: en_ep_state_t,
    #[doc = "< Corresponding pin state after triggered, @ref EP_TriggerOps_Sel for details"]
    pub u32PinTriggerOps: u32,
    #[doc = "< Event port trigger edge, @ref EP_Trigger_Sel for details"]
    pub u32Edge: u32,
    #[doc = "< Filter clock function setting, @ref EP_FilterClock_Sel for details"]
    pub u32Filter: u32,
    #[doc = "< Filter clock, ref@ EP_FilterClock_Div for details"]
    pub u32FilterClock: u32,
}
unsafe extern "C" {
    #[doc = "Global function prototypes (definition in C source)\n/\n/**\n @addtogroup EP_Global_Functions\n @{"]
    pub fn EP_DeInit();
    pub fn EP_StructInit(pstcEventPortInit: *mut stc_ep_init_t) -> i32;
    pub fn EP_Init(
        u8EventPort: u8,
        u16EventPin: u16,
        pstcEventPortInit: *const stc_ep_init_t,
    ) -> i32;
    pub fn EP_SetTriggerEdge(u8EventPort: u8, u16EventPin: u16, u32Edge: u32) -> i32;
    pub fn EP_SetTriggerOps(u8EventPort: u8, u16EventPin: u16, u32Ops: u32) -> i32;
    pub fn EP_ReadInputPins(u8EventPort: u8, u16EventPin: u16) -> en_ep_state_t;
    pub fn EP_ReadInputPort(u8EventPort: u8) -> u16;
    pub fn EP_ReadOutputPins(u8EventPort: u8, u16EventPin: u16) -> en_ep_state_t;
    pub fn EP_ReadOutputPort(u8EventPort: u8) -> u16;
    pub fn EP_SetPins(u8EventPort: u8, u16EventPin: u16);
    pub fn EP_ResetPins(u8EventPort: u8, u16EventPin: u16);
    pub fn EP_SetDir(u8EventPort: u8, u16EventPin: u16, u32Dir: u32);
}