libc/new/linux_uapi/linux/can/
bcm.rs1pub use crate::linux::can::*;
4
5#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for bcm_msg_head {
#[inline]
fn clone(&self) -> bcm_msg_head {
let _: ::core::clone::AssertParamIsClone<u32>;
let _: ::core::clone::AssertParamIsClone<bcm_timeval>;
let _: ::core::clone::AssertParamIsClone<canid_t>;
let _: ::core::clone::AssertParamIsClone<[can_frame; 0]>;
*self
}
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for bcm_msg_head { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for bcm_msg_head {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
let names: &'static _ =
&["opcode", "flags", "count", "ival1", "ival2", "can_id",
"nframes", "frames"];
let values: &[&dyn ::core::fmt::Debug] =
&[&self.opcode, &self.flags, &self.count, &self.ival1,
&self.ival2, &self.can_id, &self.nframes, &&self.frames];
::core::fmt::Formatter::debug_struct_fields_finish(f, "bcm_msg_head",
names, values)
}
}s! {
6 pub struct bcm_timeval {
7 pub tv_sec: c_long,
8 pub tv_usec: c_long,
9 }
10
11 pub struct bcm_msg_head {
12 pub opcode: u32,
13 pub flags: u32,
14 pub count: u32,
15 pub ival1: bcm_timeval,
16 pub ival2: bcm_timeval,
17 pub can_id: canid_t,
18 pub nframes: u32,
19 pub frames: [can_frame; 0],
20 }
21}
22
23pub const RX_CHANGED: u32 =
{
#[allow(unused_variables)]
let r = RX_TIMEOUT + 1;
r
};c_enum! {
24 #[repr(u32)]
25 pub enum #anon {
26 pub TX_SETUP = 1,
27 pub TX_DELETE,
28 pub TX_READ,
29 pub TX_SEND,
30 pub RX_SETUP,
31 pub RX_DELETE,
32 pub RX_READ,
33 pub TX_STATUS,
34 pub TX_EXPIRED,
35 pub RX_STATUS,
36 pub RX_TIMEOUT,
37 pub RX_CHANGED,
38 }
39}
40
41pub const SETTIMER: u32 = 0x0001;
42pub const STARTTIMER: u32 = 0x0002;
43pub const TX_COUNTEVT: u32 = 0x0004;
44pub const TX_ANNOUNCE: u32 = 0x0008;
45pub const TX_CP_CAN_ID: u32 = 0x0010;
46pub const RX_FILTER_ID: u32 = 0x0020;
47pub const RX_CHECK_DLC: u32 = 0x0040;
48pub const RX_NO_AUTOTIMER: u32 = 0x0080;
49pub const RX_ANNOUNCE_RESUME: u32 = 0x0100;
50pub const TX_RESET_MULTI_IDX: u32 = 0x0200;
51pub const RX_RTR_FRAME: u32 = 0x0400;
52pub const CAN_FD_FRAME: u32 = 0x0800;