ethercat_sys/
lib.rs

1// Part of ethercat-rs. Copyright 2018-2022 by the authors.
2// This work is dual-licensed under Apache 2.0 and MIT terms.
3
4#![allow(non_upper_case_globals)]
5#![allow(non_camel_case_types)]
6#![allow(non_snake_case)]
7#![allow(clippy::useless_transmute)]
8
9#[cfg(not(feature = "pregenerated-bindings"))]
10include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
11
12#[cfg(all(not(feature = "sncn"), feature = "pregenerated-bindings"))]
13include!("bindings-v1.5-c022ddbcf254.rs");
14
15#[cfg(all(feature = "sncn", feature = "pregenerated-bindings"))]
16include!("bindings-v1.5.2-sncn-11.rs");
17
18use ioctl_sys::{io, ioc, ioctl, ior, iorw, iow};
19
20pub mod ioctl {
21    use super::EC_IOCTL_TYPE as EC;
22    use super::*;
23
24    #[cfg(not(feature = "pregenerated-bindings"))]
25    include!(concat!(env!("OUT_DIR"), "/ioctls.rs"));
26
27    #[cfg(all(not(feature = "sncn"), feature = "pregenerated-bindings"))]
28    include!("ioctls-v1.5-c022ddbcf254.rs");
29
30    #[cfg(all(feature = "sncn", feature = "pregenerated-bindings"))]
31    include!("ioctls-v1.5.2-sncn-11.rs");
32}