mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
There is a config file called led.c in the atmel softpack source code which provides routines for configuring, setting and clearing the LEDs.
34 lines
591 B
C
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;
|
|
}
|