rs_ws281x 0.2.0

Wrapper for ws281x library using bindgen to track upstream
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
/* automatically generated by rust-bindgen */

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;
}