Skip to main content

pamoja_lora_radio_random

Function pamoja_lora_radio_random 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_lora_radio_random( radio: *mut PamojaLoraRadio, out_value: *mut u32, ) -> PamojaStatus
Expand description

Draws a random number from the noise a radio’s receiver hears, leaving the chip in standby.

Semtech’s own drivers draw it the same way, and LoRaWAN 1.0.3 suggests this source for a join nonce on a device that has no other.

§Arguments

  • radio - the radio.
  • out_value - receives thirty-two bits of noise.

§Returns

PamojaStatus::Ok; PamojaStatus::InvalidArgument for a null argument; or PamojaStatus::Io when the chip does not answer.

§Safety

radio must be a live handle or null, and out_value writable or null.