📄 gpio_interface.h
字号:
/*================================================================================================*/
/*===== Gpio_IsPinPullupEn =====*/
/**
@brief Get the pull-up enable state of the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: GPIO pin to get pull-up enable state
(enabled/disabled).
@param bool_t *gpioEnPinPu - output parameter: pin's pull-up enable state (TRUE for pull-up
enabled, FALSE for pull-up disabled).
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than
gGpioPinMax_c or gpioEnPinPu is NULL.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_IsPinPullupEn(GpioPin_t gpioPin, bool_t* gpioEnPinPu);
/*PULLUP SELECT*/
/*================================================================================================*/
/*===== Gpio_SelectPinPullup =====*/
/**
@brief Select pull-up/pull-down of the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: pin which will be affected by the function.
@param GpioPinPullupSel_t gpioPinPuSel - input parameter: pin pull-up selection (gGpioPinPulldown_c
for pull-down selection, gGpioPinPullup_c for pull-up selection).
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than
gGpioPinMax_c or gpioPinPuSel is grater or equal than gGpioPinPullupMax_c.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_SelectPinPullup(GpioPin_t gpioPin, GpioPinPullupSel_t gpioPinPuSel);
/*================================================================================================*/
/*===== Gpio_GetPinPullupSel =====*/
/**
@brief Get the pull-up selection state of the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: GPIO pin to get pull-up selection state
(pull-up/pull-down).
@param GpioPinPullupSel_t *gpioPinPuSel - output parameter: pin pull-up selection state (gGpioPinPulldown_c
for pull-down selection, gGpioPinPullup_c for pull-up selection).
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than gGpioPinMax_c
or gpioPinPuSel is NULL.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_GetPinPullupSel(GpioPin_t gpioPin, GpioPinPullupSel_t* gpioPinPuSel);
/*PULLUP KEEPER*/
/*================================================================================================*/
/*===== Gpio_EnPinPuKeeper =====*/
/**
@brief Enable pull-up keeper of the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: pin which will be affected by the function.
@param bool_t gpioEnPinPuKeep - input parameter: pin pull-up keeper enable (TRUE for enabling
pull-up keeper, FALSE for disabling pull-up keeper).
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than gGpioPinMax_c.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_EnPinPuKeeper(GpioPin_t gpioPin, bool_t gpioEnPinPuKeep);
/*================================================================================================*/
/*===== Gpio_IsPinPuKeeperEn =====*/
/**
@brief Get the pull-up keeper enable state of the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: GPIO pin to get pull-up selection state
(pull-up/pull-down).
@param bool_t *gpioEnPinPuKeep - output parameter: pin pull-up keeper enable state (TRUE
for pull-up keeper enabled, FALSE for pull-up keeper disabled).
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than gGpioPinMax_c
or gpioPinPuSel is NULL.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_IsPinPuKeeperEn(GpioPin_t gpioPin, bool_t* gpioEnPinPuKeep);
/*HYSTERESIS*/
/*================================================================================================*/
/*===== Gpio_EnPinHyst =====*/
/**
@brief Enable hysteresis of the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: pin which will be affected by the function.
@param bool_t gpioEnPinPuKeep - input parameter: enable hysteresis state for the pin gpioPin
specified as parameter.
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than gGpioPinMax_c.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_EnPinHyst(GpioPin_t gpioPin, bool_t gpioEnPinHyst);
/*================================================================================================*/
/*===== Gpio_IsPinHystEn =====*/
/**
@brief Get the hysteresis enable state of the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: GPIO pin to get pull-up selection state
(pull-up/pull-down).
@param bool_t *gpioEnPinHyst - output parameter: pin's hysteresis enable state (TRUE for
hysteresis enabled, FALSE for hysteresis disabled).
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than
gGpioPinMax_c or gpioEnPinHyst is NULL.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_IsPinHystEn(GpioPin_t gpioPin, bool_t* gpioEnPinHyst);
/*FUCTION MODE*/
/*================================================================================================*/
/*===== Gpio_SetPortFunction =====*/
/**
@brief Set the functionality (GPIO or alternate function) for the gpioPort port specified as parameter.
@param GpioPort_t gpioPort - input parameter: port which will be affected by the function.
@param GpioFunctionMode_t gpioPortFunction - input parameter: port function mode.
@param uint32_t mask - input parameter: specifies which pins of the port gpioPort
should be affected by the function (the function mode would
be modified if the corresponding bit is set).
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPort port specified as parameter is grater or equal than
gGpioPortMax_c or gpioPortFunction is grater or equal than gGpioFunctionModeMax_c.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_SetPortFunction(GpioPort_t gpioPort, GpioFunctionMode_t gpioPortFunction, uint32_t mask);
/*================================================================================================*/
/*===== Gpio_SetPinFunction =====*/
/**
@brief Set function mode for the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: pin which will be affected by the function.
@param GpioFunctionMode_t gpioPinFunction - input parameter: pin function mode.
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than
gGpioPinMax_c or gpioPinFunction is grater or equal than gGpioFunctionModeMax_c.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_SetPinFunction(GpioPin_t gpioPin, GpioFunctionMode_t gpioPinFunction);
/*================================================================================================*/
/*===== Gpio_GetPinFunction =====*/
/**
@brief Get function mode of the pin gpioPin specified as parameter.
@param GpioPin_t gpioPin - input parameter: pin to get function mode.
@param GpioFunctionMode_t* gpioPinFunction - output parameter: pin's hysteresis enable state (TRUE for
hysteresis enabled, FALSE for hysteresis disabled).
@return parameter of type GpioErr_t with following possible values:
gGpioErrInvalidParamater_c - if the gpioPin pin specified as parameter is grater or equal than
gGpioPinMax_c or gpioPinFunction is NULL.
gGpioErrNoError_c - in rest.
Revision history:
Date Author Comments
---------- ---------------------- -------
26.06.2007 B04839 Created
*/
/*===============================================================================================*/
extern GpioErr_t Gpio_GetPinFunction(GpioPin_t gpioPin, GpioFunctionMode_t* gpioPinFunction);
#endif /* _GPIO_INTERFACE_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -