[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

@@ -12,39 +12,74 @@ typedef struct {
GpioPin* gpio;
} GpioDisableRecord;
// init GPIO API
/**
* Init GPIO API
* @return true on successful gpio initialization, false otherwize
*/
bool gpio_api_init();
// init GPIO
/**
* Init GPIO
* @param gpio GpioPin instance
* @param mode GpioMode gpio mode
*/
void gpio_init(const GpioPin* gpio, const GpioMode mode);
// init GPIO, extended version
/**
* Init GPIO, extended version
* @param gpio GpioPin instance
* @param mode GpioMode gpio mode
* @param pull GpioPull gpio pull mode
* @param speed GpioSpeed gpio speed
*/
void gpio_init_ex(
const GpioPin* gpio,
const GpioMode mode,
const GpioPull pull,
const GpioSpeed speed);
// write value to GPIO, false = LOW, true = HIGH
/**
* Write value to GPIO
* @param gpio GpioPin instance
* @param state false = LOW, true = HIGH
*/
static inline void gpio_write(const GpioPin* gpio, const bool state) {
hal_gpio_write(gpio, state);
}
// read value from GPIO, false = LOW, true = HIGH
/**
* Read value from GPIO
* @param gpio GpioPin instance
* @return false = LOW, true = HIGH
*/
static inline bool gpio_read(const GpioPin* gpio) {
return hal_gpio_read(gpio);
}
// put GPIO to Z-state
/**
* Put GPIO to Z-state
* @param gpio_record GpioDisableRecord instance
*/
void gpio_disable(GpioDisableRecord* gpio_record);
// get GPIO record
/**
* Get GPIO record
* @param name name of record
* @return ValueMutex instance
*/
ValueMutex* gpio_open_mutex(const char* name);
// get GPIO record and acquire mutex
/**
* Get GPIO record and acquire mutex
* @param name name of record
* @return GpioPin instance
*/
GpioPin* gpio_open(const char* name);
// get RFID IN level
/**
* Get RFID IN level
* @return false = LOW, true = HIGH
*/
bool get_rfid_in_level();
#ifdef __cplusplus