[−][src]Function linuxcnc_hal_sys::hal_pin_new
pub unsafe extern "C" fn hal_pin_new(
name: *const c_char,
type_: hal_type_t,
dir: hal_pin_dir_t,
data_ptr_addr: *mut *mut c_void,
comp_id: c_int
) -> c_int
'hal_pin_new()' creates a new 'pin' object. It is a generic version of the eight functions above. It is provided ONLY for those special cases where a generic function is needed. It is STRONGLY recommended that the functions above be used instead, because they check the type of 'data_ptr_addr' against the pin type at compile time. Using this function requires a cast of the 'data_ptr_addr' argument that defeats type checking and can cause subtle bugs. 'name', 'dir', 'data_ptr_addr' and 'comp_id' are the same as in the functions above. 'type' is the hal type of the new pin - the type of data that will be passed in/out of the component through the new pin. If successful, hal_pin_new() returns 0. On failure it returns a negative error code.