1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/projects/default/main.c

41 lines
751 B
C
Raw Normal View History

2010-11-04 15:05:22 +01:00
/*
* Copyright (C) 2008, 2009, 2010 Kaspar Schleiser <kaspar@schleiser.de>
*/
#include <stdio.h>
#include <string.h>
#include <posix_io.h>
#include <ltc4150.h>
2010-11-04 15:05:22 +01:00
#include <shell.h>
#include <shell_commands.h>
#include <board_uart0.h>
#include <transceiver.h>
2010-11-04 15:05:22 +01:00
static int shell_readc() {
2010-11-04 15:05:22 +01:00
char c = 0;
(void) posix_read(uart0_handler_pid, &c, 1);
2010-11-04 15:05:22 +01:00
return c;
}
static void shell_putchar(int c) {
(void) putchar(c);
2010-11-04 15:05:22 +01:00
}
int main(void) {
shell_t shell;
(void) posix_open(uart0_handler_pid, 0);
ltc4150_start();
transceiver_init(TRANSCEIVER_CC1100);
(void) transceiver_start();
2010-11-04 16:21:45 +01:00
(void) puts("Welcome to ukleos!");
2010-11-04 15:05:22 +01:00
shell_init(&shell, NULL, shell_readc, shell_putchar);
2010-11-04 15:05:22 +01:00
shell_run(&shell);
return 0;
}