/* automatically generated by rust-bindgen 0.72.1 */

pub const CRC_CRC16: u32 = 0;
pub const CRC_CRC32: u32 = 1;
pub const CRC_DATA_WIDTH_8BIT: u32 = 1;
pub const CRC_DATA_WIDTH_16BIT: u32 = 2;
pub const CRC_DATA_WIDTH_32BIT: u32 = 4;
pub const CRC_INIT_VALUE_DEFAULT: u32 = 4294967295;
pub const en_flag_status_t_RESET: en_flag_status_t = 0;
pub const en_flag_status_t_SET: en_flag_status_t = 1;
#[doc = " @brief Flag status"]
pub type en_flag_status_t = ::core::ffi::c_uint;
#[doc = " @brief CRC initialization structure definition"]
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct stc_crc_init_t {
    #[doc = "< Specifies CRC Protocol.\nThis parameter can be a value of @ref CRC_Protocol_Control_Bit"]
    pub u32Protocol: u32,
    #[doc = "< Specifies initial CRC value.\nThis parameter can be CRC_INIT_VALUE_DEFAULT @ref CRC_Init_Value_Default"]
    pub u32InitValue: u32,
}
unsafe extern "C" {
    #[doc = "Global function prototypes (definition in C source)\n/\n/**\n @addtogroup CRC_Global_Functions\n @{"]
    pub fn CRC_StructInit(pstcCrcInit: *mut stc_crc_init_t) -> i32;
    pub fn CRC_Init(pstcCrcInit: *const stc_crc_init_t) -> i32;
    pub fn CRC_DeInit() -> i32;
    pub fn CRC_GetResult() -> u32;
    pub fn CRC_SetInitValue(u32Value: u32);
    pub fn CRC_GetResultStatus() -> en_flag_status_t;
    pub fn CRC_CRC16_AccumulateData(
        u8DataWidth: u8,
        pvData: *const ::core::ffi::c_void,
        u32Len: u32,
        pu16Out: *mut u16,
    ) -> i32;
    pub fn CRC_CRC16_Calculate(
        u16InitValue: u16,
        u8DataWidth: u8,
        pvData: *const ::core::ffi::c_void,
        u32Len: u32,
        pu16Out: *mut u16,
    ) -> i32;
    pub fn CRC_CRC16_CheckData(
        u16InitValue: u16,
        u8DataWidth: u8,
        pvData: *const ::core::ffi::c_void,
        u32Len: u32,
        u16ExpectValue: u16,
    ) -> en_flag_status_t;
    pub fn CRC_CRC16_GetCheckResult(u16ExpectValue: u16) -> en_flag_status_t;
    pub fn CRC_CRC32_AccumulateData(
        u8DataWidth: u8,
        pvData: *const ::core::ffi::c_void,
        u32Len: u32,
        pu32Out: *mut u32,
    ) -> i32;
    pub fn CRC_CRC32_Calculate(
        u32InitValue: u32,
        u8DataWidth: u8,
        pvData: *const ::core::ffi::c_void,
        u32Len: u32,
        pu32Out: *mut u32,
    ) -> i32;
    pub fn CRC_CRC32_CheckData(
        u32InitValue: u32,
        u8DataWidth: u8,
        pvData: *const ::core::ffi::c_void,
        u32Len: u32,
        u32ExpectValue: u32,
    ) -> en_flag_status_t;
    pub fn CRC_CRC32_GetCheckResult(u32ExpectValue: u32) -> en_flag_status_t;
}
