pub const _STDINT_H: ::std::os::raw::c_uint = 1;
pub const _FEATURES_H: ::std::os::raw::c_uint = 1;
pub const _DEFAULT_SOURCE: ::std::os::raw::c_uint = 1;
pub const __USE_ISOC11: ::std::os::raw::c_uint = 1;
pub const __USE_ISOC99: ::std::os::raw::c_uint = 1;
pub const __USE_ISOC95: ::std::os::raw::c_uint = 1;
pub const __USE_POSIX_IMPLICITLY: ::std::os::raw::c_uint = 1;
pub const _POSIX_SOURCE: ::std::os::raw::c_uint = 1;
pub const _POSIX_C_SOURCE: ::std::os::raw::c_uint = 200809;
pub const __USE_POSIX: ::std::os::raw::c_uint = 1;
pub const __USE_POSIX2: ::std::os::raw::c_uint = 1;
pub const __USE_POSIX199309: ::std::os::raw::c_uint = 1;
pub const __USE_POSIX199506: ::std::os::raw::c_uint = 1;
pub const __USE_XOPEN2K: ::std::os::raw::c_uint = 1;
pub const __USE_XOPEN2K8: ::std::os::raw::c_uint = 1;
pub const _ATFILE_SOURCE: ::std::os::raw::c_uint = 1;
pub const __USE_MISC: ::std::os::raw::c_uint = 1;
pub const __USE_ATFILE: ::std::os::raw::c_uint = 1;
pub const __USE_FORTIFY_LEVEL: ::std::os::raw::c_uint = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: ::std::os::raw::c_uint = 0;
pub const _STDC_PREDEF_H: ::std::os::raw::c_uint = 1;
pub const __STDC_IEC_559__: ::std::os::raw::c_uint = 1;
pub const __STDC_IEC_559_COMPLEX__: ::std::os::raw::c_uint = 1;
pub const __STDC_ISO_10646__: ::std::os::raw::c_uint = 201706;
pub const __STDC_NO_THREADS__: ::std::os::raw::c_uint = 1;
pub const __GNU_LIBRARY__: ::std::os::raw::c_uint = 6;
pub const __GLIBC__: ::std::os::raw::c_uint = 2;
pub const __GLIBC_MINOR__: ::std::os::raw::c_uint = 27;
pub const _SYS_CDEFS_H: ::std::os::raw::c_uint = 1;
pub const __glibc_c99_flexarr_available: ::std::os::raw::c_uint = 1;
pub const __WORDSIZE: ::std::os::raw::c_uint = 64;
pub const __WORDSIZE_TIME64_COMPAT32: ::std::os::raw::c_uint = 1;
pub const __SYSCALL_WORDSIZE: ::std::os::raw::c_uint = 64;
pub const __HAVE_GENERIC_SELECTION: ::std::os::raw::c_uint = 1;
pub const __GLIBC_USE_LIB_EXT2: ::std::os::raw::c_uint = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: ::std::os::raw::c_uint = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: ::std::os::raw::c_uint = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: ::std::os::raw::c_uint = 0;
pub const _BITS_TYPES_H: ::std::os::raw::c_uint = 1;
pub const _BITS_TYPESIZES_H: ::std::os::raw::c_uint = 1;
pub const __OFF_T_MATCHES_OFF64_T: ::std::os::raw::c_uint = 1;
pub const __INO_T_MATCHES_INO64_T: ::std::os::raw::c_uint = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: ::std::os::raw::c_uint = 1;
pub const __FD_SETSIZE: ::std::os::raw::c_uint = 1024;
pub const _BITS_WCHAR_H: ::std::os::raw::c_uint = 1;
pub const _BITS_STDINT_INTN_H: ::std::os::raw::c_uint = 1;
pub const _BITS_STDINT_UINTN_H: ::std::os::raw::c_uint = 1;
pub const INT8_MIN: ::std::os::raw::c_int = -128;
pub const INT16_MIN: ::std::os::raw::c_int = -32768;
pub const INT32_MIN: ::std::os::raw::c_int = -2147483648;
pub const INT8_MAX: ::std::os::raw::c_uint = 127;
pub const INT16_MAX: ::std::os::raw::c_uint = 32767;
pub const INT32_MAX: ::std::os::raw::c_uint = 2147483647;
pub const UINT8_MAX: ::std::os::raw::c_uint = 255;
pub const UINT16_MAX: ::std::os::raw::c_uint = 65535;
pub const UINT32_MAX: ::std::os::raw::c_uint = 4294967295;
pub const INT_LEAST8_MIN: ::std::os::raw::c_int = -128;
pub const INT_LEAST16_MIN: ::std::os::raw::c_int = -32768;
pub const INT_LEAST32_MIN: ::std::os::raw::c_int = -2147483648;
pub const INT_LEAST8_MAX: ::std::os::raw::c_uint = 127;
pub const INT_LEAST16_MAX: ::std::os::raw::c_uint = 32767;
pub const INT_LEAST32_MAX: ::std::os::raw::c_uint = 2147483647;
pub const UINT_LEAST8_MAX: ::std::os::raw::c_uint = 255;
pub const UINT_LEAST16_MAX: ::std::os::raw::c_uint = 65535;
pub const UINT_LEAST32_MAX: ::std::os::raw::c_uint = 4294967295;
pub const INT_FAST8_MIN: ::std::os::raw::c_int = -128;
pub const INT_FAST16_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
pub const INT_FAST32_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
pub const INT_FAST8_MAX: ::std::os::raw::c_uint = 127;
pub const INT_FAST16_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
pub const INT_FAST32_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
pub const UINT_FAST8_MAX: ::std::os::raw::c_uint = 255;
pub const UINT_FAST16_MAX: ::std::os::raw::c_int = -1;
pub const UINT_FAST32_MAX: ::std::os::raw::c_int = -1;
pub const INTPTR_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
pub const INTPTR_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
pub const UINTPTR_MAX: ::std::os::raw::c_int = -1;
pub const PTRDIFF_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
pub const PTRDIFF_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
pub const SIG_ATOMIC_MIN: ::std::os::raw::c_int = -2147483648;
pub const SIG_ATOMIC_MAX: ::std::os::raw::c_uint = 2147483647;
pub const SIZE_MAX: ::std::os::raw::c_int = -1;
pub const WINT_MIN: ::std::os::raw::c_uint = 0;
pub const WINT_MAX: ::std::os::raw::c_uint = 4294967295;
pub const RPI_HWVER_TYPE_UNKNOWN: ::std::os::raw::c_uint = 0;
pub const RPI_HWVER_TYPE_PI1: ::std::os::raw::c_uint = 1;
pub const RPI_HWVER_TYPE_PI2: ::std::os::raw::c_uint = 2;
pub const RPI_PWM_CHANNELS: ::std::os::raw::c_uint = 2;
pub const RPI_PWM_CTL_MSEN2: ::std::os::raw::c_uint = 32768;
pub const RPI_PWM_CTL_USEF2: ::std::os::raw::c_uint = 8192;
pub const RPI_PWM_CTL_POLA2: ::std::os::raw::c_uint = 4096;
pub const RPI_PWM_CTL_SBIT2: ::std::os::raw::c_uint = 2048;
pub const RPI_PWM_CTL_RPTL2: ::std::os::raw::c_uint = 1024;
pub const RPI_PWM_CTL_MODE2: ::std::os::raw::c_uint = 512;
pub const RPI_PWM_CTL_PWEN2: ::std::os::raw::c_uint = 256;
pub const RPI_PWM_CTL_MSEN1: ::std::os::raw::c_uint = 128;
pub const RPI_PWM_CTL_CLRF1: ::std::os::raw::c_uint = 64;
pub const RPI_PWM_CTL_USEF1: ::std::os::raw::c_uint = 32;
pub const RPI_PWM_CTL_POLA1: ::std::os::raw::c_uint = 16;
pub const RPI_PWM_CTL_SBIT1: ::std::os::raw::c_uint = 8;
pub const RPI_PWM_CTL_RPTL1: ::std::os::raw::c_uint = 4;
pub const RPI_PWM_CTL_MODE1: ::std::os::raw::c_uint = 2;
pub const RPI_PWM_CTL_PWEN1: ::std::os::raw::c_uint = 1;
pub const RPI_PWM_STA_STA4: ::std::os::raw::c_uint = 4096;
pub const RPI_PWM_STA_STA3: ::std::os::raw::c_uint = 2048;
pub const RPI_PWM_STA_STA2: ::std::os::raw::c_uint = 1024;
pub const RPI_PWM_STA_STA1: ::std::os::raw::c_uint = 512;
pub const RPI_PWM_STA_BERR: ::std::os::raw::c_uint = 256;
pub const RPI_PWM_STA_GAP04: ::std::os::raw::c_uint = 128;
pub const RPI_PWM_STA_GAP03: ::std::os::raw::c_uint = 64;
pub const RPI_PWM_STA_GAP02: ::std::os::raw::c_uint = 32;
pub const RPI_PWM_STA_GAP01: ::std::os::raw::c_uint = 16;
pub const RPI_PWM_STA_RERR1: ::std::os::raw::c_uint = 8;
pub const RPI_PWM_STA_WERR1: ::std::os::raw::c_uint = 4;
pub const RPI_PWM_STA_EMPT1: ::std::os::raw::c_uint = 2;
pub const RPI_PWM_STA_FULL1: ::std::os::raw::c_uint = 1;
pub const RPI_PWM_DMAC_ENAB: ::std::os::raw::c_uint = 2147483648;
pub const PWM_OFFSET: ::std::os::raw::c_uint = 2146304;
pub const PWM_PERIPH_PHYS: ::std::os::raw::c_uint = 2116075520;
pub const WS2811_TARGET_FREQ: ::std::os::raw::c_uint = 800000;
pub const SK6812_STRIP_RGBW: ::std::os::raw::c_uint = 403703808;
pub const SK6812_STRIP_RBGW: ::std::os::raw::c_uint = 403701768;
pub const SK6812_STRIP_GRBW: ::std::os::raw::c_uint = 403181568;
pub const SK6812_STRIP_GBRW: ::std::os::raw::c_uint = 403177488;
pub const SK6812_STRIP_BRGW: ::std::os::raw::c_uint = 402657288;
pub const SK6812_STRIP_BGRW: ::std::os::raw::c_uint = 402655248;
pub const SK6812_SHIFT_WMASK: ::std::os::raw::c_uint = 4026531840;
pub const WS2811_STRIP_RGB: ::std::os::raw::c_uint = 1050624;
pub const WS2811_STRIP_RBG: ::std::os::raw::c_uint = 1048584;
pub const WS2811_STRIP_GRB: ::std::os::raw::c_uint = 528384;
pub const WS2811_STRIP_GBR: ::std::os::raw::c_uint = 524304;
pub const WS2811_STRIP_BRG: ::std::os::raw::c_uint = 4104;
pub const WS2811_STRIP_BGR: ::std::os::raw::c_uint = 2064;
pub const WS2812_STRIP: ::std::os::raw::c_uint = 528384;
pub const SK6812_STRIP: ::std::os::raw::c_uint = 528384;
pub const SK6812W_STRIP: ::std::os::raw::c_uint = 403181568;
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, Copy)]
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 {
& ( * ( 0 as * const __fsid_t ) ) . __val as * const _ as
usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( __fsid_t ) , "::" ,
stringify ! ( __val ) ));
}
impl Clone for __fsid_t {
fn clone(&self) -> Self { *self }
}
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;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct rpi_hw_t {
pub type_: u32,
pub hwver: u32,
pub periph_base: u32,
pub videocore_base: u32,
pub desc: *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_rpi_hw_t() {
assert_eq!(::std::mem::size_of::<rpi_hw_t>() , 24usize , concat ! (
"Size of: " , stringify ! ( rpi_hw_t ) ));
assert_eq! (::std::mem::align_of::<rpi_hw_t>() , 8usize , concat ! (
"Alignment of " , stringify ! ( rpi_hw_t ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rpi_hw_t ) ) . type_ as * const _ as
usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( rpi_hw_t ) , "::" ,
stringify ! ( type_ ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rpi_hw_t ) ) . hwver as * const _ as
usize } , 4usize , concat ! (
"Alignment of field: " , stringify ! ( rpi_hw_t ) , "::" ,
stringify ! ( hwver ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rpi_hw_t ) ) . periph_base as * const _
as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( rpi_hw_t ) , "::" ,
stringify ! ( periph_base ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rpi_hw_t ) ) . videocore_base as * const
_ as usize } , 12usize , concat ! (
"Alignment of field: " , stringify ! ( rpi_hw_t ) , "::" ,
stringify ! ( videocore_base ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const rpi_hw_t ) ) . desc as * const _ as usize
} , 16usize , concat ! (
"Alignment of field: " , stringify ! ( rpi_hw_t ) , "::" ,
stringify ! ( desc ) ));
}
impl Clone for rpi_hw_t {
fn clone(&self) -> Self { *self }
}
extern "C" {
pub fn rpi_hw_detect() -> *const rpi_hw_t;
}
#[repr(C, packed)]
#[derive(Debug, Copy)]
pub struct pwm_t {
pub ctl: u32,
pub sta: u32,
pub dmac: u32,
pub resvd_0x0c: u32,
pub rng1: u32,
pub dat1: u32,
pub fif1: u32,
pub resvd_0x1c: u32,
pub rng2: u32,
pub dat2: u32,
}
#[test]
fn bindgen_test_layout_pwm_t() {
assert_eq!(::std::mem::size_of::<pwm_t>() , 40usize , concat ! (
"Size of: " , stringify ! ( pwm_t ) ));
assert_eq! (::std::mem::align_of::<pwm_t>() , 4usize , concat ! (
"Alignment of " , stringify ! ( pwm_t ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . ctl as * const _ as usize } ,
0usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( ctl ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . sta as * const _ as usize } ,
4usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( sta ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . dmac as * const _ as usize }
, 8usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( dmac ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . resvd_0x0c as * const _ as
usize } , 12usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( resvd_0x0c ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . rng1 as * const _ as usize }
, 16usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( rng1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . dat1 as * const _ as usize }
, 20usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( dat1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . fif1 as * const _ as usize }
, 24usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( fif1 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . resvd_0x1c as * const _ as
usize } , 28usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( resvd_0x1c ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . rng2 as * const _ as usize }
, 32usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( rng2 ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_t ) ) . dat2 as * const _ as usize }
, 36usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_t ) , "::" ,
stringify ! ( dat2 ) ));
}
impl Clone for pwm_t {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct pwm_pin_table_t {
pub pinnum: ::std::os::raw::c_int,
pub altnum: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_pwm_pin_table_t() {
assert_eq!(::std::mem::size_of::<pwm_pin_table_t>() , 8usize , concat ! (
"Size of: " , stringify ! ( pwm_pin_table_t ) ));
assert_eq! (::std::mem::align_of::<pwm_pin_table_t>() , 4usize , concat !
( "Alignment of " , stringify ! ( pwm_pin_table_t ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_pin_table_t ) ) . pinnum as * const _
as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_pin_table_t ) ,
"::" , stringify ! ( pinnum ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_pin_table_t ) ) . altnum as * const _
as usize } , 4usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_pin_table_t ) ,
"::" , stringify ! ( altnum ) ));
}
impl Clone for pwm_pin_table_t {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct pwm_pin_tables_t {
pub count: ::std::os::raw::c_int,
pub pins: *const pwm_pin_table_t,
}
#[test]
fn bindgen_test_layout_pwm_pin_tables_t() {
assert_eq!(::std::mem::size_of::<pwm_pin_tables_t>() , 16usize , concat !
( "Size of: " , stringify ! ( pwm_pin_tables_t ) ));
assert_eq! (::std::mem::align_of::<pwm_pin_tables_t>() , 8usize , concat !
( "Alignment of " , stringify ! ( pwm_pin_tables_t ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_pin_tables_t ) ) . count as * const _
as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_pin_tables_t ) ,
"::" , stringify ! ( count ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const pwm_pin_tables_t ) ) . pins as * const _
as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( pwm_pin_tables_t ) ,
"::" , stringify ! ( pins ) ));
}
impl Clone for pwm_pin_tables_t {
fn clone(&self) -> Self { *self }
}
extern "C" {
pub fn pwm_pin_alt(chan: ::std::os::raw::c_int,
pinnum: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ws2811_device {
_unused: [u8; 0],
}
pub type ws2811_led_t = u32;
#[repr(C)]
#[derive(Debug, Copy)]
pub struct ws2811_channel_t {
pub gpionum: ::std::os::raw::c_int,
pub invert: ::std::os::raw::c_int,
pub count: ::std::os::raw::c_int,
pub strip_type: ::std::os::raw::c_int,
pub leds: *mut ws2811_led_t,
pub brightness: u8,
pub wshift: u8,
pub rshift: u8,
pub gshift: u8,
pub bshift: u8,
pub gamma: *mut u8,
}
#[test]
fn bindgen_test_layout_ws2811_channel_t() {
assert_eq!(::std::mem::size_of::<ws2811_channel_t>() , 40usize , concat !
( "Size of: " , stringify ! ( ws2811_channel_t ) ));
assert_eq! (::std::mem::align_of::<ws2811_channel_t>() , 8usize , concat !
( "Alignment of " , stringify ! ( ws2811_channel_t ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . gpionum as * const
_ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( gpionum ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . invert as * const
_ as usize } , 4usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( invert ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . count as * const _
as usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( count ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . strip_type as *
const _ as usize } , 12usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( strip_type ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . leds as * const _
as usize } , 16usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( leds ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . brightness as *
const _ as usize } , 24usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( brightness ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . wshift as * const
_ as usize } , 25usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( wshift ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . rshift as * const
_ as usize } , 26usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( rshift ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . gshift as * const
_ as usize } , 27usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( gshift ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . bshift as * const
_ as usize } , 28usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( bshift ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_channel_t ) ) . gamma as * const _
as usize } , 32usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_channel_t ) ,
"::" , stringify ! ( gamma ) ));
}
impl Clone for ws2811_channel_t {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
#[derive(Debug, Copy)]
pub struct ws2811_t {
pub render_wait_time: u64,
pub device: *mut ws2811_device,
pub rpi_hw: *const rpi_hw_t,
pub freq: u32,
pub dmanum: ::std::os::raw::c_int,
pub channel: [ws2811_channel_t; 2usize],
}
#[test]
fn bindgen_test_layout_ws2811_t() {
assert_eq!(::std::mem::size_of::<ws2811_t>() , 112usize , concat ! (
"Size of: " , stringify ! ( ws2811_t ) ));
assert_eq! (::std::mem::align_of::<ws2811_t>() , 8usize , concat ! (
"Alignment of " , stringify ! ( ws2811_t ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_t ) ) . render_wait_time as *
const _ as usize } , 0usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_t ) , "::" ,
stringify ! ( render_wait_time ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_t ) ) . device as * const _ as
usize } , 8usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_t ) , "::" ,
stringify ! ( device ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_t ) ) . rpi_hw as * const _ as
usize } , 16usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_t ) , "::" ,
stringify ! ( rpi_hw ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_t ) ) . freq as * const _ as usize
} , 24usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_t ) , "::" ,
stringify ! ( freq ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_t ) ) . dmanum as * const _ as
usize } , 28usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_t ) , "::" ,
stringify ! ( dmanum ) ));
assert_eq! (unsafe {
& ( * ( 0 as * const ws2811_t ) ) . channel as * const _ as
usize } , 32usize , concat ! (
"Alignment of field: " , stringify ! ( ws2811_t ) , "::" ,
stringify ! ( channel ) ));
}
impl Clone for ws2811_t {
fn clone(&self) -> Self { *self }
}
pub const ws2811_return_t_WS2811_RETURN_STATE_COUNT: ws2811_return_t =
ws2811_return_t::WS2811_ERROR_SPI_SETUP;
#[repr(i32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ws2811_return_t {
WS2811_SUCCESS = 0,
WS2811_ERROR_GENERIC = -1,
WS2811_ERROR_OUT_OF_MEMORY = -2,
WS2811_ERROR_HW_NOT_SUPPORTED = -3,
WS2811_ERROR_MEM_LOCK = -4,
WS2811_ERROR_MMAP = -5,
WS2811_ERROR_MAP_REGISTERS = -6,
WS2811_ERROR_GPIO_INIT = -7,
WS2811_ERROR_PWM_SETUP = -8,
WS2811_ERROR_MAILBOX_DEVICE = -9,
WS2811_ERROR_DMA = -10,
WS2811_ERROR_ILLEGAL_GPIO = -11,
WS2811_ERROR_PCM_SETUP = -12,
WS2811_ERROR_SPI_SETUP = -13,
WS2811_ERROR_SPI_TRANSFER = -14,
}
extern "C" {
pub fn ws2811_init(ws2811: *mut ws2811_t) -> ws2811_return_t;
}
extern "C" {
pub fn ws2811_fini(ws2811: *mut ws2811_t);
}
extern "C" {
pub fn ws2811_render(ws2811: *mut ws2811_t) -> ws2811_return_t;
}
extern "C" {
pub fn ws2811_wait(ws2811: *mut ws2811_t) -> ws2811_return_t;
}
extern "C" {
pub fn ws2811_get_return_t_str(state: ws2811_return_t)
-> *const ::std::os::raw::c_char;
}