/*
 * exo_ahw_vdp_gpio_exp_pcs9673.h
 *
 *  Created on: Oct 27, 2023
 *      Author: Invcuser_63
 */

#ifndef DRIVERS_EXO_HAL_DRIVER_FW_EXO_AHW_AL_DRIVER_API_EXO_AHW_AL_WRAPPER_GPIO_PCA9673_INC_EXO_AHW_VDP_GPIO_EXP_PCA9673_H_
#define DRIVERS_EXO_HAL_DRIVER_FW_EXO_AHW_AL_DRIVER_API_EXO_AHW_AL_WRAPPER_GPIO_PCA9673_INC_EXO_AHW_VDP_GPIO_EXP_PCA9673_H_

#include "exo_hal_common.h"
#include "exo_ahw_al_gpio_exp_common.h"
#include "exo_io_al_i2c_common.h"

/**
 * @brief This API initializes the gpio pin as per the gpio_cfg_hdl.
 * @param[in] hgpio_exp        : Structure instance of gpio_exp_hdl.
 * @retval zero -> Success / -ve value -> Error.
 */
hal_ret_sts ahw_vdp_gpio_exp_pca9673_init(ahw_al_gpio_exp_hdle *hgpio_exp);

/**
 * @brief This API is used to read the state of the GPIO pin
 * @param[in] hgpio_exp    : Structure instance of
 * @param[in] pin     : pin whose state needs to be read
 * @param[out] pin_state  : state of the gpio pin
 * @return Result of API execution status
 * @retval zero -> Success / -ve value -> Error.
 */
hal_ret_sts ahw_vdp_gpio_exp_pca9673_readpin(ahw_al_gpio_exp_hdle *hgpio_exp, gpio_exp_gpio_pin pin, gpio_exp_gpio_pinstate *pin_state);

/**
 * @brief This API is used to write the state of the GPIO pin
 * @param[in] hgpio_exp    : Structure instance of gpio_exp_hdl.
 * @param[in] pin     : pin whose state needs to be changed
 * @param[in] pin_state   : state of the gpio pin that will be set to the gpio pin
 * @return Result of API execution status
 * @retval zero -> Success / -ve value -> Error.
 */
hal_ret_sts ahw_vdp_gpio_exp_pca9673_writepin(ahw_al_gpio_exp_hdle *hgpio_exp,gpio_exp_gpio_pin pin, gpio_exp_gpio_pinstate pin_state);

/**
 * @brief This API is used to writes and reads data from register
 * @param[in] hgpio_exp    : Structure instance of gpio_exp_hdl.
 * @return Result of API execution status
 * @retval zero -> Success / -ve value -> Error.
 */

hal_ret_sts ahw_vdp_gpio_exp_pca9673_self_test(ahw_al_gpio_exp_hdle *hgpio_exp);

/**
 * @brief This API is used for toggle gpio pin
 * @param[in] hgpio_exp    : Structure instance of gpio_exp_hdl.
 * @param[in] pin     : pin whose state needs to be changed
 * @return Result of API execution status
 * @retval zero -> Success / -ve value -> Error.
 */
hal_ret_sts ahw_vdp_gpio_exp_pca9673_togglepin(ahw_al_gpio_exp_hdle *hgpio_exp, gpio_exp_gpio_pin pin);

#endif /* DRIVERS_EXO_HAL_DRIVER_FW_EXO_AHW_AL_DRIVER_API_EXO_AHW_AL_WRAPPER_GPIO_PCA9673_INC_EXO_AHW_VDP_GPIO_EXP_PCA9673_H_ */
