#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_lora_plan_data_rate(
plan: *const PamojaLoraPlan,
direction: u32,
data_rate: u8,
out_rate: *mut PamojaLoraDataRate,
) -> PamojaStatusExpand description
Returns the data rate a number selects.
§Arguments
plan- the plan to read.direction-PAMOJA_LORA_DIRECTION_UPLINKorPAMOJA_LORA_DIRECTION_DOWNLINK, which differ in the 900 MHz plans.data_rate- the data-rate number.out_rate- set to the data rate on success.
§Returns
PamojaStatus::Ok on success. A reserved number succeeds and reports
PAMOJA_LORA_MODULATION_RESERVED.
§Errors
Returns PamojaStatus::InvalidArgument if either pointer is null, the
direction is not one of the two constants, or the number is past the end of
the plan’s table.
§Safety
plan must be a live plan handle and out_rate must point at writable
storage for one PamojaLoraDataRate.