X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=boards%2Fat91sam7s-ek%2Ftemplates%2Fat91sam7s-ek_empty%2Fmain.c;fp=boards%2Fat91sam7s-ek%2Ftemplates%2Fat91sam7s-ek_empty%2Fmain.c;h=516bfad06aa01ef67d3159183d164f96dea776ff;hb=8f7814c52313b79a67ddbfef7a068af343ea6541;hp=0000000000000000000000000000000000000000;hpb=e04285605a166a50fada6dcc601ee2ad2fedb32f;p=bertos.git diff --git a/boards/at91sam7s-ek/templates/at91sam7s-ek_empty/main.c b/boards/at91sam7s-ek/templates/at91sam7s-ek_empty/main.c new file mode 100644 index 00000000..516bfad0 --- /dev/null +++ b/boards/at91sam7s-ek/templates/at91sam7s-ek_empty/main.c @@ -0,0 +1,77 @@ +/** + * \file + * + * + * \author Andrea Righi + * + * \brief Empty project. + * + * This is a minimalist project, it just initializes the hardware of the + * supported board and proposes an empty main. + */ + +#include "hw/hw_led.h" + +#include + +#include + +#include +#include + +static Serial out; + +static void init(void) +{ + /* Enable all the interrupts */ + IRQ_ENABLE; + + /* Initialize debugging module (allow kprintf(), etc.) */ + kdbg_init(); + /* Initialize system timer */ + timer_init(); + /* Initialize UART0 */ + ser_init(&out, SER_UART0); + /* Configure UART0 to work at 115.200 bps */ + ser_setbaudrate(&out, 115200); + /* Initialize LED driver */ + LED_INIT(); +} + +int main(void) +{ + init(); + + /* Put your code here... */ + while (1) + { + } +}