diff --git a/TactilityC/Include/tt_hal_radio.h b/TactilityC/Include/tt_hal_radio.h index fc2ee3b3..2b2d47b6 100644 --- a/TactilityC/Include/tt_hal_radio.h +++ b/TactilityC/Include/tt_hal_radio.h @@ -87,14 +87,14 @@ void tt_hal_radio_free(RadioHandle handle); * @param[in] handle the radio driver handle * @return the name of the radio */ -const char* const tt_hal_radio_get_name(RadioHandle handle); +const char* tt_hal_radio_get_name(RadioHandle handle); /** * Get the description for the radio driver object. * @param[in] handle the radio driver handle * @return the description for the radio */ -const char* const tt_hal_radio_get_desc(RadioHandle handle); +const char* tt_hal_radio_get_desc(RadioHandle handle); /** @@ -200,14 +200,14 @@ RadioTxId tt_hal_radio_transmit(RadioHandle handle, RadioTxPacket packet, RadioT * @param[in] callback function to call on reception of a packet * @return the identifier for the subscription */ -RadioRxSubscriptionId radio_subscribe_receive(RadioHandle handle, RadioOnReceiveCallback callback); +RadioRxSubscriptionId tt_hal_radio_subscribe_receive(RadioHandle handle, RadioOnReceiveCallback callback); /** * Unsubscribe for any received packet that the radio driver object receives. * @param[in] handle the radio driver handle * @param[in] id the identifier for the subscription */ -void radio_unsubscribe_receive(RadioHandle handle, RadioRxSubscriptionId id); +void tt_hal_radio_unsubscribe_receive(RadioHandle handle, RadioRxSubscriptionId id); #ifdef __cplusplus } diff --git a/TactilityC/Source/tt_hal_radio.cpp b/TactilityC/Source/tt_hal_radio.cpp index d66b8182..a5966253 100644 --- a/TactilityC/Source/tt_hal_radio.cpp +++ b/TactilityC/Source/tt_hal_radio.cpp @@ -46,12 +46,12 @@ extern "C" { delete wrapper; } - const char* const tt_hal_radio_get_name(RadioHandle handle) { + const char* tt_hal_radio_get_name(RadioHandle handle) { auto wrapper = static_cast(handle); return wrapper->name.c_str(); } - const char* const tt_hal_radio_get_desc(RadioHandle handle) { + const char* tt_hal_radio_get_desc(RadioHandle handle) { auto wrapper = static_cast(handle); return wrapper->description.c_str(); } @@ -128,7 +128,7 @@ extern "C" { }); } - RadioRxSubscriptionId radio_subscribe_receive(RadioHandle handle, RadioOnReceiveCallback callback) { + RadioRxSubscriptionId tt_hal_radio_subscribe_receive(RadioHandle handle, RadioOnReceiveCallback callback) { auto wrapper = static_cast(handle); return wrapper->device->subscribeRx([callback](tt::hal::Device::Id id, const tt::hal::radio::RxPacket& ttPacket) { if (callback) { @@ -143,7 +143,7 @@ extern "C" { }); } - void radio_unsubscribe_receive(RadioHandle handle, RadioRxSubscriptionId id) { + void tt_hal_radio_unsubscribe_receive(RadioHandle handle, RadioRxSubscriptionId id) { auto wrapper = static_cast(handle); wrapper->device->unsubscribeRx(id); } diff --git a/TactilityC/Source/tt_init.cpp b/TactilityC/Source/tt_init.cpp index 1a74e772..dae9af86 100644 --- a/TactilityC/Source/tt_init.cpp +++ b/TactilityC/Source/tt_init.cpp @@ -11,6 +11,7 @@ #include "tt_hal_gpio.h" #include "tt_hal_i2c.h" #include "tt_hal_touch.h" +#include "tt_hal_radio.h" #include "tt_kernel.h" #include "tt_lvgl.h" #include "tt_lvgl_keyboard.h" @@ -266,6 +267,23 @@ const esp_elfsym elf_symbols[] { ESP_ELFSYM_EXPORT(tt_hal_touch_driver_supported), ESP_ELFSYM_EXPORT(tt_hal_touch_driver_alloc), ESP_ELFSYM_EXPORT(tt_hal_touch_driver_free), + ESP_ELFSYM_EXPORT(tt_hal_radio_alloc), + ESP_ELFSYM_EXPORT(tt_hal_radio_free), + ESP_ELFSYM_EXPORT(tt_hal_radio_get_name), + ESP_ELFSYM_EXPORT(tt_hal_radio_get_desc), + ESP_ELFSYM_EXPORT(tt_hal_radio_get_state), + ESP_ELFSYM_EXPORT(tt_hal_radio_set_modulation), + ESP_ELFSYM_EXPORT(tt_hal_radio_get_modulation), + ESP_ELFSYM_EXPORT(tt_hal_radio_set_parameter), + ESP_ELFSYM_EXPORT(tt_hal_radio_get_parameter), + ESP_ELFSYM_EXPORT(tt_hal_radio_get_parameter_unit_str), + ESP_ELFSYM_EXPORT(tt_hal_radio_can_transmit), + ESP_ELFSYM_EXPORT(tt_hal_radio_can_receive), + ESP_ELFSYM_EXPORT(tt_hal_radio_start), + ESP_ELFSYM_EXPORT(tt_hal_radio_stop), + ESP_ELFSYM_EXPORT(tt_hal_radio_transmit), + ESP_ELFSYM_EXPORT(tt_hal_radio_subscribe_receive), + ESP_ELFSYM_EXPORT(tt_hal_radio_unsubscribe_receive), ESP_ELFSYM_EXPORT(tt_hal_touch_driver_get_touched_points), ESP_ELFSYM_EXPORT(tt_kernel_delay_millis), ESP_ELFSYM_EXPORT(tt_kernel_delay_micros),