Skip to content

Commit

Permalink
Update comments and function names in app_subghz.c
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed Jan 24, 2023
1 parent d53188d commit da2f928
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions app_subghz.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <furi_hal_spi.h>
#include <furi_hal_interrupt.h>

void raw_sampling_worker_start(ProtoViewApp *app);
void raw_sampling_worker_stop(ProtoViewApp *app);
void raw_sampling_timer_start(ProtoViewApp *app);
void raw_sampling_timer_stop(ProtoViewApp *app);

ProtoViewModulation ProtoViewModulations[] = {
{"OOK 650Khz", "FuriHalSubGhzPresetOok650Async",
Expand All @@ -30,9 +30,7 @@ ProtoViewModulation ProtoViewModulations[] = {
};

/* Called after the application initialization in order to setup the
* subghz system and put it into idle state. If the user wants to start
* receiving we will call radio_rx() to start a receiving worker and
* associated thread. */
* subghz system and put it into idle state. */
void radio_begin(ProtoViewApp* app) {
furi_assert(app);
furi_hal_subghz_reset();
Expand Down Expand Up @@ -68,7 +66,7 @@ void protoview_rx_callback(bool level, uint32_t duration, void *context) {
return;
}

/* Setup subghz to start receiving using a background worker. */
/* Setup the CC1101 to start receiving using a background worker. */
uint32_t radio_rx(ProtoViewApp* app) {
furi_assert(app);
if(!furi_hal_subghz_is_frequency_valid(app->frequency)) {
Expand All @@ -92,7 +90,7 @@ uint32_t radio_rx(ProtoViewApp* app) {
return value;
}

/* Stop subghz worker (if active), put radio on idle state. */
/* Stop receiving (if active) and put the radio on idle state. */
void radio_rx_end(ProtoViewApp* app) {
furi_assert(app);

Expand All @@ -111,8 +109,8 @@ void radio_rx_end(ProtoViewApp* app) {
void radio_sleep(ProtoViewApp* app) {
furi_assert(app);
if (app->txrx->txrx_state == TxRxStateRx) {
/* We can't go from having an active RX worker to sleeping.
* Stop the RX subsystems first. */
/* Stop the asynchronous receiving system before putting the
* chip into sleep. */
radio_rx_end(app);
}
furi_hal_subghz_sleep();
Expand Down

0 comments on commit da2f928

Please sign in to comment.