#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_can_bus_open(
interface: *const c_char,
out_bus: *mut *mut PamojaCanBus,
) -> PamojaStatusExpand description
Opens a kernel CAN interface through SocketCAN, as one node on its bus.
§Arguments
interface- the interface, such ascan0orvcan0, as UTF-8.out_bus- receives the node.
§Returns
PamojaStatus::Ok; PamojaStatus::Unsupported anywhere but Linux;
PamojaStatus::Io when the interface does not exist or cannot be bound; or
PamojaStatus::InvalidArgument for a null argument. The reason is in the last error
message.
§Safety
interface must be a NUL-terminated string or null, and out_bus a writable pointer or
null.