1
2
3
4
5
/* automatically generated by rust-bindgen */

pub type FILE = libc::FILE;

pub const FF_DEFINED : u32 = 86604 ; pub const FFCONF_DEF : u32 = 86604 ; pub const FF_FS_READONLY : u32 = 0 ; pub const FF_FS_MINIMIZE : u32 = 0 ; pub const FF_USE_STRFUNC : u32 = 0 ; pub const FF_USE_FIND : u32 = 0 ; pub const FF_USE_MKFS : u32 = 0 ; pub const FF_USE_FASTSEEK : u32 = 0 ; pub const FF_USE_EXPAND : u32 = 0 ; pub const FF_USE_CHMOD : u32 = 0 ; pub const FF_USE_LABEL : u32 = 0 ; pub const FF_USE_FORWARD : u32 = 0 ; pub const FF_CODE_PAGE : u32 = 932 ; pub const FF_USE_LFN : u32 = 0 ; pub const FF_MAX_LFN : u32 = 255 ; pub const FF_LFN_UNICODE : u32 = 0 ; pub const FF_LFN_BUF : u32 = 255 ; pub const FF_SFN_BUF : u32 = 12 ; pub const FF_STRF_ENCODE : u32 = 3 ; pub const FF_FS_RPATH : u32 = 0 ; pub const FF_VOLUMES : u32 = 1 ; pub const FF_STR_VOLUME_ID : u32 = 0 ; pub const FF_MULTI_PARTITION : u32 = 0 ; pub const FF_MIN_SS : u32 = 512 ; pub const FF_MAX_SS : u32 = 512 ; pub const FF_USE_TRIM : u32 = 0 ; pub const FF_FS_NOFSINFO : u32 = 0 ; pub const FF_FS_TINY : u32 = 0 ; pub const FF_FS_EXFAT : u32 = 0 ; pub const FF_FS_NORTC : u32 = 0 ; pub const FF_NORTC_MON : u32 = 1 ; pub const FF_NORTC_MDAY : u32 = 1 ; pub const FF_NORTC_YEAR : u32 = 2018 ; pub const FF_FS_LOCK : u32 = 0 ; pub const FF_FS_REENTRANT : u32 = 0 ; pub const FF_FS_TIMEOUT : u32 = 1000 ; pub const FF_INTDEF : u32 = 2 ; pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; pub const __USE_ISOC11 : u32 = 1 ; pub const __USE_ISOC99 : u32 = 1 ; pub const __USE_ISOC95 : u32 = 1 ; pub const __USE_POSIX_IMPLICITLY : u32 = 1 ; pub const _POSIX_SOURCE : u32 = 1 ; pub const _POSIX_C_SOURCE : u32 = 200809 ; pub const __USE_POSIX : u32 = 1 ; pub const __USE_POSIX2 : u32 = 1 ; pub const __USE_POSIX199309 : u32 = 1 ; pub const __USE_POSIX199506 : u32 = 1 ; pub const __USE_XOPEN2K : u32 = 1 ; pub const __USE_XOPEN2K8 : u32 = 1 ; pub const _ATFILE_SOURCE : u32 = 1 ; pub const __USE_MISC : u32 = 1 ; pub const __USE_ATFILE : u32 = 1 ; pub const __USE_FORTIFY_LEVEL : u32 = 0 ; pub const __GLIBC_USE_DEPRECATED_GETS : u32 = 0 ; pub const _STDC_PREDEF_H : u32 = 1 ; pub const __STDC_IEC_559__ : u32 = 1 ; pub const __STDC_IEC_559_COMPLEX__ : u32 = 1 ; pub const __STDC_ISO_10646__ : u32 = 201706 ; pub const __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; pub const _SYS_CDEFS_H : u32 = 1 ; pub const __glibc_c99_flexarr_available : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __WORDSIZE_TIME64_COMPAT32 : u32 = 1 ; pub const __SYSCALL_WORDSIZE : u32 = 64 ; pub const __HAVE_GENERIC_SELECTION : u32 = 1 ; pub const __GLIBC_USE_LIB_EXT2 : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_BFP_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; pub const _BITS_TYPESIZES_H : u32 = 1 ; pub const __OFF_T_MATCHES_OFF64_T : u32 = 1 ; pub const __INO_T_MATCHES_INO64_T : u32 = 1 ; pub const __RLIM_T_MATCHES_RLIM64_T : u32 = 1 ; pub const __FD_SETSIZE : u32 = 1024 ; pub const _BITS_WCHAR_H : u32 = 1 ; pub const _BITS_STDINT_INTN_H : u32 = 1 ; pub const _BITS_STDINT_UINTN_H : u32 = 1 ; pub const INT8_MIN : i32 = -128 ; pub const INT16_MIN : i32 = -32768 ; pub const INT32_MIN : i32 = -2147483648 ; pub const INT8_MAX : u32 = 127 ; pub const INT16_MAX : u32 = 32767 ; pub const INT32_MAX : u32 = 2147483647 ; pub const UINT8_MAX : u32 = 255 ; pub const UINT16_MAX : u32 = 65535 ; pub const UINT32_MAX : u32 = 4294967295 ; pub const INT_LEAST8_MIN : i32 = -128 ; pub const INT_LEAST16_MIN : i32 = -32768 ; pub const INT_LEAST32_MIN : i32 = -2147483648 ; pub const INT_LEAST8_MAX : u32 = 127 ; pub const INT_LEAST16_MAX : u32 = 32767 ; pub const INT_LEAST32_MAX : u32 = 2147483647 ; pub const UINT_LEAST8_MAX : u32 = 255 ; pub const UINT_LEAST16_MAX : u32 = 65535 ; pub const UINT_LEAST32_MAX : u32 = 4294967295 ; pub const INT_FAST8_MIN : i32 = -128 ; pub const INT_FAST16_MIN : i64 = -9223372036854775808 ; pub const INT_FAST32_MIN : i64 = -9223372036854775808 ; pub const INT_FAST8_MAX : u32 = 127 ; pub const INT_FAST16_MAX : u64 = 9223372036854775807 ; pub const INT_FAST32_MAX : u64 = 9223372036854775807 ; pub const UINT_FAST8_MAX : u32 = 255 ; pub const UINT_FAST16_MAX : i32 = -1 ; pub const UINT_FAST32_MAX : i32 = -1 ; pub const INTPTR_MIN : i64 = -9223372036854775808 ; pub const INTPTR_MAX : u64 = 9223372036854775807 ; pub const UINTPTR_MAX : i32 = -1 ; pub const PTRDIFF_MIN : i64 = -9223372036854775808 ; pub const PTRDIFF_MAX : u64 = 9223372036854775807 ; pub const SIG_ATOMIC_MIN : i32 = -2147483648 ; pub const SIG_ATOMIC_MAX : u32 = 2147483647 ; pub const SIZE_MAX : i32 = -1 ; pub const WINT_MIN : u32 = 0 ; pub const WINT_MAX : u32 = 4294967295 ; pub const EOF : i32 = -1 ; pub const FA_READ : u32 = 1 ; pub const FA_WRITE : u32 = 2 ; pub const FA_OPEN_EXISTING : u32 = 0 ; pub const FA_CREATE_NEW : u32 = 4 ; pub const FA_CREATE_ALWAYS : u32 = 8 ; pub const FA_OPEN_ALWAYS : u32 = 16 ; pub const FA_OPEN_APPEND : u32 = 48 ; pub const FM_FAT : u32 = 1 ; pub const FM_FAT32 : u32 = 2 ; pub const FM_EXFAT : u32 = 4 ; pub const FM_ANY : u32 = 7 ; pub const FM_SFD : u32 = 8 ; pub const FS_FAT12 : u32 = 1 ; pub const FS_FAT16 : u32 = 2 ; pub const FS_FAT32 : u32 = 3 ; pub const FS_EXFAT : u32 = 4 ; pub const AM_RDO : u32 = 1 ; pub const AM_HID : u32 = 2 ; pub const AM_SYS : u32 = 4 ; pub const AM_DIR : u32 = 16 ; pub const AM_ARC : u32 = 32 ; pub type __u_char = :: std :: os :: raw :: c_uchar ; pub type __u_short = :: std :: os :: raw :: c_ushort ; pub type __u_int = :: std :: os :: raw :: c_uint ; pub type __u_long = :: std :: os :: raw :: c_ulong ; pub type __int8_t = :: std :: os :: raw :: c_schar ; pub type __uint8_t = :: std :: os :: raw :: c_uchar ; pub type __int16_t = :: std :: os :: raw :: c_short ; pub type __uint16_t = :: std :: os :: raw :: c_ushort ; pub type __int32_t = :: std :: os :: raw :: c_int ; pub type __uint32_t = :: std :: os :: raw :: c_uint ; pub type __int64_t = :: std :: os :: raw :: c_long ; pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __quad_t = :: std :: os :: raw :: c_long ; pub type __u_quad_t = :: std :: os :: raw :: c_ulong ; pub type __intmax_t = :: std :: os :: raw :: c_long ; pub type __uintmax_t = :: std :: os :: raw :: c_ulong ; pub type __dev_t = :: std :: os :: raw :: c_ulong ; pub type __uid_t = :: std :: os :: raw :: c_uint ; pub type __gid_t = :: std :: os :: raw :: c_uint ; pub type __ino_t = :: std :: os :: raw :: c_ulong ; pub type __ino64_t = :: std :: os :: raw :: c_ulong ; pub type __mode_t = :: std :: os :: raw :: c_uint ; pub type __nlink_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __pid_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone ) ] pub struct __fsid_t { pub __val : [ :: std :: os :: raw :: c_int ; 2usize ] , } # [ test ] fn bindgen_test_layout___fsid_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __fsid_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __fsid_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __fsid_t > ( ) ) ) . __val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __fsid_t ) , "::" , stringify ! ( __val ) ) ) ; } pub type __clock_t = :: std :: os :: raw :: c_long ; pub type __rlim_t = :: std :: os :: raw :: c_ulong ; pub type __rlim64_t = :: std :: os :: raw :: c_ulong ; pub type __id_t = :: std :: os :: raw :: c_uint ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type __useconds_t = :: std :: os :: raw :: c_uint ; pub type __suseconds_t = :: std :: os :: raw :: c_long ; pub type __daddr_t = :: std :: os :: raw :: c_int ; pub type __key_t = :: std :: os :: raw :: c_int ; pub type __clockid_t = :: std :: os :: raw :: c_int ; pub type __timer_t = * mut :: std :: os :: raw :: c_void ; pub type __blksize_t = :: std :: os :: raw :: c_long ; pub type __blkcnt_t = :: std :: os :: raw :: c_long ; pub type __blkcnt64_t = :: std :: os :: raw :: c_long ; pub type __fsblkcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsblkcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsword_t = :: std :: os :: raw :: c_long ; pub type __ssize_t = :: std :: os :: raw :: c_long ; pub type __syscall_slong_t = :: std :: os :: raw :: c_long ; pub type __syscall_ulong_t = :: std :: os :: raw :: c_ulong ; pub type __loff_t = __off64_t ; pub type __caddr_t = * mut :: std :: os :: raw :: c_char ; pub type __intptr_t = :: std :: os :: raw :: c_long ; pub type __socklen_t = :: std :: os :: raw :: c_uint ; pub type __sig_atomic_t = :: std :: os :: raw :: c_int ; pub type int_least8_t = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; pub type int_fast8_t = :: std :: os :: raw :: c_schar ; pub type int_fast16_t = :: std :: os :: raw :: c_long ; pub type int_fast32_t = :: std :: os :: raw :: c_long ; pub type int_fast64_t = :: std :: os :: raw :: c_long ; pub type uint_fast8_t = :: std :: os :: raw :: c_uchar ; pub type uint_fast16_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast32_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast64_t = :: std :: os :: raw :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; pub type UINT = :: std :: os :: raw :: c_uint ; pub type BYTE = :: std :: os :: raw :: c_uchar ; pub type WORD = u16 ; pub type WCHAR = u16 ; pub type DWORD = u32 ; pub type QWORD = u64 ; pub type TCHAR = :: std :: os :: raw :: c_char ; pub type FSIZE_t = DWORD ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct FATFS { pub fs_type : BYTE , pub pdrv : BYTE , pub n_fats : BYTE , pub wflag : BYTE , pub fsi_flag : BYTE , pub id : WORD , pub n_rootdir : WORD , pub csize : WORD , pub last_clst : DWORD , pub free_clst : DWORD , pub n_fatent : DWORD , pub fsize : DWORD , pub volbase : DWORD , pub fatbase : DWORD , pub dirbase : DWORD , pub database : DWORD , pub winsect : DWORD , pub win : [ BYTE ; 512usize ] , } # [ test ] fn bindgen_test_layout_FATFS ( ) { assert_eq ! ( :: std :: mem :: size_of :: < FATFS > ( ) , 560usize , concat ! ( "Size of: " , stringify ! ( FATFS ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < FATFS > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FATFS ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . fs_type as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( fs_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . pdrv as * const _ as usize } , 1usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( pdrv ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . n_fats as * const _ as usize } , 2usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( n_fats ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . wflag as * const _ as usize } , 3usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( wflag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . fsi_flag as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( fsi_flag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . id as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . n_rootdir as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( n_rootdir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . csize as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( csize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . last_clst as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( last_clst ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . free_clst as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( free_clst ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . n_fatent as * const _ as usize } , 20usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( n_fatent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . fsize as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( fsize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . volbase as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( volbase ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . fatbase as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( fatbase ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . dirbase as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( dirbase ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . database as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( database ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . winsect as * const _ as usize } , 44usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( winsect ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FATFS > ( ) ) ) . win as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( FATFS ) , "::" , stringify ! ( win ) ) ) ; } impl Default for FATFS { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct FFOBJID { pub fs : * mut FATFS , pub id : WORD , pub attr : BYTE , pub stat : BYTE , pub sclust : DWORD , pub objsize : FSIZE_t , } # [ test ] fn bindgen_test_layout_FFOBJID ( ) { assert_eq ! ( :: std :: mem :: size_of :: < FFOBJID > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( FFOBJID ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < FFOBJID > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( FFOBJID ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FFOBJID > ( ) ) ) . fs as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FFOBJID ) , "::" , stringify ! ( fs ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FFOBJID > ( ) ) ) . id as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( FFOBJID ) , "::" , stringify ! ( id ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FFOBJID > ( ) ) ) . attr as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( FFOBJID ) , "::" , stringify ! ( attr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FFOBJID > ( ) ) ) . stat as * const _ as usize } , 11usize , concat ! ( "Offset of field: " , stringify ! ( FFOBJID ) , "::" , stringify ! ( stat ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FFOBJID > ( ) ) ) . sclust as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( FFOBJID ) , "::" , stringify ! ( sclust ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FFOBJID > ( ) ) ) . objsize as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( FFOBJID ) , "::" , stringify ! ( objsize ) ) ) ; } impl Default for FFOBJID { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct FIL { pub obj : FFOBJID , pub flag : BYTE , pub err : BYTE , pub fptr : FSIZE_t , pub clust : DWORD , pub sect : DWORD , pub dir_sect : DWORD , pub dir_ptr : * mut BYTE , pub buf : [ BYTE ; 512usize ] , } # [ test ] fn bindgen_test_layout_FIL ( ) { assert_eq ! ( :: std :: mem :: size_of :: < FIL > ( ) , 568usize , concat ! ( "Size of: " , stringify ! ( FIL ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < FIL > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( FIL ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . obj as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( obj ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . flag as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( flag ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . err as * const _ as usize } , 25usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( err ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . fptr as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( fptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . clust as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( clust ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . sect as * const _ as usize } , 36usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( sect ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . dir_sect as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( dir_sect ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . dir_ptr as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( dir_ptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FIL > ( ) ) ) . buf as * const _ as usize } , 56usize , concat ! ( "Offset of field: " , stringify ! ( FIL ) , "::" , stringify ! ( buf ) ) ) ; } impl Default for FIL { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct DIR { pub obj : FFOBJID , pub dptr : DWORD , pub clust : DWORD , pub sect : DWORD , pub dir : * mut BYTE , pub fn_ : [ BYTE ; 12usize ] , } # [ test ] fn bindgen_test_layout_DIR ( ) { assert_eq ! ( :: std :: mem :: size_of :: < DIR > ( ) , 64usize , concat ! ( "Size of: " , stringify ! ( DIR ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < DIR > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( DIR ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < DIR > ( ) ) ) . obj as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( DIR ) , "::" , stringify ! ( obj ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < DIR > ( ) ) ) . dptr as * const _ as usize } , 24usize , concat ! ( "Offset of field: " , stringify ! ( DIR ) , "::" , stringify ! ( dptr ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < DIR > ( ) ) ) . clust as * const _ as usize } , 28usize , concat ! ( "Offset of field: " , stringify ! ( DIR ) , "::" , stringify ! ( clust ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < DIR > ( ) ) ) . sect as * const _ as usize } , 32usize , concat ! ( "Offset of field: " , stringify ! ( DIR ) , "::" , stringify ! ( sect ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < DIR > ( ) ) ) . dir as * const _ as usize } , 40usize , concat ! ( "Offset of field: " , stringify ! ( DIR ) , "::" , stringify ! ( dir ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < DIR > ( ) ) ) . fn_ as * const _ as usize } , 48usize , concat ! ( "Offset of field: " , stringify ! ( DIR ) , "::" , stringify ! ( fn_ ) ) ) ; } impl Default for DIR { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone ) ] pub struct FILINFO { pub fsize : FSIZE_t , pub fdate : WORD , pub ftime : WORD , pub fattrib : BYTE , pub fname : [ TCHAR ; 13usize ] , } # [ test ] fn bindgen_test_layout_FILINFO ( ) { assert_eq ! ( :: std :: mem :: size_of :: < FILINFO > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( FILINFO ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < FILINFO > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( FILINFO ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FILINFO > ( ) ) ) . fsize as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( FILINFO ) , "::" , stringify ! ( fsize ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FILINFO > ( ) ) ) . fdate as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( FILINFO ) , "::" , stringify ! ( fdate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FILINFO > ( ) ) ) . ftime as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( FILINFO ) , "::" , stringify ! ( ftime ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FILINFO > ( ) ) ) . fattrib as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( FILINFO ) , "::" , stringify ! ( fattrib ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < FILINFO > ( ) ) ) . fname as * const _ as usize } , 9usize , concat ! ( "Offset of field: " , stringify ! ( FILINFO ) , "::" , stringify ! ( fname ) ) ) ; } # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum FRESULT { FR_OK = 0 , FR_DISK_ERR = 1 , FR_INT_ERR = 2 , FR_NOT_READY = 3 , FR_NO_FILE = 4 , FR_NO_PATH = 5 , FR_INVALID_NAME = 6 , FR_DENIED = 7 , FR_EXIST = 8 , FR_INVALID_OBJECT = 9 , FR_WRITE_PROTECTED = 10 , FR_INVALID_DRIVE = 11 , FR_NOT_ENABLED = 12 , FR_NO_FILESYSTEM = 13 , FR_MKFS_ABORTED = 14 , FR_TIMEOUT = 15 , FR_LOCKED = 16 , FR_NOT_ENOUGH_CORE = 17 , FR_TOO_MANY_OPEN_FILES = 18 , FR_INVALID_PARAMETER = 19 , } extern "C" { pub fn f_open ( fp : * mut FIL , path : * const TCHAR , mode : BYTE ) -> FRESULT ; } extern "C" { pub fn f_close ( fp : * mut FIL ) -> FRESULT ; } extern "C" { pub fn f_read ( fp : * mut FIL , buff : * mut :: std :: os :: raw :: c_void , btr : UINT , br : * mut UINT ) -> FRESULT ; } extern "C" { pub fn f_write ( fp : * mut FIL , buff : * const :: std :: os :: raw :: c_void , btw : UINT , bw : * mut UINT ) -> FRESULT ; } extern "C" { pub fn f_lseek ( fp : * mut FIL , ofs : FSIZE_t ) -> FRESULT ; } extern "C" { pub fn f_truncate ( fp : * mut FIL ) -> FRESULT ; } extern "C" { pub fn f_sync ( fp : * mut FIL ) -> FRESULT ; } extern "C" { pub fn f_opendir ( dp : * mut DIR , path : * const TCHAR ) -> FRESULT ; } extern "C" { pub fn f_closedir ( dp : * mut DIR ) -> FRESULT ; } extern "C" { pub fn f_readdir ( dp : * mut DIR , fno : * mut FILINFO ) -> FRESULT ; } extern "C" { pub fn f_findfirst ( dp : * mut DIR , fno : * mut FILINFO , path : * const TCHAR , pattern : * const TCHAR ) -> FRESULT ; } extern "C" { pub fn f_findnext ( dp : * mut DIR , fno : * mut FILINFO ) -> FRESULT ; } extern "C" { pub fn f_mkdir ( path : * const TCHAR ) -> FRESULT ; } extern "C" { pub fn f_unlink ( path : * const TCHAR ) -> FRESULT ; } extern "C" { pub fn f_rename ( path_old : * const TCHAR , path_new : * const TCHAR ) -> FRESULT ; } extern "C" { pub fn f_stat ( path : * const TCHAR , fno : * mut FILINFO ) -> FRESULT ; } extern "C" { pub fn f_chmod ( path : * const TCHAR , attr : BYTE , mask : BYTE ) -> FRESULT ; } extern "C" { pub fn f_utime ( path : * const TCHAR , fno : * const FILINFO ) -> FRESULT ; } extern "C" { pub fn f_chdir ( path : * const TCHAR ) -> FRESULT ; } extern "C" { pub fn f_chdrive ( path : * const TCHAR ) -> FRESULT ; } extern "C" { pub fn f_getcwd ( buff : * mut TCHAR , len : UINT ) -> FRESULT ; } extern "C" { pub fn f_getfree ( path : * const TCHAR , nclst : * mut DWORD , fatfs : * mut * mut FATFS ) -> FRESULT ; } extern "C" { pub fn f_getlabel ( path : * const TCHAR , label : * mut TCHAR , vsn : * mut DWORD ) -> FRESULT ; } extern "C" { pub fn f_setlabel ( label : * const TCHAR ) -> FRESULT ; } extern "C" { pub fn f_forward ( fp : * mut FIL , func : :: std :: option :: Option < unsafe extern "C" fn ( fp : * const BYTE , func : UINT ) -> UINT > , btf : UINT , bf : * mut UINT ) -> FRESULT ; } extern "C" { pub fn f_expand ( fp : * mut FIL , szf : FSIZE_t , opt : BYTE ) -> FRESULT ; } extern "C" { pub fn f_mount ( fs : * mut FATFS , path : * const TCHAR , opt : BYTE ) -> FRESULT ; } extern "C" { pub fn f_mkfs ( path : * const TCHAR , opt : BYTE , au : DWORD , work : * mut :: std :: os :: raw :: c_void , len : UINT ) -> FRESULT ; } extern "C" { pub fn f_fdisk ( pdrv : BYTE , szt : * const DWORD , work : * mut :: std :: os :: raw :: c_void ) -> FRESULT ; } extern "C" { pub fn f_setcp ( cp : WORD ) -> FRESULT ; } extern "C" { pub fn f_putc ( c : TCHAR , fp : * mut FIL ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn f_puts ( str : * const TCHAR , cp : * mut FIL ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn f_printf ( fp : * mut FIL , str : * const TCHAR , ... ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn f_gets ( buff : * mut TCHAR , len : :: std :: os :: raw :: c_int , fp : * mut FIL ) -> * mut TCHAR ; } extern "C" { pub fn get_fattime ( ) -> DWORD ; }