Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct BcmMsgHead {
- _opcode: u32,
- _flags: u32,
- /// number of frames to send before changing interval
- _count: u32,
- /// interval for the first count frames
- _ival1: BcmTimeval,
- /// interval for the following frames
- _ival2: BcmTimeval,
- _can_id: u32,
- /// number of can frames appended to the message head
- _nframes: u32,
- /// buffer of CAN frames
- _frames: [CanFrame; 0],
- }
- impl BcmMsgHead {
- #[inline]
- pub fn frames(&self) -> &[CanFrame] {
- return unsafe {
- slice::from_raw_parts(self._frames.as_ptr(), self._nframes as usize)
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement