[riot-notifications] [RIOT] drivers/gpio: changed periph driver interface (#3095)

Kaspar Schleiser notifications at github.com
Fri Jun 5 09:46:48 CEST 2015


> +
> +int main(void)
> +{
> +    shell_t shell;
> +
> +    puts("GPIO peripheral driver test\n");
> +    puts("In this test, pins are specified by integer port and pin numbers.\n"
> +         "So if your platform has a pin PA01, it will be port=0 and pin=1,\n"
> +         "PC14 would be port=2 and pin=14 etc.\n\n"
> +         "NOTE: make sure the values you use exist on your platform! The\n"
> +         "      behavior for not existing ports/pins is not defined!");
> +
> +    /* start the shell */
> +    (void) posix_open(uart0_handler_pid, 0);
> +    shell_init(&shell, shell_commands, SHELL_BUFSIZE, uart0_readc, uart0_putc);
> +    shell_run(&shell);
>  
>      return 0;
>  }

I don't think that's a good idea. With the new interface, *all* accessible pins might be toggled. That includes e.g., the pin that was configured as input for the clock system.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3095/files#r31793215
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150605/ab563dd0/attachment-0001.html>


More information about the notifications mailing list