45 lines
969 B
C
45 lines
969 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef void* RadioHandle;
|
|
|
|
enum Modulation {
|
|
MODULATION_LORA,
|
|
MODULATION_FSK,
|
|
MODULATION_LRFHSS
|
|
};
|
|
|
|
/**
|
|
* Allocate a radio driver object for the specified radioId.
|
|
* @param[in] radioId the identifier of the radio device
|
|
* @return the radio handle
|
|
*/
|
|
RadioHandle tt_hal_radio_alloc(DeviceId radioId);
|
|
|
|
/**
|
|
* Free the memory for the radio driver object.
|
|
* @param[in] handle the radio driver handle
|
|
*/
|
|
void tt_hal_radio_free(RadioHandle handle);
|
|
|
|
/**
|
|
* Set the modulation for the radio driver object.
|
|
* @param[in] modulation the modulation type
|
|
* @param[in] handle the radio driver handle
|
|
*/
|
|
void tt_hal_radio_set_modulation(RadioHandle handle, Modulation modulation);
|
|
|
|
/**
|
|
* Get the modulation for the radio driver object.
|
|
* @param[in] handle the radio driver handle
|
|
* @return the modulation type
|
|
*/
|
|
Modulation tt_hal_radio_get_modulation(RadioHandle handle);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|