8#include <lib/subghz/devices/preset.h>
13#include <toolbox/level_duration.h>
14#include <furi_hal_gpio.h>
21#define FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL (256u)
22#define FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_HALF (FURI_HAL_SUBGHZ_ASYNC_TX_BUFFER_FULL / 2)
23#define FURI_HAL_SUBGHZ_ASYNC_TX_GUARD_TIME (999u)
40void furi_hal_subghz_set_async_mirror_pin(
const GpioPin* pin);
const GpioPin * furi_hal_subghz_get_data_gpio(void)
Get data GPIO.
Definition furi_hal_subghz.c:65
void furi_hal_subghz_write_packet(const uint8_t *data, uint8_t size)
Write packet to FIFO.
Definition furi_hal_subghz.c:215
void furi_hal_subghz_sleep(void)
Send device to sleep mode.
Definition furi_hal_subghz.c:138
void furi_hal_subghz_dump_state(void)
Dump info to stdout.
Definition furi_hal_subghz.c:153
void furi_hal_subghz_flush_rx(void)
Flush rx FIFO buffer.
Definition furi_hal_subghz.c:226
bool furi_hal_subghz_is_frequency_valid(uint32_t value)
Check if frequency is in valid range.
Definition furi_hal_subghz.c:338
void furi_hal_subghz_rx(void)
Switch to Receive.
Definition furi_hal_subghz.c:297
void furi_hal_subghz_load_custom_preset(const uint8_t *preset_data)
Load custom registers from preset.
Definition furi_hal_subghz.c:162
void furi_hal_subghz_stop_async_tx(void)
Stop async transmission and cleanup resources Resets GPIO, TIM2, and DMA1.
Definition furi_hal_subghz.c:795
void furi_hal_subghz_start_async_rx(FuriHalSubGhzCaptureCallback callback, void *context)
Enable signal timings capture Initializes GPIO and TIM2 for timings capture.
Definition furi_hal_subghz.c:460
float furi_hal_subghz_get_rssi(void)
Get RSSI value in dBm.
Definition furi_hal_subghz.c:315
uint8_t furi_hal_subghz_get_lqi(void)
Get LQI.
Definition furi_hal_subghz.c:330
bool furi_hal_subghz_rx_pipe_not_empty(void)
Check if receive pipe is not empty.
Definition furi_hal_subghz.c:238
bool furi_hal_subghz_is_async_tx_complete(void)
Wait for async transmission to complete.
Definition furi_hal_subghz.c:791
uint32_t furi_hal_subghz_set_frequency(uint32_t value)
Set frequency.
Definition furi_hal_subghz.c:362
void furi_hal_subghz_load_registers(const uint8_t *data)
Load registers.
Definition furi_hal_subghz.c:194
void furi_hal_subghz_flush_tx(void)
Flush tx FIFO buffer.
Definition furi_hal_subghz.c:232
bool furi_hal_subghz_start_async_tx(FuriHalSubGhzAsyncTxCallback callback, void *context)
Start async TX Initializes GPIO, TIM2 and DMA1 for signal output.
Definition furi_hal_subghz.c:687
bool furi_hal_subghz_tx(void)
Switch to Transmit.
Definition furi_hal_subghz.c:305
void furi_hal_subghz_shutdown(void)
Shutdown Issue SPWD command.
Definition furi_hal_subghz.c:272
FuriHalSubGhzPath
Switchable Radio Paths.
Definition furi_hal_subghz.h:26
@ FuriHalSubGhzPath868
Center Frequency: 868MHz.
Definition furi_hal_subghz.h:30
@ FuriHalSubGhzPathIsolate
Isolate Radio from antenna.
Definition furi_hal_subghz.h:27
@ FuriHalSubGhzPath433
Center Frequency: 433MHz.
Definition furi_hal_subghz.h:28
@ FuriHalSubGhzPath315
Center Frequency: 315MHz.
Definition furi_hal_subghz.h:29
void furi_hal_subghz_stop_async_rx(void)
Disable signal timings capture Resets GPIO and TIM2.
Definition furi_hal_subghz.c:529
bool furi_hal_subghz_is_rx_data_crc_valid(void)
Check if received data crc is valid.
Definition furi_hal_subghz.c:251
void furi_hal_subghz_init(void)
Initialize and switch to power save mode Used by internal API-HAL initialization routine Can be used ...
Definition furi_hal_subghz.c:69
void furi_hal_subghz_reset(void)
Reset Issue reset command.
Definition furi_hal_subghz.c:279
LevelDuration(* FuriHalSubGhzAsyncTxCallback)(void *context)
Async TX callback type.
Definition furi_hal_subghz.h:201
void furi_hal_subghz_load_patable(const uint8_t data[8])
Load PATABLE.
Definition furi_hal_subghz.c:207
void furi_hal_subghz_set_path(FuriHalSubGhzPath path)
Set path.
Definition furi_hal_subghz.c:379
void(* FuriHalSubGhzCaptureCallback)(bool level, uint32_t duration, void *context)
Signal Timings Capture callback.
Definition furi_hal_subghz.h:184
void furi_hal_subghz_idle(void)
Switch to Idle.
Definition furi_hal_subghz.c:289
void furi_hal_subghz_read_packet(uint8_t *data, uint8_t *size)
Read packet from FIFO.
Definition furi_hal_subghz.c:263
uint32_t furi_hal_subghz_set_frequency_and_path(uint32_t value)
Set frequency and path This function automatically selects antenna matching network.
Definition furi_hal_subghz.c:348
Gpio structure.
Definition furi_hal_gpio.h:161
Definition level_duration.h:15