1#[repr(C)]
4#[derive(Default)]
5pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
6impl<T> __IncompleteArrayField<T> {
7 #[inline]
8 pub const fn new() -> Self {
9 __IncompleteArrayField(::std::marker::PhantomData, [])
10 }
11 #[inline]
12 pub fn as_ptr(&self) -> *const T {
13 self as *const _ as *const T
14 }
15 #[inline]
16 pub fn as_mut_ptr(&mut self) -> *mut T {
17 self as *mut _ as *mut T
18 }
19 #[inline]
20 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
21 ::std::slice::from_raw_parts(self.as_ptr(), len)
22 }
23 #[inline]
24 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
25 ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
26 }
27}
28impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
29 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
30 fmt.write_str("__IncompleteArrayField")
31 }
32}
33pub type __uint8_t = ::std::os::raw::c_uchar;
34pub type __uint16_t = ::std::os::raw::c_ushort;
35pub type __uint64_t = ::std::os::raw::c_ulong;
36extern "C" {
37 pub fn free(__ptr: *mut ::std::os::raw::c_void);
38}
39#[repr(C)]
40#[derive(Debug, Copy, Clone)]
41pub struct nspire_handle {
42 _unused: [u8; 0],
43}
44pub type nspire_handle_t = nspire_handle;
45#[repr(C)]
46#[derive(Debug, Copy, Clone)]
47pub struct libusb_device_handle {
48 _unused: [u8; 0],
49}
50extern "C" {
51 pub fn nspire_init(
52 ptr: *mut *mut nspire_handle_t,
53 dev: *mut libusb_device_handle,
54 is_cx2: bool,
55 ) -> ::std::os::raw::c_int;
56}
57extern "C" {
58 pub fn nspire_free(ptr: *mut nspire_handle_t);
59}
60pub const nspire_battery_NSPIRE_BATT_POWERED: nspire_battery = 0;
61pub const nspire_battery_NSPIRE_BATT_LOW: nspire_battery = 241;
62pub const nspire_battery_NSPIRE_BATT_OK: nspire_battery = 127;
63pub const nspire_battery_NSPIRE_BATT_UNKNOWN: nspire_battery = 255;
64pub type nspire_battery = ::std::os::raw::c_uint;
65pub const nspire_version_index_NSPIRE_VER_OS: nspire_version_index = 0;
66pub const nspire_version_index_NSPIRE_VER_BOOT1: nspire_version_index = 1;
67pub const nspire_version_index_NSPIRE_VER_BOOT2: nspire_version_index = 2;
68pub const nspire_version_index_NSPIRE_VER_MAXNUM: nspire_version_index = 3;
69pub type nspire_version_index = ::std::os::raw::c_uint;
70pub const nspire_type_NSPIRE_CAS: nspire_type = 14;
71pub const nspire_type_NSPIRE_NONCAS: nspire_type = 30;
72pub const nspire_type_NSPIRE_CASCX: nspire_type = 15;
73pub const nspire_type_NSPIRE_NONCASCX: nspire_type = 31;
74pub type nspire_type = ::std::os::raw::c_uint;
75pub const nspire_runlevel_NSPIRE_RUNLEVEL_RECOVERY: nspire_runlevel = 1;
76pub const nspire_runlevel_NSPIRE_RUNLEVEL_OS: nspire_runlevel = 2;
77pub type nspire_runlevel = ::std::os::raw::c_uint;
78#[repr(C)]
79#[derive(Debug, Copy, Clone)]
80pub struct nspire_devinfo {
81 pub storage: nspire_devinfo__bindgen_ty_1,
82 pub ram: nspire_devinfo__bindgen_ty_2,
83 pub versions: [nspire_devinfo__bindgen_ty_3; 3usize],
84 pub hw_type: nspire_type,
85 pub batt: nspire_devinfo__bindgen_ty_4,
86 pub clock_speed: u8,
87 pub lcd: nspire_devinfo__bindgen_ty_5,
88 pub extensions: nspire_devinfo__bindgen_ty_6,
89 pub device_name: [::std::os::raw::c_char; 20usize],
90 pub electronic_id: [::std::os::raw::c_char; 28usize],
91 pub runlevel: nspire_runlevel,
92}
93#[repr(C)]
94#[derive(Debug, Copy, Clone)]
95pub struct nspire_devinfo__bindgen_ty_1 {
96 pub free: u64,
97 pub total: u64,
98}
99#[test]
100fn bindgen_test_layout_nspire_devinfo__bindgen_ty_1() {
101 assert_eq!(
102 ::std::mem::size_of::<nspire_devinfo__bindgen_ty_1>(),
103 16usize,
104 concat!("Size of: ", stringify!(nspire_devinfo__bindgen_ty_1))
105 );
106 assert_eq!(
107 ::std::mem::align_of::<nspire_devinfo__bindgen_ty_1>(),
108 8usize,
109 concat!("Alignment of ", stringify!(nspire_devinfo__bindgen_ty_1))
110 );
111 assert_eq!(
112 unsafe {
113 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_1>())).free as *const _ as usize
114 },
115 0usize,
116 concat!(
117 "Offset of field: ",
118 stringify!(nspire_devinfo__bindgen_ty_1),
119 "::",
120 stringify!(free)
121 )
122 );
123 assert_eq!(
124 unsafe {
125 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_1>())).total as *const _ as usize
126 },
127 8usize,
128 concat!(
129 "Offset of field: ",
130 stringify!(nspire_devinfo__bindgen_ty_1),
131 "::",
132 stringify!(total)
133 )
134 );
135}
136#[repr(C)]
137#[derive(Debug, Copy, Clone)]
138pub struct nspire_devinfo__bindgen_ty_2 {
139 pub free: u64,
140 pub total: u64,
141}
142#[test]
143fn bindgen_test_layout_nspire_devinfo__bindgen_ty_2() {
144 assert_eq!(
145 ::std::mem::size_of::<nspire_devinfo__bindgen_ty_2>(),
146 16usize,
147 concat!("Size of: ", stringify!(nspire_devinfo__bindgen_ty_2))
148 );
149 assert_eq!(
150 ::std::mem::align_of::<nspire_devinfo__bindgen_ty_2>(),
151 8usize,
152 concat!("Alignment of ", stringify!(nspire_devinfo__bindgen_ty_2))
153 );
154 assert_eq!(
155 unsafe {
156 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_2>())).free as *const _ as usize
157 },
158 0usize,
159 concat!(
160 "Offset of field: ",
161 stringify!(nspire_devinfo__bindgen_ty_2),
162 "::",
163 stringify!(free)
164 )
165 );
166 assert_eq!(
167 unsafe {
168 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_2>())).total as *const _ as usize
169 },
170 8usize,
171 concat!(
172 "Offset of field: ",
173 stringify!(nspire_devinfo__bindgen_ty_2),
174 "::",
175 stringify!(total)
176 )
177 );
178}
179#[repr(C)]
180#[derive(Debug, Copy, Clone)]
181pub struct nspire_devinfo__bindgen_ty_3 {
182 pub major: u8,
183 pub minor: u8,
184 pub build: u16,
185}
186#[test]
187fn bindgen_test_layout_nspire_devinfo__bindgen_ty_3() {
188 assert_eq!(
189 ::std::mem::size_of::<nspire_devinfo__bindgen_ty_3>(),
190 4usize,
191 concat!("Size of: ", stringify!(nspire_devinfo__bindgen_ty_3))
192 );
193 assert_eq!(
194 ::std::mem::align_of::<nspire_devinfo__bindgen_ty_3>(),
195 2usize,
196 concat!("Alignment of ", stringify!(nspire_devinfo__bindgen_ty_3))
197 );
198 assert_eq!(
199 unsafe {
200 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_3>())).major as *const _ as usize
201 },
202 0usize,
203 concat!(
204 "Offset of field: ",
205 stringify!(nspire_devinfo__bindgen_ty_3),
206 "::",
207 stringify!(major)
208 )
209 );
210 assert_eq!(
211 unsafe {
212 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_3>())).minor as *const _ as usize
213 },
214 1usize,
215 concat!(
216 "Offset of field: ",
217 stringify!(nspire_devinfo__bindgen_ty_3),
218 "::",
219 stringify!(minor)
220 )
221 );
222 assert_eq!(
223 unsafe {
224 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_3>())).build as *const _ as usize
225 },
226 2usize,
227 concat!(
228 "Offset of field: ",
229 stringify!(nspire_devinfo__bindgen_ty_3),
230 "::",
231 stringify!(build)
232 )
233 );
234}
235#[repr(C)]
236#[derive(Debug, Copy, Clone)]
237pub struct nspire_devinfo__bindgen_ty_4 {
238 pub status: nspire_battery,
239 pub is_charging: u8,
240}
241#[test]
242fn bindgen_test_layout_nspire_devinfo__bindgen_ty_4() {
243 assert_eq!(
244 ::std::mem::size_of::<nspire_devinfo__bindgen_ty_4>(),
245 8usize,
246 concat!("Size of: ", stringify!(nspire_devinfo__bindgen_ty_4))
247 );
248 assert_eq!(
249 ::std::mem::align_of::<nspire_devinfo__bindgen_ty_4>(),
250 4usize,
251 concat!("Alignment of ", stringify!(nspire_devinfo__bindgen_ty_4))
252 );
253 assert_eq!(
254 unsafe {
255 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_4>())).status as *const _ as usize
256 },
257 0usize,
258 concat!(
259 "Offset of field: ",
260 stringify!(nspire_devinfo__bindgen_ty_4),
261 "::",
262 stringify!(status)
263 )
264 );
265 assert_eq!(
266 unsafe {
267 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_4>())).is_charging as *const _
268 as usize
269 },
270 4usize,
271 concat!(
272 "Offset of field: ",
273 stringify!(nspire_devinfo__bindgen_ty_4),
274 "::",
275 stringify!(is_charging)
276 )
277 );
278}
279#[repr(C)]
280#[derive(Debug, Copy, Clone)]
281pub struct nspire_devinfo__bindgen_ty_5 {
282 pub width: u16,
283 pub height: u16,
284 pub bbp: u8,
285 pub sample_mode: u8,
286}
287#[test]
288fn bindgen_test_layout_nspire_devinfo__bindgen_ty_5() {
289 assert_eq!(
290 ::std::mem::size_of::<nspire_devinfo__bindgen_ty_5>(),
291 6usize,
292 concat!("Size of: ", stringify!(nspire_devinfo__bindgen_ty_5))
293 );
294 assert_eq!(
295 ::std::mem::align_of::<nspire_devinfo__bindgen_ty_5>(),
296 2usize,
297 concat!("Alignment of ", stringify!(nspire_devinfo__bindgen_ty_5))
298 );
299 assert_eq!(
300 unsafe {
301 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_5>())).width as *const _ as usize
302 },
303 0usize,
304 concat!(
305 "Offset of field: ",
306 stringify!(nspire_devinfo__bindgen_ty_5),
307 "::",
308 stringify!(width)
309 )
310 );
311 assert_eq!(
312 unsafe {
313 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_5>())).height as *const _ as usize
314 },
315 2usize,
316 concat!(
317 "Offset of field: ",
318 stringify!(nspire_devinfo__bindgen_ty_5),
319 "::",
320 stringify!(height)
321 )
322 );
323 assert_eq!(
324 unsafe {
325 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_5>())).bbp as *const _ as usize
326 },
327 4usize,
328 concat!(
329 "Offset of field: ",
330 stringify!(nspire_devinfo__bindgen_ty_5),
331 "::",
332 stringify!(bbp)
333 )
334 );
335 assert_eq!(
336 unsafe {
337 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_5>())).sample_mode as *const _
338 as usize
339 },
340 5usize,
341 concat!(
342 "Offset of field: ",
343 stringify!(nspire_devinfo__bindgen_ty_5),
344 "::",
345 stringify!(sample_mode)
346 )
347 );
348}
349#[repr(C)]
350#[derive(Debug, Copy, Clone)]
351pub struct nspire_devinfo__bindgen_ty_6 {
352 pub file: [::std::os::raw::c_char; 8usize],
353 pub os: [::std::os::raw::c_char; 8usize],
354}
355#[test]
356fn bindgen_test_layout_nspire_devinfo__bindgen_ty_6() {
357 assert_eq!(
358 ::std::mem::size_of::<nspire_devinfo__bindgen_ty_6>(),
359 16usize,
360 concat!("Size of: ", stringify!(nspire_devinfo__bindgen_ty_6))
361 );
362 assert_eq!(
363 ::std::mem::align_of::<nspire_devinfo__bindgen_ty_6>(),
364 1usize,
365 concat!("Alignment of ", stringify!(nspire_devinfo__bindgen_ty_6))
366 );
367 assert_eq!(
368 unsafe {
369 &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_6>())).file as *const _ as usize
370 },
371 0usize,
372 concat!(
373 "Offset of field: ",
374 stringify!(nspire_devinfo__bindgen_ty_6),
375 "::",
376 stringify!(file)
377 )
378 );
379 assert_eq!(
380 unsafe { &(*(::std::ptr::null::<nspire_devinfo__bindgen_ty_6>())).os as *const _ as usize },
381 8usize,
382 concat!(
383 "Offset of field: ",
384 stringify!(nspire_devinfo__bindgen_ty_6),
385 "::",
386 stringify!(os)
387 )
388 );
389}
390#[test]
391fn bindgen_test_layout_nspire_devinfo() {
392 assert_eq!(
393 ::std::mem::size_of::<nspire_devinfo>(),
394 136usize,
395 concat!("Size of: ", stringify!(nspire_devinfo))
396 );
397 assert_eq!(
398 ::std::mem::align_of::<nspire_devinfo>(),
399 8usize,
400 concat!("Alignment of ", stringify!(nspire_devinfo))
401 );
402 assert_eq!(
403 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).storage as *const _ as usize },
404 0usize,
405 concat!(
406 "Offset of field: ",
407 stringify!(nspire_devinfo),
408 "::",
409 stringify!(storage)
410 )
411 );
412 assert_eq!(
413 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).ram as *const _ as usize },
414 16usize,
415 concat!(
416 "Offset of field: ",
417 stringify!(nspire_devinfo),
418 "::",
419 stringify!(ram)
420 )
421 );
422 assert_eq!(
423 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).versions as *const _ as usize },
424 32usize,
425 concat!(
426 "Offset of field: ",
427 stringify!(nspire_devinfo),
428 "::",
429 stringify!(versions)
430 )
431 );
432 assert_eq!(
433 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).hw_type as *const _ as usize },
434 44usize,
435 concat!(
436 "Offset of field: ",
437 stringify!(nspire_devinfo),
438 "::",
439 stringify!(hw_type)
440 )
441 );
442 assert_eq!(
443 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).batt as *const _ as usize },
444 48usize,
445 concat!(
446 "Offset of field: ",
447 stringify!(nspire_devinfo),
448 "::",
449 stringify!(batt)
450 )
451 );
452 assert_eq!(
453 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).clock_speed as *const _ as usize },
454 56usize,
455 concat!(
456 "Offset of field: ",
457 stringify!(nspire_devinfo),
458 "::",
459 stringify!(clock_speed)
460 )
461 );
462 assert_eq!(
463 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).lcd as *const _ as usize },
464 58usize,
465 concat!(
466 "Offset of field: ",
467 stringify!(nspire_devinfo),
468 "::",
469 stringify!(lcd)
470 )
471 );
472 assert_eq!(
473 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).extensions as *const _ as usize },
474 64usize,
475 concat!(
476 "Offset of field: ",
477 stringify!(nspire_devinfo),
478 "::",
479 stringify!(extensions)
480 )
481 );
482 assert_eq!(
483 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).device_name as *const _ as usize },
484 80usize,
485 concat!(
486 "Offset of field: ",
487 stringify!(nspire_devinfo),
488 "::",
489 stringify!(device_name)
490 )
491 );
492 assert_eq!(
493 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).electronic_id as *const _ as usize },
494 100usize,
495 concat!(
496 "Offset of field: ",
497 stringify!(nspire_devinfo),
498 "::",
499 stringify!(electronic_id)
500 )
501 );
502 assert_eq!(
503 unsafe { &(*(::std::ptr::null::<nspire_devinfo>())).runlevel as *const _ as usize },
504 128usize,
505 concat!(
506 "Offset of field: ",
507 stringify!(nspire_devinfo),
508 "::",
509 stringify!(runlevel)
510 )
511 );
512}
513extern "C" {
514 pub fn nspire_device_info(
515 handle: *mut nspire_handle_t,
516 i: *mut nspire_devinfo,
517 ) -> ::std::os::raw::c_int;
518}
519pub type nspire_callback =
520 ::std::option::Option<unsafe extern "C" fn(arg1: usize, arg2: *mut ::std::os::raw::c_void)>;
521extern "C" {
522 pub fn nspire_file_write(
523 arg1: *mut nspire_handle_t,
524 arg2: *const ::std::os::raw::c_char,
525 arg3: *mut ::std::os::raw::c_void,
526 arg4: usize,
527 cb: nspire_callback,
528 cb_data: *mut ::std::os::raw::c_void,
529 ) -> ::std::os::raw::c_int;
530}
531extern "C" {
532 pub fn nspire_file_read(
533 handle: *mut nspire_handle_t,
534 path: *const ::std::os::raw::c_char,
535 data: *mut ::std::os::raw::c_void,
536 size: usize,
537 read_bytes: *mut usize,
538 cb: nspire_callback,
539 cb_data: *mut ::std::os::raw::c_void,
540 ) -> ::std::os::raw::c_int;
541}
542extern "C" {
543 pub fn nspire_file_move(
544 handle: *mut nspire_handle_t,
545 src: *const ::std::os::raw::c_char,
546 dst: *const ::std::os::raw::c_char,
547 ) -> ::std::os::raw::c_int;
548}
549extern "C" {
550 pub fn nspire_file_copy(
551 handle: *mut nspire_handle_t,
552 src: *const ::std::os::raw::c_char,
553 dst: *const ::std::os::raw::c_char,
554 ) -> ::std::os::raw::c_int;
555}
556extern "C" {
557 pub fn nspire_file_delete(
558 handle: *mut nspire_handle_t,
559 path: *const ::std::os::raw::c_char,
560 ) -> ::std::os::raw::c_int;
561}
562pub const nspire_dir_type_NSPIRE_FILE: nspire_dir_type = 0;
563pub const nspire_dir_type_NSPIRE_DIR: nspire_dir_type = 1;
564pub type nspire_dir_type = ::std::os::raw::c_uint;
565#[repr(C)]
566#[derive(Copy, Clone)]
567pub struct nspire_dir_item {
568 pub name: [::std::os::raw::c_char; 240usize],
569 pub size: u64,
570 pub date: u64,
571 pub type_: nspire_dir_type,
572}
573#[test]
574fn bindgen_test_layout_nspire_dir_item() {
575 assert_eq!(
576 ::std::mem::size_of::<nspire_dir_item>(),
577 264usize,
578 concat!("Size of: ", stringify!(nspire_dir_item))
579 );
580 assert_eq!(
581 ::std::mem::align_of::<nspire_dir_item>(),
582 8usize,
583 concat!("Alignment of ", stringify!(nspire_dir_item))
584 );
585 assert_eq!(
586 unsafe { &(*(::std::ptr::null::<nspire_dir_item>())).name as *const _ as usize },
587 0usize,
588 concat!(
589 "Offset of field: ",
590 stringify!(nspire_dir_item),
591 "::",
592 stringify!(name)
593 )
594 );
595 assert_eq!(
596 unsafe { &(*(::std::ptr::null::<nspire_dir_item>())).size as *const _ as usize },
597 240usize,
598 concat!(
599 "Offset of field: ",
600 stringify!(nspire_dir_item),
601 "::",
602 stringify!(size)
603 )
604 );
605 assert_eq!(
606 unsafe { &(*(::std::ptr::null::<nspire_dir_item>())).date as *const _ as usize },
607 248usize,
608 concat!(
609 "Offset of field: ",
610 stringify!(nspire_dir_item),
611 "::",
612 stringify!(date)
613 )
614 );
615 assert_eq!(
616 unsafe { &(*(::std::ptr::null::<nspire_dir_item>())).type_ as *const _ as usize },
617 256usize,
618 concat!(
619 "Offset of field: ",
620 stringify!(nspire_dir_item),
621 "::",
622 stringify!(type_)
623 )
624 );
625}
626#[repr(C)]
627pub struct nspire_dir_info {
628 pub num: u64,
629 pub items: __IncompleteArrayField<nspire_dir_item>,
630}
631#[test]
632fn bindgen_test_layout_nspire_dir_info() {
633 assert_eq!(
634 ::std::mem::size_of::<nspire_dir_info>(),
635 8usize,
636 concat!("Size of: ", stringify!(nspire_dir_info))
637 );
638 assert_eq!(
639 ::std::mem::align_of::<nspire_dir_info>(),
640 8usize,
641 concat!("Alignment of ", stringify!(nspire_dir_info))
642 );
643 assert_eq!(
644 unsafe { &(*(::std::ptr::null::<nspire_dir_info>())).num as *const _ as usize },
645 0usize,
646 concat!(
647 "Offset of field: ",
648 stringify!(nspire_dir_info),
649 "::",
650 stringify!(num)
651 )
652 );
653 assert_eq!(
654 unsafe { &(*(::std::ptr::null::<nspire_dir_info>())).items as *const _ as usize },
655 8usize,
656 concat!(
657 "Offset of field: ",
658 stringify!(nspire_dir_info),
659 "::",
660 stringify!(items)
661 )
662 );
663}
664extern "C" {
665 pub fn nspire_dirlist(
666 arg1: *mut nspire_handle_t,
667 arg2: *const ::std::os::raw::c_char,
668 arg3: *mut *mut nspire_dir_info,
669 ) -> ::std::os::raw::c_int;
670}
671extern "C" {
672 pub fn nspire_dirlist_free(d: *mut nspire_dir_info);
673}
674extern "C" {
675 pub fn nspire_dir_create(
676 handle: *mut nspire_handle_t,
677 path: *const ::std::os::raw::c_char,
678 ) -> ::std::os::raw::c_int;
679}
680extern "C" {
681 pub fn nspire_dir_delete(
682 handle: *mut nspire_handle_t,
683 path: *const ::std::os::raw::c_char,
684 ) -> ::std::os::raw::c_int;
685}
686extern "C" {
687 pub fn nspire_attr(
688 arg1: *mut nspire_handle_t,
689 arg2: *const ::std::os::raw::c_char,
690 arg3: *mut nspire_dir_item,
691 ) -> ::std::os::raw::c_int;
692}
693pub const NSPIRE_ERR_SUCCESS: ::std::os::raw::c_uint = 0;
694pub const NSPIRE_ERR_TIMEOUT: ::std::os::raw::c_uint = 1;
695pub const NSPIRE_ERR_NOMEM: ::std::os::raw::c_uint = 2;
696pub const NSPIRE_ERR_INVALID: ::std::os::raw::c_uint = 3;
697pub const NSPIRE_ERR_LIBUSB: ::std::os::raw::c_uint = 4;
698pub const NSPIRE_ERR_NODEVICE: ::std::os::raw::c_uint = 5;
699pub const NSPIRE_ERR_INVALPKT: ::std::os::raw::c_uint = 6;
700pub const NSPIRE_ERR_NACK: ::std::os::raw::c_uint = 7;
701pub const NSPIRE_ERR_BUSY: ::std::os::raw::c_uint = 8;
702pub const NSPIRE_ERR_EXISTS: ::std::os::raw::c_uint = 9;
703pub const NSPIRE_ERR_NONEXIST: ::std::os::raw::c_uint = 10;
704pub const NSPIRE_ERR_OSFAILED: ::std::os::raw::c_uint = 11;
705pub const NSPIRE_ERR_MAX: ::std::os::raw::c_uint = 12;
706pub type _bindgen_ty_5 = ::std::os::raw::c_uint;
707extern "C" {
708 pub fn nspire_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
709}
710extern "C" {
711 pub fn nspire_os_send(
712 handle: *mut nspire_handle_t,
713 data: *mut ::std::os::raw::c_void,
714 size: usize,
715 cb: nspire_callback,
716 cb_data: *mut ::std::os::raw::c_void,
717 ) -> ::std::os::raw::c_int;
718}
719#[repr(C)]
720#[derive(Debug)]
721pub struct nspire_image {
722 pub width: u16,
723 pub height: u16,
724 pub bbp: u8,
725 pub data: __IncompleteArrayField<::std::os::raw::c_uchar>,
726}
727#[test]
728fn bindgen_test_layout_nspire_image() {
729 assert_eq!(
730 ::std::mem::size_of::<nspire_image>(),
731 6usize,
732 concat!("Size of: ", stringify!(nspire_image))
733 );
734 assert_eq!(
735 ::std::mem::align_of::<nspire_image>(),
736 2usize,
737 concat!("Alignment of ", stringify!(nspire_image))
738 );
739 assert_eq!(
740 unsafe { &(*(::std::ptr::null::<nspire_image>())).width as *const _ as usize },
741 0usize,
742 concat!(
743 "Offset of field: ",
744 stringify!(nspire_image),
745 "::",
746 stringify!(width)
747 )
748 );
749 assert_eq!(
750 unsafe { &(*(::std::ptr::null::<nspire_image>())).height as *const _ as usize },
751 2usize,
752 concat!(
753 "Offset of field: ",
754 stringify!(nspire_image),
755 "::",
756 stringify!(height)
757 )
758 );
759 assert_eq!(
760 unsafe { &(*(::std::ptr::null::<nspire_image>())).bbp as *const _ as usize },
761 4usize,
762 concat!(
763 "Offset of field: ",
764 stringify!(nspire_image),
765 "::",
766 stringify!(bbp)
767 )
768 );
769 assert_eq!(
770 unsafe { &(*(::std::ptr::null::<nspire_image>())).data as *const _ as usize },
771 5usize,
772 concat!(
773 "Offset of field: ",
774 stringify!(nspire_image),
775 "::",
776 stringify!(data)
777 )
778 );
779}
780extern "C" {
781 pub fn nspire_screenshot(
782 handle: *mut nspire_handle_t,
783 ptr: *mut *mut nspire_image,
784 ) -> ::std::os::raw::c_int;
785}