Skip to main content

pamoja_lora_radio_transmit

Function pamoja_lora_radio_transmit 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_lora_radio_transmit( radio: *mut PamojaLoraRadio, payload: *const u8, len: usize, out_airtime_us: *mut u64, ) -> PamojaStatus
Expand description

Sends one frame and waits for it to leave.

§Arguments

  • radio - the radio.
  • payload - the payload bytes, 1 to 255 of them.
  • len - the payload length.
  • out_airtime_us - receives the frame’s airtime in microseconds, or null.

§Returns

PamojaStatus::Ok; PamojaStatus::InvalidArgument for a null radio, a null payload with a length, a payload the chip cannot send, or a radio not yet configured; or PamojaStatus::Io when the chip does not report the frame sent.

§Safety

radio must be a live handle or null, payload must point at len readable bytes or be null, and out_airtime_us must be writable or null.