[FL-41] api-hal doxygen documentation (#387)

* targets/api-hal: rework documentation in doxygen style
* core/api-hal: rework documentation in doxygen style
* core/furi: rework documentation in doxygen style
* drivers: rework documentation in doxygen style

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
gornekich
2021-03-24 12:35:33 +03:00
committed by GitHub
parent cc263d743b
commit 610f4f5d73
23 changed files with 325 additions and 161 deletions

View File

@@ -8,8 +8,18 @@
extern "C" {
#endif
/** Init I2C */
void api_hal_i2c_init();
/**
* Perform I2C tx transfer
* @param instance I2C_TypeDef instance
* @param address I2C slave address
* @param data pointer to data buffer
* @param size size of data buffer
* @param timeout timeout in CPU ticks
* @return true on successful transfer, false otherwise
*/
bool api_hal_i2c_tx(
I2C_TypeDef* instance,
const uint8_t address,
@@ -17,6 +27,15 @@ bool api_hal_i2c_tx(
const uint8_t size,
uint32_t timeout);
/**
* Perform I2C rx transfer
* @param instance I2C_TypeDef instance
* @param address I2C slave address
* @param data pointer to data buffer
* @param size size of data buffer
* @param timeout timeout in CPU ticks
* @return true on successful transfer, false otherwise
*/
bool api_hal_i2c_rx(
I2C_TypeDef* instance,
const uint8_t address,
@@ -24,6 +43,17 @@ bool api_hal_i2c_rx(
const uint8_t size,
uint32_t timeout);
/**
* Perform I2C tx and rx transfers
* @param instance I2C_TypeDef instance
* @param address I2C slave address
* @param tx_data pointer to tx data buffer
* @param tx_size size of tx data buffer
* @param rx_data pointer to rx data buffer
* @param rx_size size of rx data buffer
* @param timeout timeout in CPU ticks
* @return true on successful transfer, false otherwise
*/
bool api_hal_i2c_trx(
I2C_TypeDef* instance,
const uint8_t address,
@@ -33,10 +63,18 @@ bool api_hal_i2c_trx(
const uint8_t rx_size,
uint32_t timeout);
/** Acquire I2C mutex */
void api_hal_i2c_lock();
/** Release I2C mutex */
void api_hal_i2c_unlock();
/**
* With clause for I2C peripheral
* @param type type of function_body
* @param pointer pointer to return of function_body
* @param function_body a (){} lambda declaration, executed with I2C mutex acquired
*/
#define with_api_hal_i2c(type, pointer, function_body) \
{ \
api_hal_i2c_lock(); \