wip:
This commit is contained in:
@@ -30,7 +30,7 @@ extern "C"
|
||||
typedef struct // Structure for initial initialization of PCF8574 expander.
|
||||
{
|
||||
uint8_t task_priority; // Task priority for the PCF8574 expander isr processing. @note It is not recommended to set a value less than configMAX_PRIORITIES.
|
||||
uint8_t stack_size; // Stack size for task for the PCF8574 expander isr processing processing. @note The minimum size is 2048 bytes.
|
||||
uint8_t stack_size; // Stack size for task for the PCF8574 expander isr processing processing. @note The minimum size is 124 byte.
|
||||
uint8_t i2c_address; // Expander I2C address.
|
||||
bool p0_gpio_work_mode; // Expander GPIO PO work mode. True for input, false for output.
|
||||
bool p1_gpio_work_mode; // Expander GPIO P1 work mode. True for input, false for output.
|
||||
@@ -81,8 +81,6 @@ extern "C"
|
||||
* @param[in] handle Pointer to unique PCF8574 handle.
|
||||
* @param[out] reg Pointer to GPIO's status.
|
||||
*
|
||||
* @note For input GPIO's status will be 1 (HIGH) always.
|
||||
*
|
||||
* @return AVR_OK if success or an error code otherwise.
|
||||
*/
|
||||
avr_err_t zh_avr_pcf8574_read(zh_avr_pcf8574_handle_t *handle, uint8_t *reg);
|
||||
@@ -115,8 +113,6 @@ extern "C"
|
||||
* @param[in] gpio GPIO number.
|
||||
* @param[out] status Pointer to GPIO status (true - HIGH, false - LOW).
|
||||
*
|
||||
* @note For input GPIO's status will be 1 (HIGH) always.
|
||||
*
|
||||
* @return AVR_OK if success or an error code otherwise.
|
||||
*/
|
||||
avr_err_t zh_avr_pcf8574_read_gpio(zh_avr_pcf8574_handle_t *handle, uint8_t gpio, bool *status);
|
||||
@@ -134,6 +130,11 @@ extern "C"
|
||||
*/
|
||||
avr_err_t zh_avr_pcf8574_write_gpio(zh_avr_pcf8574_handle_t *handle, uint8_t gpio, bool status);
|
||||
|
||||
/**
|
||||
* @brief PCF8574 ISR handler.
|
||||
*/
|
||||
void zh_avr_pcf8574_isr_handler(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@@ -9,7 +9,6 @@ static zh_avr_vector_t _vector = {0};
|
||||
static avr_err_t _zh_avr_pcf8574_validate_config(const zh_avr_pcf8574_init_config_t *config);
|
||||
static avr_err_t _zh_avr_pcf8574_configure_i2c_device(const zh_avr_pcf8574_init_config_t *config, zh_avr_pcf8574_handle_t *handle);
|
||||
static avr_err_t _zh_avr_pcf8574_configure_interrupts(const zh_avr_pcf8574_init_config_t *config, zh_avr_pcf8574_handle_t handle);
|
||||
extern void zh_avr_pcf8574_isr_handler(void);
|
||||
static void _zh_avr_pcf8574_isr_processing_task(void *pvParameter);
|
||||
static avr_err_t _zh_avr_pcf8574_read_register(zh_avr_pcf8574_handle_t *handle, uint8_t *reg);
|
||||
static avr_err_t _zh_avr_pcf8574_write_register(zh_avr_pcf8574_handle_t *handle, uint8_t reg);
|
||||
|
Reference in New Issue
Block a user