/* automatically generated by rust-bindgen 0.72.1 */

pub const KEYSCAN_HIZ_CYCLE_4: u32 = 0;
pub const KEYSCAN_HIZ_CYCLE_8: u32 = 536870912;
pub const KEYSCAN_HIZ_CYCLE_16: u32 = 1073741824;
pub const KEYSCAN_HIZ_CYCLE_32: u32 = 1610612736;
pub const KEYSCAN_HIZ_CYCLE_64: u32 = 2147483648;
pub const KEYSCAN_HIZ_CYCLE_256: u32 = 2684354560;
pub const KEYSCAN_HIZ_CYCLE_512: u32 = 3221225472;
pub const KEYSCAN_HIZ_CYCLE_1024: u32 = 3758096384;
pub const KEYSCAN_LOW_CYCLE_4: u32 = 33554432;
pub const KEYSCAN_LOW_CYCLE_8: u32 = 50331648;
pub const KEYSCAN_LOW_CYCLE_16: u32 = 67108864;
pub const KEYSCAN_LOW_CYCLE_32: u32 = 83886080;
pub const KEYSCAN_LOW_CYCLE_64: u32 = 100663296;
pub const KEYSCAN_LOW_CYCLE_128: u32 = 117440512;
pub const KEYSCAN_LOW_CYCLE_256: u32 = 134217728;
pub const KEYSCAN_LOW_CYCLE_512: u32 = 150994944;
pub const KEYSCAN_LOW_CYCLE_1K: u32 = 167772160;
pub const KEYSCAN_LOW_CYCLE_2K: u32 = 184549376;
pub const KEYSCAN_LOW_CYCLE_4K: u32 = 201326592;
pub const KEYSCAN_LOW_CYCLE_8K: u32 = 218103808;
pub const KEYSCAN_LOW_CYCLE_16K: u32 = 234881024;
pub const KEYSCAN_LOW_CYCLE_32K: u32 = 251658240;
pub const KEYSCAN_LOW_CYCLE_64K: u32 = 268435456;
pub const KEYSCAN_LOW_CYCLE_128K: u32 = 285212672;
pub const KEYSCAN_LOW_CYCLE_256K: u32 = 301989888;
pub const KEYSCAN_LOW_CYCLE_512K: u32 = 318767104;
pub const KEYSCAN_LOW_CYCLE_1M: u32 = 335544320;
pub const KEYSCAN_LOW_CYCLE_2M: u32 = 352321536;
pub const KEYSCAN_LOW_CYCLE_4M: u32 = 369098752;
pub const KEYSCAN_LOW_CYCLE_8M: u32 = 385875968;
pub const KEYSCAN_LOW_CYCLE_16M: u32 = 402653184;
pub const KEYSCAN_CLK_HCLK: u32 = 0;
pub const KEYSCAN_CLK_LRC: u32 = 1048576;
pub const KEYSCAN_CLK_XTAL32: u32 = 2097152;
pub const KEYSCAN_OUT_0T1: u32 = 65536;
pub const KEYSCAN_OUT_0T2: u32 = 131072;
pub const KEYSCAN_OUT_0T3: u32 = 196608;
pub const KEYSCAN_OUT_0T4: u32 = 262144;
pub const KEYSCAN_OUT_0T5: u32 = 327680;
pub const KEYSCAN_OUT_0T6: u32 = 393216;
pub const KEYSCAN_OUT_0T7: u32 = 458752;
pub const KEYSCAN_IN_0: u32 = 1;
pub const KEYSCAN_IN_1: u32 = 2;
pub const KEYSCAN_IN_2: u32 = 4;
pub const KEYSCAN_IN_3: u32 = 8;
pub const KEYSCAN_IN_4: u32 = 16;
pub const KEYSCAN_IN_5: u32 = 32;
pub const KEYSCAN_IN_6: u32 = 64;
pub const KEYSCAN_IN_7: u32 = 128;
pub const KEYSCAN_IN_8: u32 = 256;
pub const KEYSCAN_IN_9: u32 = 512;
pub const KEYSCAN_IN_10: u32 = 1024;
pub const KEYSCAN_IN_11: u32 = 2048;
pub const KEYSCAN_IN_12: u32 = 4096;
pub const KEYSCAN_IN_13: u32 = 8192;
pub const KEYSCAN_IN_14: u32 = 16384;
pub const KEYSCAN_IN_15: u32 = 32768;
pub const KEYSCAN_IN_ALL: u32 = 65535;
pub const en_functional_state_t_DISABLE: en_functional_state_t = 0;
pub const en_functional_state_t_ENABLE: en_functional_state_t = 1;
#[doc = " @brief Functional state"]
pub type en_functional_state_t = ::core::ffi::c_uint;
#[doc = " @brief  KEYSCAN configuration"]
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct stc_keyscan_init_t {
    #[doc = "< Specifies the KEYSCAN Hiz cycles.\nThis parameter can be a value of @ref KEYSCAN_Hiz_Cycle_Sel"]
    pub u32HizCycle: u32,
    #[doc = "< Specifies the KEYSCAN low cycles.\nThis parameter can be a value of @ref KEYSCAN_Low_Cycle_Sel"]
    pub u32LowCycle: u32,
    #[doc = "< Specifies the KEYSCAN low cycles.\nThis parameter can be a value of @ref KEYSCAN_Clock_Sel"]
    pub u32KeyClock: u32,
    #[doc = "< Specifies the KEYSCAN low cycles.\nThis parameter can be a value of @ref KEYSCAN_Keyout_Sel"]
    pub u32KeyOut: u32,
    #[doc = "< Specifies the KEYSCAN low cycles.\nThis parameter can be a value of @ref KEYSCAN_Keyin_Sel"]
    pub u32KeyIn: u32,
}
unsafe extern "C" {
    pub fn KEYSCAN_StructInit(pstcKeyscanInit: *mut stc_keyscan_init_t) -> i32;
    pub fn KEYSCAN_Init(pstcKeyscanInit: *const stc_keyscan_init_t) -> i32;
    pub fn KEYSCAN_Cmd(enNewState: en_functional_state_t);
    pub fn KEYSCAN_DeInit() -> i32;
}
