pub unsafe extern "C" fn link_init(
port: u8,
link_id: *const c_char,
type: link_type_e_t
) -> u32Expand description
Initializes a link on a radio port, with an indicated type. There might be a 1 to 2 second delay from when this function is called to when the link is initializes. PROS currently only supports the use of one radio per brain.
This function uses the following values of errno when an error state is reached: ENXIO - The given value is not within the range of V5 ports (1-21). ENODEV - The port cannot be configured as a radio. ENXIO - The sensor is still calibrating, or no link is connected via the radio.
\param port The port of the radio for the intended link. \param link_id Unique link ID in the form of a string, needs to be different from other links in the area. \param type Indicates whether the radio link on the brain is a transmitter or receiver, with the transmitter having double the transmitting bandwidth as the receiving end (1040 bytes/s vs 520 bytes/s).
\return PROS_ERR if initialization fails, 1 if the initialization succeeds.