External CC1101 transceiver access API. More...
#include <lib/subghz/devices/preset.h>#include <stdbool.h>#include <stdint.h>#include <stddef.h>#include <toolbox/level_duration.h>#include <furi_hal_gpio.h>Go to the source code of this file.
Typedefs | |
| typedef void(* | SubGhzDeviceCC1101ExtCaptureCallback) (bool level, uint32_t duration, void *context) |
| Signal Timings Capture callback. | |
| typedef LevelDuration(* | SubGhzDeviceCC1101ExtCallback) (void *context) |
| Async TX callback type. | |
Functions | |
| void | subghz_device_cc1101_ext_set_async_mirror_pin (const GpioPin *pin) |
| const GpioPin * | subghz_device_cc1101_ext_get_data_gpio (void) |
| Get data GPIO. | |
| bool | subghz_device_cc1101_ext_alloc (void) |
| Initialize device. | |
| void | subghz_device_cc1101_ext_free (void) |
| Deinitialize device. | |
| bool | subghz_device_cc1101_ext_is_connect (void) |
| Check and switch to power save mode Used by internal API-HAL initialization routine Can be used to reinitialize device to safe state and send it to sleep. | |
| void | subghz_device_cc1101_ext_sleep (void) |
| Send device to sleep mode. | |
| void | subghz_device_cc1101_ext_dump_state (void) |
| Dump info to stdout. | |
| void | subghz_device_cc1101_ext_load_custom_preset (const uint8_t *preset_data) |
| Load custom registers from preset. | |
| void | subghz_device_cc1101_ext_load_registers (const uint8_t *data) |
| Load registers. | |
| void | subghz_device_cc1101_ext_load_patable (const uint8_t data[8]) |
| Load PATABLE. | |
| void | subghz_device_cc1101_ext_write_packet (const uint8_t *data, uint8_t size) |
| Write packet to FIFO. | |
| bool | subghz_device_cc1101_ext_rx_pipe_not_empty (void) |
| Check if receive pipe is not empty. | |
| bool | subghz_device_cc1101_ext_is_rx_data_crc_valid (void) |
| Check if received data crc is valid. | |
| void | subghz_device_cc1101_ext_read_packet (uint8_t *data, uint8_t *size) |
| Read packet from FIFO. | |
| void | subghz_device_cc1101_ext_flush_rx (void) |
| Flush rx FIFO buffer. | |
| void | subghz_device_cc1101_ext_flush_tx (void) |
| Flush tx FIFO buffer. | |
| void | subghz_device_cc1101_ext_shutdown (void) |
| Shutdown Issue SPWD command. | |
| void | subghz_device_cc1101_ext_reset (void) |
| Reset Issue reset command. | |
| void | subghz_device_cc1101_ext_idle (void) |
| Switch to Idle. | |
| void | subghz_device_cc1101_ext_rx (void) |
| Switch to Receive. | |
| bool | subghz_device_cc1101_ext_tx (void) |
| Switch to Transmit. | |
| float | subghz_device_cc1101_ext_get_rssi (void) |
| Get RSSI value in dBm. | |
| uint8_t | subghz_device_cc1101_ext_get_lqi (void) |
| Get LQI. | |
| bool | subghz_device_cc1101_ext_is_frequency_valid (uint32_t value) |
| Check if frequency is in valid range. | |
| uint32_t | subghz_device_cc1101_ext_set_frequency (uint32_t value) |
| Set frequency. | |
| void | subghz_device_cc1101_ext_start_async_rx (SubGhzDeviceCC1101ExtCaptureCallback callback, void *context) |
| Enable signal timings capture Initializes GPIO and TIM2 for timings capture. | |
| void | subghz_device_cc1101_ext_stop_async_rx (void) |
| Disable signal timings capture Resets GPIO and TIM2. | |
| bool | subghz_device_cc1101_ext_start_async_tx (SubGhzDeviceCC1101ExtCallback callback, void *context) |
| Start async TX Initializes GPIO, TIM2 and DMA1 for signal output. | |
| bool | subghz_device_cc1101_ext_is_async_tx_complete (void) |
| Wait for async transmission to complete. | |
| void | subghz_device_cc1101_ext_stop_async_tx (void) |
| Stop async transmission and cleanup resources Resets GPIO, TIM2, and DMA1. | |
External CC1101 transceiver access API.
| typedef LevelDuration(* SubGhzDeviceCC1101ExtCallback) (void *context) |
Async TX callback type.
| context | callback context |
| bool subghz_device_cc1101_ext_alloc | ( | void | ) |
Initialize device.
| const GpioPin * subghz_device_cc1101_ext_get_data_gpio | ( | void | ) |
Get data GPIO.
| uint8_t subghz_device_cc1101_ext_get_lqi | ( | void | ) |
Get LQI.
| float subghz_device_cc1101_ext_get_rssi | ( | void | ) |
Get RSSI value in dBm.
| bool subghz_device_cc1101_ext_is_async_tx_complete | ( | void | ) |
Wait for async transmission to complete.
| bool subghz_device_cc1101_ext_is_frequency_valid | ( | uint32_t | value | ) |
Check if frequency is in valid range.
| value | frequency in Hz |
| bool subghz_device_cc1101_ext_is_rx_data_crc_valid | ( | void | ) |
Check if received data crc is valid.
| void subghz_device_cc1101_ext_load_custom_preset | ( | const uint8_t * | preset_data | ) |
Load custom registers from preset.
| preset_data | registers to load |
| void subghz_device_cc1101_ext_load_patable | ( | const uint8_t | data[8] | ) |
Load PATABLE.
| data | 8 uint8_t values |
| void subghz_device_cc1101_ext_load_registers | ( | const uint8_t * | data | ) |
Load registers.
| data | Registers data |
| void subghz_device_cc1101_ext_read_packet | ( | uint8_t * | data, |
| uint8_t * | size ) |
Read packet from FIFO.
| data | pointer |
| size | size |
| void subghz_device_cc1101_ext_reset | ( | void | ) |
Reset Issue reset command.
| bool subghz_device_cc1101_ext_rx_pipe_not_empty | ( | void | ) |
Check if receive pipe is not empty.
| uint32_t subghz_device_cc1101_ext_set_frequency | ( | uint32_t | value | ) |
Set frequency.
| value | frequency in Hz |
| void subghz_device_cc1101_ext_shutdown | ( | void | ) |
Shutdown Issue SPWD command.
| void subghz_device_cc1101_ext_start_async_rx | ( | SubGhzDeviceCC1101ExtCaptureCallback | callback, |
| void * | context ) |
Enable signal timings capture Initializes GPIO and TIM2 for timings capture.
| callback | SubGhzDeviceCC1101ExtCaptureCallback |
| context | callback context |
| bool subghz_device_cc1101_ext_start_async_tx | ( | SubGhzDeviceCC1101ExtCallback | callback, |
| void * | context ) |
Start async TX Initializes GPIO, TIM2 and DMA1 for signal output.
| callback | SubGhzDeviceCC1101ExtCallback |
| context | callback context |
| bool subghz_device_cc1101_ext_tx | ( | void | ) |
Switch to Transmit.
| void subghz_device_cc1101_ext_write_packet | ( | const uint8_t * | data, |
| uint8_t | size ) |
Write packet to FIFO.
| data | bytes array |
| size | size |