Files
simtrace2/sam3s_example/mains/debug_uart_stdlib.c
Christina Quast 0f1b36f0ae Using existing atmel led routines
There is a config file called led.c in the atmel softpack source code
which provides routines for configuring, setting and clearing the LEDs.
2014-12-16 10:59:13 +01:00

34 lines
591 B
C

#include "board.h"
#include <stdio.h>
#include <string.h>
extern void UART_PutString(const char *str, int len);
void Configure_LEDs() {
LED_Configure(LED_NUM_RED);
LED_Configure(LED_NUM_GREEN);
}
int main() {
size_t ret = 0;
Configure_LEDs();
ret = printf("Clockval: %d\r\n", BOARD_MCK);
if (ret < 0){
LED_Clear(LED_NUM_GREEN);
LED_Set(LED_NUM_RED);
} else {
LED_Clear(LED_NUM_RED);
LED_Set(LED_NUM_GREEN);
while (1) {
printf("Clockval**++????: %d\r\n", BOARD_MCK);
}
}
return 0;
}