related Question "get pin status"(gayan_gamage-san)
When I call the "bool GPIO_GetPinStatus( GPIO_PORT port, GPIO_PIN pin )",
this function seems to return the "TRUE" and "FALSE" and non-"TRUE or FALSE".
And MT_dialog has suggested using the "enums" type rather than "bool" type.
How many return values using this function ?
And could you show me the meaning of the each return values("TRUE", "FALSE" and "?????")?
SDK Information:
源代码
\...\DA1458x_SDK\5.0.3\sdk\platform\driver\gpio\gpio.c
Discription:
* @brief Gets the GPIO status. The GPIO should have been previously configured as input!
*
* @param[in] port GPIO port
* @param[in] pin GPIO pin
*
* @return bool TRUE if the pin is high, FALSE if low. <<=====
regards.
Keywords:
Device:
Hi Jun-ichi Tobe,
I suppose the post that you are talking about is thishttp://support.dialog-semiconductor.com/get-pin-statusthe function accepts as parameters the enums GPIO_PORT and GPIO_PIN thats why the compiler was complaining, the output of the function is bool that means that returns true or false (true if the pin is hign and false if the pin is true). You can find this either in the comments of the function in the gpio.c as you ve indicated in your post or in the UM-B-051 document in the peripheral drivers section.
Thanks MT_dialog
谢谢你的中rt.
I had misunderstood the ENUM(return value type) and ENUMS(.function parameters).
I will check on again return values to my partner.
regards.