[FL-1906] Documentation: add Doxyfile, prepare sources for doxygen. (#741)

* Documentation: add Doxyfile, prepare sources for doxygen.

* Update ReadMe and remove obsolete CLA

* Add contribution guide

* Contributing: update text

* Correct spelling
This commit is contained in:
あく
2021-10-03 13:36:05 +03:00
committed by GitHub
parent 1208a5077f
commit 89a6c09a7a
66 changed files with 4846 additions and 1224 deletions

View File

@@ -1,3 +1,8 @@
/**
* @file furi-hal-subghz.h
* SubGhz HAL API
*/
#pragma once
#include <stdbool.h>
@@ -11,130 +16,148 @@ extern "C" {
/** Radio Presets */
typedef enum {
FuriHalSubGhzPresetOok270Async, /** OOK, bandwidth 270kHz, asynchronous */
FuriHalSubGhzPresetOok650Async, /** OOK, bandwidth 650kHz, asynchronous */
FuriHalSubGhzPreset2FSKAsync, /** FM, asynchronous */
FuriHalSubGhzPresetOok270Async, /**< OOK, bandwidth 270kHz, asynchronous */
FuriHalSubGhzPresetOok650Async, /**< OOK, bandwidth 650kHz, asynchronous */
FuriHalSubGhzPreset2FSKAsync, /**< FM, asynchronous */
} FuriHalSubGhzPreset;
/** Switchable Radio Paths */
/** Switchable Radio Paths */
typedef enum {
FuriHalSubGhzPathIsolate, /** Isolate Radio from antenna */
FuriHalSubGhzPath433, /** Center Frquency: 433MHz. Path 1: SW1RF1-SW2RF2, LCLCL */
FuriHalSubGhzPath315, /** Center Frquency: 315MHz. Path 2: SW1RF2-SW2RF1, LCLCLCL */
FuriHalSubGhzPath868, /** Center Frquency: 868MHz. Path 3: SW1RF3-SW2RF3, LCLC */
FuriHalSubGhzPathIsolate, /**< Isolate Radio from antenna */
FuriHalSubGhzPath433, /**< Center Frquency: 433MHz. Path 1: SW1RF1-SW2RF2, LCLCL */
FuriHalSubGhzPath315, /**< Center Frquency: 315MHz. Path 2: SW1RF2-SW2RF1, LCLCLCL */
FuriHalSubGhzPath868, /**< Center Frquency: 868MHz. Path 3: SW1RF3-SW2RF3, LCLC */
} FuriHalSubGhzPath;
/** SubGhz state */
typedef enum {
SubGhzStateInit, /** Init pending */
SubGhzStateInit, /**< Init pending */
SubGhzStateIdle, /** Idle, energy save mode */
SubGhzStateIdle, /**< Idle, energy save mode */
SubGhzStateAsyncRx, /** Async RX started */
SubGhzStateAsyncRx, /**< Async RX started */
SubGhzStateAsyncTx, /** Async TX started, DMA and timer is on */
SubGhzStateAsyncTxLast, /** Async TX continue, DMA completed and timer got last value to go */
SubGhzStateAsyncTxEnd, /** Async TX complete, cleanup needed */
SubGhzStateAsyncTx, /**< Async TX started, DMA and timer is on */
SubGhzStateAsyncTxLast, /**< Async TX continue, DMA completed and timer got last value to go */
SubGhzStateAsyncTxEnd, /**< Async TX complete, cleanup needed */
} SubGhzState;
/** SubGhz regulation, receive transmission on the current frequency for the region */
/** SubGhz regulation, receive transmission on the current frequency for the
* region */
typedef enum {
SubGhzRegulationOnlyRx, /**only Rx*/
SubGhzRegulationTxRx, /**TxRx*/
} SubGhzRegulation;
/** Initialize and switch to power save mode
* Used by internal API-HAL initalization routine
* Can be used to reinitialize device to safe state and send it to sleep
/** Initialize and switch to power save mode Used by internal API-HAL
* initalization routine Can be used to reinitialize device to safe state and
* send it to sleep
*/
void furi_hal_subghz_init();
/** Send device to sleep mode */
/** Send device to sleep mode
*/
void furi_hal_subghz_sleep();
/** Dump info to stdout */
/** Dump info to stdout
*/
void furi_hal_subghz_dump_state();
/** Load registers from preset by preset name
* @param preset to load
/** Load registers from preset by preset name
*
* @param preset to load
*/
void furi_hal_subghz_load_preset(FuriHalSubGhzPreset preset);
/** Get status */
uint8_t furi_hal_subghz_get_status();
/** Load registers
* @param register-value pairs array, terminated with {0,0}
*
* @param data Registers data
*/
void furi_hal_subghz_load_registers(const uint8_t data[][2]);
/** Load PATABLE
* @param data, 8 uint8_t values
*
* @param data 8 uint8_t values
*/
void furi_hal_subghz_load_patable(const uint8_t data[8]);
/** Write packet to FIFO
* @param data, bytes array
* @param size, size
*
* @param data bytes array
* @param size size
*/
void furi_hal_subghz_write_packet(const uint8_t* data, uint8_t size);
/** Read packet from FIFO
* @param data, pointer
* @param size, size
*
* @param data pointer
* @param size size
*/
void furi_hal_subghz_read_packet(uint8_t* data, uint8_t* size);
/** Flush rx FIFO buffer */
/** Flush rx FIFO buffer
*/
void furi_hal_subghz_flush_rx();
/** Shutdown
* Issue spwd command
* @warning registers content will be lost
/** Shutdown Issue spwd command
* @warning registers content will be lost
*/
void furi_hal_subghz_shutdown();
/** Reset
* Issue reset command
* @warning registers content will be lost
/** Reset Issue reset command
* @warning registers content will be lost
*/
void furi_hal_subghz_reset();
/** Switch to Idle */
/** Switch to Idle
*/
void furi_hal_subghz_idle();
/** Switch to Recieve */
/** Switch to Recieve
*/
void furi_hal_subghz_rx();
/** Switch to Transmit
* @return true if the transfer is allowed by belonging to the region
*/
*
* @return true if the transfer is allowed by belonging to the region
*/
bool furi_hal_subghz_tx();
/** Get RSSI value in dBm */
/** Get RSSI value in dBm
*
* @return RSSI value
*/
float furi_hal_subghz_get_rssi();
/** Check if frequency is in valid range
* @return true if frequncy is valid, otherwise false
*
* @param value frequency in Hz
*
* @return true if frequncy is valid, otherwise false
*/
bool furi_hal_subghz_is_frequency_valid(uint32_t value);
/** Set frequency and path
* This function automatically selects antenna matching network
* @param frequency in herz
* @return real frequency in herz
/** Set frequency and path This function automatically selects antenna matching
* network
*
* @param value frequency in Hz
*
* @return real frequency in herz
*/
uint32_t furi_hal_subghz_set_frequency_and_path(uint32_t value);
/** Set frequency
* @param frequency in herz
* @return real frequency in herz
*
* @param value frequency in Hz
*
* @return real frequency in herz
*/
uint32_t furi_hal_subghz_set_frequency(uint32_t value);
/** Set path
* @param radio path to use
*
* @param path path to use
*/
void furi_hal_subghz_set_path(FuriHalSubGhzPath path);
@@ -143,33 +166,39 @@ void furi_hal_subghz_set_path(FuriHalSubGhzPath path);
/** Signal Timings Capture callback */
typedef void (*FuriHalSubGhzCaptureCallback)(bool level, uint32_t duration, void* context);
/** Enable signal timings capture
* Initializes GPIO and TIM2 for timings capture
/** Enable signal timings capture Initializes GPIO and TIM2 for timings capture
*
* @param callback FuriHalSubGhzCaptureCallback
* @param context callback context
*/
void furi_hal_subghz_start_async_rx(FuriHalSubGhzCaptureCallback callback, void* context);
/** Disable signal timings capture
* Resets GPIO and TIM2
/** Disable signal timings capture Resets GPIO and TIM2
*/
void furi_hal_subghz_stop_async_rx();
/** Async TX callback type
* @param context - callback context
* @return LevelDuration
* @param context callback context
* @return LevelDuration
*/
typedef LevelDuration (*FuriHalSubGhzAsyncTxCallback)(void* context);
/** Start async TX
* Initializes GPIO, TIM2 and DMA1 for signal output
* @return true if the transfer is allowed by belonging to the region
/** Start async TX Initializes GPIO, TIM2 and DMA1 for signal output
*
* @param callback FuriHalSubGhzAsyncTxCallback
* @param context callback context
*
* @return true if the transfer is allowed by belonging to the region
*/
bool furi_hal_subghz_start_async_tx(FuriHalSubGhzAsyncTxCallback callback, void* context);
/** Wait for async transmission to complete */
/** Wait for async transmission to complete
*
* @return true if TX complete
*/
bool furi_hal_subghz_is_async_tx_complete();
/** Stop async transmission and cleanup resources
* Resets GPIO, TIM2, and DMA1
/** Stop async transmission and cleanup resources Resets GPIO, TIM2, and DMA1
*/
void furi_hal_subghz_stop_async_tx();