Skip to main content

pamoja_lora_radio_write_register

Function pamoja_lora_radio_write_register 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_lora_radio_write_register( radio: *mut PamojaLoraRadio, address: u16, value: u8, ) -> PamojaStatus
Expand description

Writes one register of a radio’s chip.

§Arguments

  • radio - the radio.
  • address - the register address: 16 bits on the SX126x, 0x00 to 0x7F on the SX127x.
  • value - the value to write.

§Returns

PamojaStatus::Ok; PamojaStatus::InvalidArgument for a null radio or an SX127x address past 0x7F; or PamojaStatus::Io when the chip does not answer.

§Safety

radio must be a live handle from one of the open functions, or null.