Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorあく <alleteam@gmail.com>2022-07-20 13:56:33 +0300
committerGitHub <noreply@github.com>2022-07-20 13:56:33 +0300
commite3c7201a2065677ad3c96f0bb1f47f7b58cdb819 (patch)
treeb08f7e8d2e339da831164be7b115fb81790facb5 /applications/subghz/views/subghz_test_packet.c
parentf9c2287ea7dabb0e8275d9a635c4b941516f59bc (diff)
Furi: core refactoring and CMSIS removal part 2 (#1410)
* Furi: rename and move core * Furi: drop CMSIS_OS header and unused api, partially refactor and cleanup the rest * Furi: CMSIS_OS drop and refactoring. * Furi: refactoring, remove cmsis legacy * Furi: fix incorrect assert on queue deallocation, cleanup timer * Furi: improve delay api, get rid of floats * hal: dropped furi_hal_crc * Furi: move DWT based delay to cortex HAL * Furi: update core documentation Co-authored-by: hedger <hedger@nanode.su>
Diffstat (limited to 'applications/subghz/views/subghz_test_packet.c')
-rw-r--r--applications/subghz/views/subghz_test_packet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/applications/subghz/views/subghz_test_packet.c b/applications/subghz/views/subghz_test_packet.c
index 57f85085..c83aebec 100644
--- a/applications/subghz/views/subghz_test_packet.c
+++ b/applications/subghz/views/subghz_test_packet.c
@@ -13,7 +13,7 @@
struct SubGhzTestPacket {
View* view;
- osTimerId_t timer;
+ FuriTimer* timer;
SubGhzDecoderPrinceton* decoder;
SubGhzEncoderPrinceton* encoder;
@@ -141,7 +141,7 @@ static bool subghz_test_packet_input(InputEvent* event, void* context) {
if(model->status == SubGhzTestPacketModelStatusRx) {
furi_hal_subghz_stop_async_rx();
} else if(model->status == SubGhzTestPacketModelStatusTx) {
- subghz_encoder_princeton_for_testing_stop(instance->encoder, furi_hal_get_tick());
+ subghz_encoder_princeton_for_testing_stop(instance->encoder, furi_get_tick());
furi_hal_subghz_stop_async_tx();
}
@@ -206,14 +206,14 @@ void subghz_test_packet_enter(void* context) {
furi_hal_subghz_start_async_rx(subghz_test_packet_rx_callback, instance);
- osTimerStart(instance->timer, osKernelGetTickFreq() / 4);
+ furi_timer_start(instance->timer, furi_kernel_get_tick_frequency() / 4);
}
void subghz_test_packet_exit(void* context) {
furi_assert(context);
SubGhzTestPacket* instance = context;
- osTimerStop(instance->timer);
+ furi_timer_stop(instance->timer);
// Reinitialize IC to default state
with_view_model(
@@ -221,7 +221,7 @@ void subghz_test_packet_exit(void* context) {
if(model->status == SubGhzTestPacketModelStatusRx) {
furi_hal_subghz_stop_async_rx();
} else if(model->status == SubGhzTestPacketModelStatusTx) {
- subghz_encoder_princeton_for_testing_stop(instance->encoder, furi_hal_get_tick());
+ subghz_encoder_princeton_for_testing_stop(instance->encoder, furi_get_tick());
furi_hal_subghz_stop_async_tx();
}
return true;
@@ -242,7 +242,7 @@ SubGhzTestPacket* subghz_test_packet_alloc() {
view_set_exit_callback(instance->view, subghz_test_packet_exit);
instance->timer =
- osTimerNew(subghz_test_packet_rssi_timer_callback, osTimerPeriodic, instance, NULL);
+ furi_timer_alloc(subghz_test_packet_rssi_timer_callback, FuriTimerTypePeriodic, instance);
instance->decoder = subghz_decoder_princeton_for_testing_alloc();
subghz_decoder_princeton_for_testing_set_callback(
@@ -258,7 +258,7 @@ void subghz_test_packet_free(SubGhzTestPacket* instance) {
subghz_decoder_princeton_for_testing_free(instance->decoder);
subghz_encoder_princeton_for_testing_free(instance->encoder);
- osTimerDelete(instance->timer);
+ furi_timer_free(instance->timer);
view_free(instance->view);
free(instance);
}