Skip to content

Instantly share code, notes, and snippets.

@AlexanderSavochkin
Last active July 4, 2018 23:25
Show Gist options
  • Save AlexanderSavochkin/7836059c224c54f4c8127c7a4fddf2f1 to your computer and use it in GitHub Desktop.
Save AlexanderSavochkin/7836059c224c54f4c8127c7a4fddf2f1 to your computer and use it in GitHub Desktop.
Simple LED blink on Arduino Due board
#include "due_sam3x.init.h"
int main(void)
{
/* The general init (clock, libc, watchdog disable) */
init_controller();
PIO_Configure(PIOB, PIO_OUTPUT_1, PIO_PB27, PIO_DEFAULT);
while(1)
{
PIOB->PIO_SODR = PIO_PB27;
Sleep(1000);
PIOB->PIO_CODR = PIO_PB27;
Sleep(1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment