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

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 _ERRNO_H : u32 = 1 ; pub const _BITS_ERRNO_H : u32 = 1 ; pub const EPERM : u32 = 1 ; pub const ENOENT : u32 = 2 ; pub const ESRCH : u32 = 3 ; pub const EINTR : u32 = 4 ; pub const EIO : u32 = 5 ; pub const ENXIO : u32 = 6 ; pub const E2BIG : u32 = 7 ; pub const ENOEXEC : u32 = 8 ; pub const EBADF : u32 = 9 ; pub const ECHILD : u32 = 10 ; pub const EAGAIN : u32 = 11 ; pub const ENOMEM : u32 = 12 ; pub const EACCES : u32 = 13 ; pub const EFAULT : u32 = 14 ; pub const ENOTBLK : u32 = 15 ; pub const EBUSY : u32 = 16 ; pub const EEXIST : u32 = 17 ; pub const EXDEV : u32 = 18 ; pub const ENODEV : u32 = 19 ; pub const ENOTDIR : u32 = 20 ; pub const EISDIR : u32 = 21 ; pub const EINVAL : u32 = 22 ; pub const ENFILE : u32 = 23 ; pub const EMFILE : u32 = 24 ; pub const ENOTTY : u32 = 25 ; pub const ETXTBSY : u32 = 26 ; pub const EFBIG : u32 = 27 ; pub const ENOSPC : u32 = 28 ; pub const ESPIPE : u32 = 29 ; pub const EROFS : u32 = 30 ; pub const EMLINK : u32 = 31 ; pub const EPIPE : u32 = 32 ; pub const EDOM : u32 = 33 ; pub const ERANGE : u32 = 34 ; pub const EDEADLK : u32 = 35 ; pub const ENAMETOOLONG : u32 = 36 ; pub const ENOLCK : u32 = 37 ; pub const ENOSYS : u32 = 38 ; pub const ENOTEMPTY : u32 = 39 ; pub const ELOOP : u32 = 40 ; pub const EWOULDBLOCK : u32 = 11 ; pub const ENOMSG : u32 = 42 ; pub const EIDRM : u32 = 43 ; pub const ECHRNG : u32 = 44 ; pub const EL2NSYNC : u32 = 45 ; pub const EL3HLT : u32 = 46 ; pub const EL3RST : u32 = 47 ; pub const ELNRNG : u32 = 48 ; pub const EUNATCH : u32 = 49 ; pub const ENOCSI : u32 = 50 ; pub const EL2HLT : u32 = 51 ; pub const EBADE : u32 = 52 ; pub const EBADR : u32 = 53 ; pub const EXFULL : u32 = 54 ; pub const ENOANO : u32 = 55 ; pub const EBADRQC : u32 = 56 ; pub const EBADSLT : u32 = 57 ; pub const EDEADLOCK : u32 = 35 ; pub const EBFONT : u32 = 59 ; pub const ENOSTR : u32 = 60 ; pub const ENODATA : u32 = 61 ; pub const ETIME : u32 = 62 ; pub const ENOSR : u32 = 63 ; pub const ENONET : u32 = 64 ; pub const ENOPKG : u32 = 65 ; pub const EREMOTE : u32 = 66 ; pub const ENOLINK : u32 = 67 ; pub const EADV : u32 = 68 ; pub const ESRMNT : u32 = 69 ; pub const ECOMM : u32 = 70 ; pub const EPROTO : u32 = 71 ; pub const EMULTIHOP : u32 = 72 ; pub const EDOTDOT : u32 = 73 ; pub const EBADMSG : u32 = 74 ; pub const EOVERFLOW : u32 = 75 ; pub const ENOTUNIQ : u32 = 76 ; pub const EBADFD : u32 = 77 ; pub const EREMCHG : u32 = 78 ; pub const ELIBACC : u32 = 79 ; pub const ELIBBAD : u32 = 80 ; pub const ELIBSCN : u32 = 81 ; pub const ELIBMAX : u32 = 82 ; pub const ELIBEXEC : u32 = 83 ; pub const EILSEQ : u32 = 84 ; pub const ERESTART : u32 = 85 ; pub const ESTRPIPE : u32 = 86 ; pub const EUSERS : u32 = 87 ; pub const ENOTSOCK : u32 = 88 ; pub const EDESTADDRREQ : u32 = 89 ; pub const EMSGSIZE : u32 = 90 ; pub const EPROTOTYPE : u32 = 91 ; pub const ENOPROTOOPT : u32 = 92 ; pub const EPROTONOSUPPORT : u32 = 93 ; pub const ESOCKTNOSUPPORT : u32 = 94 ; pub const EOPNOTSUPP : u32 = 95 ; pub const EPFNOSUPPORT : u32 = 96 ; pub const EAFNOSUPPORT : u32 = 97 ; pub const EADDRINUSE : u32 = 98 ; pub const EADDRNOTAVAIL : u32 = 99 ; pub const ENETDOWN : u32 = 100 ; pub const ENETUNREACH : u32 = 101 ; pub const ENETRESET : u32 = 102 ; pub const ECONNABORTED : u32 = 103 ; pub const ECONNRESET : u32 = 104 ; pub const ENOBUFS : u32 = 105 ; pub const EISCONN : u32 = 106 ; pub const ENOTCONN : u32 = 107 ; pub const ESHUTDOWN : u32 = 108 ; pub const ETOOMANYREFS : u32 = 109 ; pub const ETIMEDOUT : u32 = 110 ; pub const ECONNREFUSED : u32 = 111 ; pub const EHOSTDOWN : u32 = 112 ; pub const EHOSTUNREACH : u32 = 113 ; pub const EALREADY : u32 = 114 ; pub const EINPROGRESS : u32 = 115 ; pub const ESTALE : u32 = 116 ; pub const EUCLEAN : u32 = 117 ; pub const ENOTNAM : u32 = 118 ; pub const ENAVAIL : u32 = 119 ; pub const EISNAM : u32 = 120 ; pub const EREMOTEIO : u32 = 121 ; pub const EDQUOT : u32 = 122 ; pub const ENOMEDIUM : u32 = 123 ; pub const EMEDIUMTYPE : u32 = 124 ; pub const ECANCELED : u32 = 125 ; pub const ENOKEY : u32 = 126 ; pub const EKEYEXPIRED : u32 = 127 ; pub const EKEYREVOKED : u32 = 128 ; pub const EKEYREJECTED : u32 = 129 ; pub const EOWNERDEAD : u32 = 130 ; pub const ENOTRECOVERABLE : u32 = 131 ; pub const ERFKILL : u32 = 132 ; pub const EHWPOISON : u32 = 133 ; pub const ENOTSUP : u32 = 95 ; pub const true_ : u32 = 1 ; pub const false_ : u32 = 0 ; pub const __bool_true_false_are_defined : u32 = 1 ; pub const API_SYSTEM_EXIT : u32 = 1 ; pub const API_SYSTEM_EXEC : u32 = 2 ; pub const API_SYSTEM_RESET : u32 = 3 ; pub const API_BATTERY_VOLTAGE : u32 = 4 ; pub const API_INTERRUPT_ENABLE : u32 = 10 ; pub const API_INTERRUPT_DISABLE : u32 = 11 ; pub const API_UART_WRITE_STR : u32 = 16 ; pub const API_UART_READ_CHAR : u32 = 17 ; pub const API_UART_READ_STR : u32 = 18 ; pub const API_STREAM_READ : u32 = 31 ; pub const API_DISP_OPEN : u32 = 32 ; pub const API_DISP_CLOSE : u32 = 33 ; pub const API_DISP_PRINT : u32 = 34 ; pub const API_DISP_CLEAR : u32 = 35 ; pub const API_DISP_UPDATE : u32 = 36 ; pub const API_DISP_LINE : u32 = 37 ; pub const API_DISP_RECT : u32 = 38 ; pub const API_DISP_CIRC : u32 = 39 ; pub const API_DISP_PIXEL : u32 = 40 ; pub const API_DISP_FRAMEBUFFER : u32 = 41 ; pub const API_DISP_BACKLIGHT : u32 = 42 ; pub const API_DISP_PRINT_ADV : u32 = 43 ; pub const API_BATTERY_CURRENT : u32 = 49 ; pub const API_CHARGEIN_VOLTAGE : u32 = 50 ; pub const API_CHARGEIN_CURRENT : u32 = 51 ; pub const API_SYSTEM_VOLTAGE : u32 = 52 ; pub const API_THERMISTOR_VOLTAGE : u32 = 53 ; pub const API_FILE_OPEN : u32 = 64 ; pub const API_FILE_CLOSE : u32 = 65 ; pub const API_FILE_READ : u32 = 66 ; pub const API_FILE_WRITE : u32 = 68 ; pub const API_FILE_FLUSH : u32 = 69 ; pub const API_FILE_SEEK : u32 = 70 ; pub const API_FILE_TELL : u32 = 71 ; pub const API_FILE_STAT : u32 = 72 ; pub const API_FILE_OPENDIR : u32 = 73 ; pub const API_FILE_READDIR : u32 = 74 ; pub const API_FILE_UNLINK : u32 = 75 ; pub const API_FILE_RENAME : u32 = 76 ; pub const API_FILE_MKDIR : u32 = 77 ; pub const API_RTC_GET_SECONDS : u32 = 80 ; pub const API_RTC_SCHEDULE_ALARM : u32 = 81 ; pub const API_RTC_SET_MILLISECONDS : u32 = 82 ; pub const API_RTC_GET_MILLISECONDS : u32 = 83 ; pub const API_LEDS_SET : u32 = 96 ; pub const API_LEDS_SET_HSV : u32 = 97 ; pub const API_LEDS_PREP : u32 = 98 ; pub const API_LEDS_PREP_HSV : u32 = 99 ; pub const API_LEDS_UPDATE : u32 = 100 ; pub const API_LEDS_SET_POWERSAVE : u32 = 101 ; pub const API_LEDS_SET_ROCKET : u32 = 102 ; pub const API_LEDS_SET_FLASHLIGHT : u32 = 103 ; pub const API_LEDS_DIM_TOP : u32 = 104 ; pub const API_LEDS_DIM_BOTTOM : u32 = 105 ; pub const API_LEDS_SET_ALL : u32 = 106 ; pub const API_LEDS_SET_ALL_HSV : u32 = 107 ; pub const API_LEDS_SET_GAMMA_TABLE : u32 = 108 ; pub const API_LEDS_CLEAR_ALL : u32 = 109 ; pub const API_LEDS_GET_ROCKET : u32 = 110 ; pub const API_LEDS_GET : u32 = 111 ; pub const API_VIBRA_SET : u32 = 112 ; pub const API_VIBRA_VIBRATE : u32 = 113 ; pub const API_LIGHT_SENSOR_RUN : u32 = 128 ; pub const API_LIGHT_SENSOR_GET : u32 = 129 ; pub const API_LIGHT_SENSOR_STOP : u32 = 130 ; pub const API_LIGHT_SENSOR_READ : u32 = 131 ; pub const API_BUTTONS_READ : u32 = 144 ; pub const API_GPIO_SET_PIN_MODE : u32 = 160 ; pub const API_GPIO_GET_PIN_MODE : u32 = 161 ; pub const API_GPIO_WRITE_PIN : u32 = 162 ; pub const API_GPIO_READ_PIN : u32 = 163 ; pub const API_TRNG_READ : u32 = 176 ; pub const API_PERSONAL_STATE_SET : u32 = 192 ; pub const API_PERSONAL_STATE_GET : u32 = 193 ; pub const API_PERSONAL_STATE_IS_PERSISTENT : u32 = 194 ; pub const API_BME680_INIT : u32 = 208 ; pub const API_BME680_DEINIT : u32 = 209 ; pub const API_BME680_GET_DATA : u32 = 210 ; pub const API_BHI160_ENABLE : u32 = 224 ; pub const API_BHI160_DISABLE : u32 = 225 ; pub const API_BHI160_DISABLE_ALL : u32 = 226 ; pub const API_MAX30001_ENABLE : u32 = 240 ; pub const API_MAX30001_DISABLE : u32 = 241 ; pub const API_MAX86150_INIT : u32 = 256 ; pub const API_MAX86150_GET_DATA : u32 = 257 ; pub const API_MAX86150_SET_LED_AMPLITUDE : u32 = 258 ; pub const API_USB_SHUTDOWN : u32 = 272 ; pub const API_USB_STORAGE : u32 = 273 ; pub const API_USB_CDCACM : u32 = 274 ; pub const API_WS2812_WRITE : u32 = 288 ; pub const EPIC_INT_RESET : u32 = 0 ; pub const EPIC_INT_CTRL_C : u32 = 1 ; pub const EPIC_INT_UART_RX : u32 = 2 ; pub const EPIC_INT_RTC_ALARM : u32 = 3 ; pub const EPIC_INT_BHI160_ACCELEROMETER : u32 = 4 ; pub const EPIC_INT_BHI160_ORIENTATION : u32 = 5 ; pub const EPIC_INT_BHI160_GYROSCOPE : u32 = 6 ; pub const EPIC_INT_MAX30001_ECG : u32 = 7 ; pub const EPIC_INT_NUM : u32 = 8 ; pub const DISP_WIDTH : u32 = 160 ; pub const DISP_HEIGHT : u32 = 80 ; pub const EPICSTAT_MAX_PATH : u32 = 255 ; pub type __u_char = ctypes :: c_uchar ; pub type __u_short = ctypes :: c_ushort ; pub type __u_int = ctypes :: c_uint ; pub type __u_long = ctypes :: c_ulong ; pub type __int8_t = ctypes :: c_schar ; pub type __uint8_t = ctypes :: c_uchar ; pub type __int16_t = ctypes :: c_short ; pub type __uint16_t = ctypes :: c_ushort ; pub type __int32_t = ctypes :: c_int ; pub type __uint32_t = ctypes :: c_uint ; pub type __int64_t = ctypes :: c_long ; pub type __uint64_t = ctypes :: c_ulong ; pub type __quad_t = ctypes :: c_long ; pub type __u_quad_t = ctypes :: c_ulong ; pub type __intmax_t = ctypes :: c_long ; pub type __uintmax_t = ctypes :: c_ulong ; pub type __dev_t = ctypes :: c_ulong ; pub type __uid_t = ctypes :: c_uint ; pub type __gid_t = ctypes :: c_uint ; pub type __ino_t = ctypes :: c_ulong ; pub type __ino64_t = ctypes :: c_ulong ; pub type __mode_t = ctypes :: c_uint ; pub type __nlink_t = ctypes :: c_ulong ; pub type __off_t = ctypes :: c_long ; pub type __off64_t = ctypes :: c_long ; pub type __pid_t = ctypes :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __fsid_t { pub __val : [ ctypes :: c_int ; 2usize ] , } # [ test ] fn bindgen_test_layout___fsid_t ( ) { assert_eq ! ( :: core :: mem :: size_of :: < __fsid_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < __fsid_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < __fsid_t > ( ) ) ) . __val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __fsid_t ) , "::" , stringify ! ( __val ) ) ) ; } pub type __clock_t = ctypes :: c_long ; pub type __rlim_t = ctypes :: c_ulong ; pub type __rlim64_t = ctypes :: c_ulong ; pub type __id_t = ctypes :: c_uint ; pub type __time_t = ctypes :: c_long ; pub type __useconds_t = ctypes :: c_uint ; pub type __suseconds_t = ctypes :: c_long ; pub type __daddr_t = ctypes :: c_int ; pub type __key_t = ctypes :: c_int ; pub type __clockid_t = ctypes :: c_int ; pub type __timer_t = * mut ctypes :: c_void ; pub type __blksize_t = ctypes :: c_long ; pub type __blkcnt_t = ctypes :: c_long ; pub type __blkcnt64_t = ctypes :: c_long ; pub type __fsblkcnt_t = ctypes :: c_ulong ; pub type __fsblkcnt64_t = ctypes :: c_ulong ; pub type __fsfilcnt_t = ctypes :: c_ulong ; pub type __fsfilcnt64_t = ctypes :: c_ulong ; pub type __fsword_t = ctypes :: c_long ; pub type __ssize_t = ctypes :: c_long ; pub type __syscall_slong_t = ctypes :: c_long ; pub type __syscall_ulong_t = ctypes :: c_ulong ; pub type __loff_t = __off64_t ; pub type __caddr_t = * mut ctypes :: c_char ; pub type __intptr_t = ctypes :: c_long ; pub type __socklen_t = ctypes :: c_uint ; pub type __sig_atomic_t = ctypes :: c_int ; pub type int_least8_t = ctypes :: c_schar ; pub type int_least16_t = ctypes :: c_short ; pub type int_least32_t = ctypes :: c_int ; pub type int_least64_t = ctypes :: c_long ; pub type uint_least8_t = ctypes :: c_uchar ; pub type uint_least16_t = ctypes :: c_ushort ; pub type uint_least32_t = ctypes :: c_uint ; pub type uint_least64_t = ctypes :: c_ulong ; pub type int_fast8_t = ctypes :: c_schar ; pub type int_fast16_t = ctypes :: c_long ; pub type int_fast32_t = ctypes :: c_long ; pub type int_fast64_t = ctypes :: c_long ; pub type uint_fast8_t = ctypes :: c_uchar ; pub type uint_fast16_t = ctypes :: c_ulong ; pub type uint_fast32_t = ctypes :: c_ulong ; pub type uint_fast64_t = ctypes :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; extern "C" { pub fn __errno_location ( ) -> * mut ctypes :: c_int ; } pub type wchar_t = ctypes :: c_ushort ; pub type max_align_t = f64 ; pub type api_int_id_t = u32 ; extern "C" { pub fn epic_interrupt_enable ( int_id : api_int_id_t ) -> ctypes :: c_int ; } extern "C" { pub fn epic_interrupt_disable ( int_id : api_int_id_t ) -> ctypes :: c_int ; } extern "C" { pub fn __epic_isr_reset ( ) ; } extern "C" { # [ doc = " Stop execution of the current payload and return to the menu." ] # [ doc = "" ] # [ doc = " :param int ret:  Return code." ] # [ doc = " :return: :c:func:`epic_exit` will never return." ] pub fn epic_exit ( ret : ctypes :: c_int ) ; } extern "C" { pub fn __epic_exit ( ret : ctypes :: c_int ) ; } extern "C" { # [ doc = " Stop execution of the current payload and immediately start another payload." ] # [ doc = "" ] # [ doc = " :param char* name: Name (path) of the new payload to start.  This can either" ] # [ doc = "    be:" ] # [ doc = "" ] # [ doc = "    - A path to an ``.elf`` file (l0dable)." ] # [ doc = "    - A path to a ``.py`` file (will be loaded using Pycardium)." ] # [ doc = "    - A path to a directory (assumed to be a Python module, execution starts" ] # [ doc = "      with ``__init__.py`` in this folder)." ] # [ doc = "" ] # [ doc = " :return: :c:func:`epic_exec` will only return in case loading went wrong." ] # [ doc = "    The following error codes can be returned:" ] # [ doc = "" ] # [ doc = "    - ``-ENOENT``: File not found." ] # [ doc = "    - ``-ENOEXEC``: File not a loadable format." ] pub fn epic_exec ( name : * mut ctypes :: c_char ) -> ctypes :: c_int ; } extern "C" { pub fn __epic_exec ( name : * mut ctypes :: c_char ) -> ctypes :: c_int ; } extern "C" { pub fn epic_system_reset ( ) ; } extern "C" { pub fn epic_read_battery_voltage ( result : * mut f32 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_read_battery_current ( result : * mut f32 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_read_chargein_voltage ( result : * mut f32 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_read_chargein_current ( result : * mut f32 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_read_system_voltage ( result : * mut f32 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_read_thermistor_voltage ( result : * mut f32 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_uart_write_str ( str : * const ctypes :: c_char , length : isize ) ; } extern "C" { pub fn epic_uart_read_char ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_uart_read_str ( buf : * mut ctypes :: c_char , cnt : usize ) -> ctypes :: c_int ; } extern "C" { pub fn epic_isr_uart_rx ( ) ; } extern "C" { pub fn epic_isr_ctrl_c ( ) ; } # [ doc = " ``1``, Bottom left button (bit 0)." ] pub const epic_button_BUTTON_LEFT_BOTTOM : epic_button = 1 ; # [ doc = " ``2``, Bottom right button (bit 1)." ] pub const epic_button_BUTTON_RIGHT_BOTTOM : epic_button = 2 ; # [ doc = " ``4``, Top right button (bit 2)." ] pub const epic_button_BUTTON_RIGHT_TOP : epic_button = 4 ; # [ doc = " ``8``, Top left (power) button (bit 3)." ] pub const epic_button_BUTTON_LEFT_TOP : epic_button = 8 ; # [ doc = " ``8``, Top left (power) button (bit 3)." ] pub const epic_button_BUTTON_RESET : epic_button = 8 ; # [ doc = " Button IDs" ] pub type epic_button = i32 ; extern "C" { pub fn epic_buttons_read ( mask : u8 ) -> u8 ; } # [ doc = " ``1``, Wristband connector 1" ] pub const gpio_pin_EPIC_GPIO_WRISTBAND_1 : gpio_pin = 1 ; # [ doc = " ``2``, Wristband connector 2" ] pub const gpio_pin_EPIC_GPIO_WRISTBAND_2 : gpio_pin = 2 ; # [ doc = " ``3``, Wristband connector 3" ] pub const gpio_pin_EPIC_GPIO_WRISTBAND_3 : gpio_pin = 3 ; # [ doc = " ``4``, Wristband connector 4" ] pub const gpio_pin_EPIC_GPIO_WRISTBAND_4 : gpio_pin = 4 ; # [ doc = " GPIO pins IDs" ] pub type gpio_pin = i32 ; # [ doc = " Configure the pin as input" ] pub const gpio_mode_EPIC_GPIO_MODE_IN : gpio_mode = 1 ; # [ doc = " Configure the pin as output" ] pub const gpio_mode_EPIC_GPIO_MODE_OUT : gpio_mode = 2 ; # [ doc = " Configure the pin as output" ] pub const gpio_mode_EPIC_GPIO_MODE_ADC : gpio_mode = 4 ; # [ doc = " Enable the internal pull-up resistor" ] pub const gpio_mode_EPIC_GPIO_PULL_UP : gpio_mode = 64 ; # [ doc = " Enable the internal pull-down resistor" ] pub const gpio_mode_EPIC_GPIO_PULL_DOWN : gpio_mode = 128 ; # [ doc = " GPIO pin modes" ] pub type gpio_mode = i32 ; extern "C" { pub fn epic_gpio_set_pin_mode ( pin : u8 , mode : u8 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_gpio_get_pin_mode ( pin : u8 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_gpio_write_pin ( pin : u8 , on : bool ) -> ctypes :: c_int ; } extern "C" { pub fn epic_gpio_read_pin ( pin : u8 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_leds_set ( led : ctypes :: c_int , r : u8 , g : u8 , b : u8 ) ; } extern "C" { pub fn epic_leds_get_rgb ( led : ctypes :: c_int , rgb : * mut u8 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_leds_set_hsv ( led : ctypes :: c_int , h : f32 , s : f32 , v : f32 ) ; } extern "C" { pub fn epic_leds_set_all ( pattern : * mut u8 , len : u8 ) ; } extern "C" { pub fn epic_leds_set_all_hsv ( pattern : * mut f32 , len : u8 ) ; } extern "C" { pub fn epic_leds_prep ( led : ctypes :: c_int , r : u8 , g : u8 , b : u8 ) ; } extern "C" { pub fn epic_leds_prep_hsv ( led : ctypes :: c_int , h : f32 , s : f32 , v : f32 ) ; } extern "C" { pub fn epic_leds_dim_bottom ( value : u8 ) ; } extern "C" { pub fn epic_leds_dim_top ( value : u8 ) ; } extern "C" { pub fn epic_leds_set_powersave ( eco : bool ) ; } extern "C" { pub fn epic_leds_update ( ) ; } extern "C" { pub fn epic_leds_set_rocket ( led : ctypes :: c_int , value : u8 ) ; } extern "C" { pub fn epic_leds_get_rocket ( led : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { pub fn epic_set_flashlight ( power : bool ) ; } extern "C" { pub fn epic_leds_set_gamma_table ( rgb_channel : u8 , gamma_table : * mut u8 ) ; } extern "C" { pub fn epic_leds_clear_all ( r : u8 , g : u8 , b : u8 ) ; } # [ doc = " BME680 Sensor Data" ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct bme680_sensor_data { # [ doc = " Temperature in degree celsius" ] pub temperature : f32 , # [ doc = " Humidity in % relative humidity" ] pub humidity : f32 , # [ doc = " Pressure in hPa" ] pub pressure : f32 , # [ doc = " Gas resistance in Ohms" ] pub gas_resistance : f32 , } # [ test ] fn bindgen_test_layout_bme680_sensor_data ( ) { assert_eq ! ( :: core :: mem :: size_of :: < bme680_sensor_data > ( ) , 16usize , concat ! ( "Size of: " , stringify ! ( bme680_sensor_data ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < bme680_sensor_data > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( bme680_sensor_data ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bme680_sensor_data > ( ) ) ) . temperature as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( bme680_sensor_data ) , "::" , stringify ! ( temperature ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bme680_sensor_data > ( ) ) ) . humidity as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( bme680_sensor_data ) , "::" , stringify ! ( humidity ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bme680_sensor_data > ( ) ) ) . pressure as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( bme680_sensor_data ) , "::" , stringify ! ( pressure ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bme680_sensor_data > ( ) ) ) . gas_resistance as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( bme680_sensor_data ) , "::" , stringify ! ( gas_resistance ) ) ) ; } extern "C" { pub fn epic_bme680_init ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_bme680_deinit ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_bme680_read_sensors ( data : * mut bme680_sensor_data ) -> ctypes :: c_int ; } # [ doc = " ``0``, No personal state - LED is under regular application control." ] pub const personal_state_STATE_NONE : personal_state = 0 ; # [ doc = " ``1``, \"no contact, please!\" - I am overloaded. Please leave me be - red led, continuously on." ] pub const personal_state_STATE_NO_CONTACT : personal_state = 1 ; # [ doc = " ``2``, \"chaos\" - Adventure time - blue led, short blink, long blink." ] pub const personal_state_STATE_CHAOS : personal_state = 2 ; # [ doc = " ``3``, \"communication\" - want to learn something or have a nice conversation - yellow led, long blinks." ] pub const personal_state_STATE_COMMUNICATION : personal_state = 3 ; # [ doc = " ``4``, \"camp\" - I am focussed on self-, camp-, or community maintenance - green led, fade on and off." ] pub const personal_state_STATE_CAMP : personal_state = 4 ; # [ doc = " STATE_MAX gives latest value and count of possible STATEs" ] pub const personal_state_STATE_MAX : personal_state = 5 ; # [ doc = " Possible personal states." ] pub type personal_state = i32 ; extern "C" { pub fn epic_personal_state_set ( state : u8 , persistent : bool ) -> ctypes :: c_int ; } extern "C" { pub fn epic_personal_state_get ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_personal_state_is_persistent ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_stream_read ( sd : ctypes :: c_int , buf : * mut ctypes :: c_void , count : usize ) -> ctypes :: c_int ; } # [ doc = " Accelerometer" ] # [ doc = "" ] # [ doc = " - Data type: :c:type:`bhi160_data_vector`" ] # [ doc = " - Dynamic range: g's (1x Earth Gravity, ~9.81m*s^-2)" ] pub const bhi160_sensor_type_BHI160_ACCELEROMETER : bhi160_sensor_type = 0 ; # [ doc = " Magnetometer (**Unimplemented**)" ] pub const bhi160_sensor_type_BHI160_MAGNETOMETER : bhi160_sensor_type = 1 ; # [ doc = " Orientation" ] pub const bhi160_sensor_type_BHI160_ORIENTATION : bhi160_sensor_type = 2 ; # [ doc = " Gyroscope" ] pub const bhi160_sensor_type_BHI160_GYROSCOPE : bhi160_sensor_type = 3 ; # [ doc = " Gravity (**Unimplemented**)" ] pub const bhi160_sensor_type_BHI160_GRAVITY : bhi160_sensor_type = 4 ; # [ doc = " Linear acceleration (**Unimplemented**)" ] pub const bhi160_sensor_type_BHI160_LINEAR_ACCELERATION : bhi160_sensor_type = 5 ; # [ doc = " Rotation vector (**Unimplemented**)" ] pub const bhi160_sensor_type_BHI160_ROTATION_VECTOR : bhi160_sensor_type = 6 ; # [ doc = " Uncalibrated magnetometer (**Unimplemented**)" ] pub const bhi160_sensor_type_BHI160_UNCALIBRATED_MAGNETOMETER : bhi160_sensor_type = 7 ; # [ doc = " Game rotation vector (whatever that is supposed to be)" ] pub const bhi160_sensor_type_BHI160_GAME_ROTATION_VECTOR : bhi160_sensor_type = 8 ; # [ doc = " Uncalibrated gyroscrope (**Unimplemented**)" ] pub const bhi160_sensor_type_BHI160_UNCALIBRATED_GYROSCOPE : bhi160_sensor_type = 9 ; # [ doc = " Geomagnetic rotation vector (**Unimplemented**)" ] pub const bhi160_sensor_type_BHI160_GEOMAGNETIC_ROTATION_VECTOR : bhi160_sensor_type = 10 ; # [ doc = " BHI160 virtual sensor type." ] pub type bhi160_sensor_type = i32 ; pub const bhi160_data_type_BHI160_DATA_TYPE_VECTOR : bhi160_data_type = 0 ; pub type bhi160_data_type = i32 ; # [ doc = " Vector Data.  The scaling of these values is dependent on the chosen dynamic" ] # [ doc = " range.  See the individual sensor's documentation for details." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct bhi160_data_vector { pub data_type : bhi160_data_type , # [ doc = " X" ] pub x : i16 , # [ doc = " Y" ] pub y : i16 , # [ doc = " Z" ] pub z : i16 , # [ doc = " Status" ] pub status : u8 , } # [ test ] fn bindgen_test_layout_bhi160_data_vector ( ) { assert_eq ! ( :: core :: mem :: size_of :: < bhi160_data_vector > ( ) , 12usize , concat ! ( "Size of: " , stringify ! ( bhi160_data_vector ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < bhi160_data_vector > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( bhi160_data_vector ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_data_vector > ( ) ) ) . data_type as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_data_vector ) , "::" , stringify ! ( data_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_data_vector > ( ) ) ) . x as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_data_vector ) , "::" , stringify ! ( x ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_data_vector > ( ) ) ) . y as * const _ as usize } , 6usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_data_vector ) , "::" , stringify ! ( y ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_data_vector > ( ) ) ) . z as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_data_vector ) , "::" , stringify ! ( z ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_data_vector > ( ) ) ) . status as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_data_vector ) , "::" , stringify ! ( status ) ) ) ; } # [ doc = " Configuration for a BHI160 sensor." ] # [ doc = "" ] # [ doc = " This struct is used when enabling a sensor using" ] # [ doc = " :c:func:`epic_bhi160_enable_sensor`." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct bhi160_sensor_config { # [ doc = " Number of samples Epicardium should keep for this sensor.  Do not set" ] # [ doc = " this number too high as the sample buffer will eat RAM." ] pub sample_buffer_len : usize , # [ doc = " Sample rate for the sensor in Hz.  Maximum data rate is limited" ] # [ doc = " to 200 Hz for all sensors though some might be limited at a lower" ] # [ doc = " rate." ] pub sample_rate : u16 , # [ doc = " Dynamic range.  Interpretation of this value depends on" ] # [ doc = " the sensor type.  Please refer to the specific sensor in" ] # [ doc = " :c:type:`bhi160_sensor_type` for details." ] pub dynamic_range : u16 , # [ doc = " Always zero. Reserved for future parameters." ] pub _padding : [ u8 ; 8usize ] , } # [ test ] fn bindgen_test_layout_bhi160_sensor_config ( ) { assert_eq ! ( :: core :: mem :: size_of :: < bhi160_sensor_config > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( bhi160_sensor_config ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < bhi160_sensor_config > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( bhi160_sensor_config ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_sensor_config > ( ) ) ) . sample_buffer_len as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_sensor_config ) , "::" , stringify ! ( sample_buffer_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_sensor_config > ( ) ) ) . sample_rate as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_sensor_config ) , "::" , stringify ! ( sample_rate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_sensor_config > ( ) ) ) . dynamic_range as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_sensor_config ) , "::" , stringify ! ( dynamic_range ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < bhi160_sensor_config > ( ) ) ) . _padding as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( bhi160_sensor_config ) , "::" , stringify ! ( _padding ) ) ) ; } extern "C" { pub fn epic_bhi160_enable_sensor ( sensor_type : bhi160_sensor_type , config : * mut bhi160_sensor_config ) -> ctypes :: c_int ; } extern "C" { pub fn epic_bhi160_disable_sensor ( sensor_type : bhi160_sensor_type ) -> ctypes :: c_int ; } extern "C" { pub fn epic_bhi160_disable_all_sensors ( ) ; } extern "C" { pub fn epic_isr_bhi160_accelerometer ( ) ; } extern "C" { pub fn epic_isr_bhi160_orientation ( ) ; } extern "C" { pub fn epic_isr_bhi160_gyroscope ( ) ; } extern "C" { pub fn epic_vibra_set ( status : ctypes :: c_int ) ; } extern "C" { pub fn epic_vibra_vibrate ( millis : ctypes :: c_int ) ; } pub const disp_linestyle_LINESTYLE_FULL : disp_linestyle = 0 ; pub const disp_linestyle_LINESTYLE_DOTTED : disp_linestyle = 1 ; # [ doc = " Line-Style" ] pub type disp_linestyle = i32 ; pub const disp_fillstyle_FILLSTYLE_EMPTY : disp_fillstyle = 0 ; pub const disp_fillstyle_FILLSTYLE_FILLED : disp_fillstyle = 1 ; # [ doc = " Fill-Style" ] pub type disp_fillstyle = i32 ; # [ doc = " Framebuffer" ] # [ doc = "" ] # [ doc = " The frambuffer stores pixels as RGB565, but byte swapped.  That is, for every ``(x, y)`` coordinate, there are two ``uint8_t``\\ s storing 16 bits of pixel data." ] # [ doc = "" ] # [ doc = " .. todo::" ] # [ doc = "" ] # [ doc = "    Document (x, y) in relation to chirality." ] # [ doc = "" ] # [ doc = " **Example**: Fill framebuffer with red" ] # [ doc = "" ] # [ doc = " .. code-block:: cpp" ] # [ doc = "" ] # [ doc = " \tunion disp_framebuffer fb;" ] # [ doc = " \tuint16_t red = 0b1111100000000000;" ] # [ doc = " \tfor (int y = 0; y < DISP_HEIGHT; y++) {" ] # [ doc = " \t\tfor (int x = 0; x < DISP_WIDTH; x++) {" ] # [ doc = " \t\t\tfb.fb[y][x][0] = red >> 8;" ] # [ doc = " \t\t\tfb.fb[y][x][1] = red & 0xFF;" ] # [ doc = " \t\t}" ] # [ doc = " \t}" ] # [ doc = " \tepic_disp_framebuffer(&fb);" ] # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub union disp_framebuffer { # [ doc = " Coordinate based access (as shown in the example above)." ] pub fb : [ [ [ u8 ; 2usize ] ; 160usize ] ; 80usize ] , # [ doc = " Raw byte-indexed access." ] pub raw : [ u8 ; 25600usize ] , _bindgen_union_align : [ u8 ; 25600usize ] , } # [ test ] fn bindgen_test_layout_disp_framebuffer ( ) { assert_eq ! ( :: core :: mem :: size_of :: < disp_framebuffer > ( ) , 25600usize , concat ! ( "Size of: " , stringify ! ( disp_framebuffer ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < disp_framebuffer > ( ) , 1usize , concat ! ( "Alignment of " , stringify ! ( disp_framebuffer ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < disp_framebuffer > ( ) ) ) . fb as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( disp_framebuffer ) , "::" , stringify ! ( fb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < disp_framebuffer > ( ) ) ) . raw as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( disp_framebuffer ) , "::" , stringify ! ( raw ) ) ) ; } extern "C" { pub fn epic_disp_open ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_close ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_update ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_print ( posx : u16 , posy : u16 , pString : * const ctypes :: c_char , fg : u16 , bg : u16 ) -> ctypes :: c_int ; } pub const disp_font_name_DISP_FONT8 : disp_font_name = 0 ; pub const disp_font_name_DISP_FONT12 : disp_font_name = 1 ; pub const disp_font_name_DISP_FONT16 : disp_font_name = 2 ; pub const disp_font_name_DISP_FONT20 : disp_font_name = 3 ; pub const disp_font_name_DISP_FONT24 : disp_font_name = 4 ; pub type disp_font_name = i32 ; extern "C" { pub fn epic_disp_print_adv ( font : u8 , posx : u16 , posy : u16 , pString : * const ctypes :: c_char , fg : u16 , bg : u16 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_clear ( color : u16 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_pixel ( x : u16 , y : u16 , color : u16 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_line ( xstart : u16 , ystart : u16 , xend : u16 , yend : u16 , color : u16 , linestyle : disp_linestyle , pixelsize : u16 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_rect ( xstart : u16 , ystart : u16 , xend : u16 , yend : u16 , color : u16 , fillstyle : disp_fillstyle , pixelsize : u16 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_circ ( x : u16 , y : u16 , rad : u16 , color : u16 , fillstyle : disp_fillstyle , pixelsize : u16 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_framebuffer ( fb : * mut disp_framebuffer ) -> ctypes :: c_int ; } extern "C" { pub fn epic_disp_backlight ( brightness : u16 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_light_sensor_run ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_light_sensor_get ( value : * mut u16 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_light_sensor_stop ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_light_sensor_read ( ) -> u16 ; } extern "C" { pub fn epic_file_open ( filename : * const ctypes :: c_char , modeString : * const ctypes :: c_char ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_close ( fd : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_read ( fd : ctypes :: c_int , buf : * mut ctypes :: c_void , nbytes : usize ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_write ( fd : ctypes :: c_int , buf : * const ctypes :: c_void , nbytes : usize ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_flush ( fd : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_seek ( fd : ctypes :: c_int , offset : ctypes :: c_long , whence : ctypes :: c_int ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_tell ( fd : ctypes :: c_int ) -> ctypes :: c_int ; } # [ doc = " Basically ``ENOENT``. Although :c:func:`epic_file_stat` returns an" ] # [ doc = " error for 'none', the type will still be set to none additionally." ] # [ doc = "" ] # [ doc = " This is also used internally to track open FS objects, where we use" ] # [ doc = " ``EPICSTAT_NONE`` to mark free objects." ] pub const epic_stat_type_EPICSTAT_NONE : epic_stat_type = 0 ; # [ doc = " normal file" ] pub const epic_stat_type_EPICSTAT_FILE : epic_stat_type = 1 ; # [ doc = " directory" ] pub const epic_stat_type_EPICSTAT_DIR : epic_stat_type = 2 ; pub type epic_stat_type = i32 ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct epic_stat { # [ doc = " Entity Type: file, directory or none" ] pub type_ : epic_stat_type , # [ doc = " Size in bytes." ] pub size : u32 , # [ doc = " File Name." ] pub name : [ ctypes :: c_char ; 256usize ] , pub _reserved : [ u8 ; 12usize ] , } # [ test ] fn bindgen_test_layout_epic_stat ( ) { assert_eq ! ( :: core :: mem :: size_of :: < epic_stat > ( ) , 276usize , concat ! ( "Size of: " , stringify ! ( epic_stat ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < epic_stat > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( epic_stat ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < epic_stat > ( ) ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( epic_stat ) , "::" , stringify ! ( type_ ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < epic_stat > ( ) ) ) . size as * const _ as usize } , 4usize , concat ! ( "Offset of field: " , stringify ! ( epic_stat ) , "::" , stringify ! ( size ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < epic_stat > ( ) ) ) . name as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( epic_stat ) , "::" , stringify ! ( name ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < epic_stat > ( ) ) ) . _reserved as * const _ as usize } , 264usize , concat ! ( "Offset of field: " , stringify ! ( epic_stat ) , "::" , stringify ! ( _reserved ) ) ) ; } extern "C" { pub fn epic_file_stat ( path : * const ctypes :: c_char , stat : * mut epic_stat ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_opendir ( path : * const ctypes :: c_char ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_readdir ( fd : ctypes :: c_int , stat : * mut epic_stat ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_unlink ( path : * const ctypes :: c_char ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_rename ( oldp : * const ctypes :: c_char , newp : * const ctypes :: c_char ) -> ctypes :: c_int ; } extern "C" { pub fn epic_file_mkdir ( dirname : * const ctypes :: c_char ) -> ctypes :: c_int ; } extern "C" { pub fn epic_rtc_get_seconds ( ) -> u32 ; } extern "C" { pub fn epic_rtc_get_milliseconds ( ) -> u64 ; } extern "C" { pub fn epic_rtc_set_milliseconds ( milliseconds : u64 ) ; } extern "C" { pub fn epic_rtc_schedule_alarm ( timestamp : u32 ) -> ctypes :: c_int ; } extern "C" { pub fn epic_isr_rtc_alarm ( ) ; } extern "C" { pub fn epic_trng_read ( dest : * mut u8 , size : usize ) -> ctypes :: c_int ; } # [ doc = " Configuration for a MAX30001 sensor." ] # [ doc = "" ] # [ doc = " This struct is used when enabling the sensor using" ] # [ doc = " :c:func:`epic_max30001_enable_sensor`." ] # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct max30001_sensor_config { # [ doc = " Number of samples Epicardium should keep for this sensor.  Do not set" ] # [ doc = " this number too high as the sample buffer will eat RAM." ] pub sample_buffer_len : usize , # [ doc = " Sample rate for the sensor in Hz." ] pub sample_rate : u16 , # [ doc = " Set to true if the second lead comes from USB-C" ] pub usb : bool , # [ doc = " Set to true if the interal lead bias of the MAX30001 is to be used." ] pub bias : bool , # [ doc = " Always zero. Reserved for future parameters." ] pub _padding : [ u8 ; 8usize ] , } # [ test ] fn bindgen_test_layout_max30001_sensor_config ( ) { assert_eq ! ( :: core :: mem :: size_of :: < max30001_sensor_config > ( ) , 24usize , concat ! ( "Size of: " , stringify ! ( max30001_sensor_config ) ) ) ; assert_eq ! ( :: core :: mem :: align_of :: < max30001_sensor_config > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( max30001_sensor_config ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max30001_sensor_config > ( ) ) ) . sample_buffer_len as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( max30001_sensor_config ) , "::" , stringify ! ( sample_buffer_len ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max30001_sensor_config > ( ) ) ) . sample_rate as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( max30001_sensor_config ) , "::" , stringify ! ( sample_rate ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max30001_sensor_config > ( ) ) ) . usb as * const _ as usize } , 10usize , concat ! ( "Offset of field: " , stringify ! ( max30001_sensor_config ) , "::" , stringify ! ( usb ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max30001_sensor_config > ( ) ) ) . bias as * const _ as usize } , 11usize , concat ! ( "Offset of field: " , stringify ! ( max30001_sensor_config ) , "::" , stringify ! ( bias ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: core :: ptr :: null :: < max30001_sensor_config > ( ) ) ) . _padding as * const _ as usize } , 12usize , concat ! ( "Offset of field: " , stringify ! ( max30001_sensor_config ) , "::" , stringify ! ( _padding ) ) ) ; } extern "C" { pub fn epic_max30001_enable_sensor ( config : * mut max30001_sensor_config ) -> ctypes :: c_int ; } extern "C" { pub fn epic_max30001_disable_sensor ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_isr_max30001_ecg ( ) ; } extern "C" { pub fn epic_usb_shutdown ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_usb_storage ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_usb_cdcacm ( ) -> ctypes :: c_int ; } extern "C" { pub fn epic_ws2812_write ( pin : u8 , pixels : * mut u8 , n_bytes : u32 ) ; }