|
|
@@ -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",
|
|
|
@@ -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();
|
|
|
@@ -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)) {
|
|
|
@@ -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);
|
|
|
|
|
|
@@ -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();
|