pub unsafe extern "C" fn nros_platform_can_open(
can: *mut nros_platform_can_t,
device: *const c_char,
want_fd: u8,
) -> i8Expand description
Open device into the caller’s handle storage. device NULL opens the
image’s device (the one its board stack names); a non-NULL name opens that
device instead. want_fd non-zero asks for CAN FD: afterwards
nros_platform_can_fd_active says whether FD is active. A backend that can
tell at open that the device does not carry FD (SocketCAN: the interface
MTU) fails here with NROS_PLATFORM_CAN_ENOFD; one that learns it from
the device’s mode (Zephyr: the controller’s CAN_MODE_FD, set at
bring-up) opens and reports it through fd_active. Either way an FD send
on a handle whose FD is not active returns NROS_PLATFORM_CAN_ENOFD.