Mistake on this page?
Report an issue in GitHub or email us

GPIO

Implement the api declared in mbed-os/hal/gpio_api.h. You must define the struct gpio_t. This struct is commonly defined in an objects.h file within the mbed-os/targets/TARGET_VENDOR/, mbed-os/targets/TARGET_VENDOR/TARGET_MCU_FAMILY or mbed-os/targets/TARGET_VENDOR/TARGET_MCU_FAMILY/TARGET_MCUNAME directories.

You should define the Physical LEDs and switches in the target's PinNames.h file. LED and switch names begin incrementing at 1 and follow the convention LED1...LEDn and BUTTON1...BUTTONn. You can see an example for more information.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.