/* The S1 button state is provided by GPIO pin 1. But as this *pinisalsousedforuartinputasalternatefunction,the *operationalmodesmustbeswitchedfirst: *1)disableuartusingset_latch_u5() *2)turnoffalternatefunctionimplicitlythrough *gpio_direction_input() *3)readtheGPIO'scurrentvalue *4)undostep2byenablingalternatefunction(inthis *modetheGPIOdirectionisfixed,sonochangeneeded) *5)turnonuartagain *TheGPIOvalueoccurstobeinverted,sopinhighmeans *buttonisnotpressed.
*/ staticbool rb532_button_pressed(void)
{ int val;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.