Skip to content

Commit

Permalink
added param & ret comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Noroian committed Dec 5, 2024
1 parent d6679ec commit 72c7b4c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions general/include/pca9539.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,32 +61,32 @@ typedef struct {
/**
* @brief Initialize the PCA9539 Driver
*
* @param pca
* @param writeFunc
* @param readFunc
* @param dev_addr
* @param pca pointer to a new driver struct
* @param writeFunc function pointer to HAL specific write func
* @param readFunc function pointer to HAL specific read func
* @param dev_addr i2c device address
*/
void pca9539_init(pca9539_t *pca, WritePtr writeFunc, ReadPtr readFunc,
uint8_t dev_addr);

/**
* @brief Read the register of the PCA9539
*
* @param pca
* @param reg_type
* @param buf
* @return int
* @param pca pointer to driver struct with read & write funcs
* @param reg_type type of register being read
* @param buf pointer to buffer storing reg data
* @return int Error code return
*/
int pca9539_read_reg(pca9539_t *pca, uint8_t reg_type, uint8_t *buf);

/**
* @brief Read the pin state of the PCA9539
*
* @param pca
* @param reg_type
* @param pin
* @param buf
* @return int
* @param pca pointer to driver struct with read & write funcs
* @param reg_type type of register being read
* @param pin pin num to read
* @param buf pointer storing buffer state
* @return int Error code return
*/
int pca9539_read_pin(pca9539_t *pca, uint8_t reg_type, uint8_t pin,
uint8_t *buf);
Expand All @@ -95,21 +95,21 @@ int pca9539_read_pin(pca9539_t *pca, uint8_t reg_type, uint8_t pin,
* @brief Write the register of the PCA9539
*
* @param pca
* @param reg_type
* @param buf
* @return int
* @param pca pointer to driver struct with read & write funcs
* @param reg_type type of register being written to
* @param buf pointer with value to write to reg
* @return int Error code return
*/
int pca9539_write_reg(pca9539_t *pca, uint8_t reg_type, uint8_t buf);

/**
* @brief Write the pin of the PCA9539
*
* @param pca
* @param reg_type
* @param pin
* @param buf
* @return int
* @param pca pointer to driver struct with read & write funcs
* @param reg_type type of register being written to
* @param pin pin to modify
* @param buf pointer with value to write to reg
* @return int Error code return
*/
int pca9539_write_pin(pca9539_t *pca, uint8_t reg_type, uint8_t pin,
uint8_t buf);
Expand Down

0 comments on commit 72c7b4c

Please sign in to comment.