[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:
@@ -1,3 +1,8 @@
|
||||
/**
|
||||
* @file furi-hal-i2c.h
|
||||
* I2C HAL API
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
@@ -8,17 +13,19 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Init I2C */
|
||||
/** Init I2C
|
||||
*/
|
||||
void furi_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
|
||||
/** 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 furi_hal_i2c_tx(
|
||||
I2C_TypeDef* instance,
|
||||
@@ -27,14 +34,15 @@ bool furi_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
|
||||
/** 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 furi_hal_i2c_rx(
|
||||
I2C_TypeDef* instance,
|
||||
@@ -43,16 +51,17 @@ bool furi_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
|
||||
/** 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 furi_hal_i2c_trx(
|
||||
I2C_TypeDef* instance,
|
||||
@@ -63,17 +72,22 @@ bool furi_hal_i2c_trx(
|
||||
const uint8_t rx_size,
|
||||
uint32_t timeout);
|
||||
|
||||
/** Acquire I2C mutex */
|
||||
/** Acquire I2C mutex
|
||||
*/
|
||||
void furi_hal_i2c_lock();
|
||||
|
||||
/** Release I2C mutex */
|
||||
/** Release I2C mutex
|
||||
*/
|
||||
void furi_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
|
||||
/** 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
|
||||
*
|
||||
* @return Nothing
|
||||
*/
|
||||
#define with_furi_hal_i2c(type, pointer, function_body) \
|
||||
{ \
|
||||
|
||||
Reference in New Issue
Block a user