1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/projects/default/main.c
Oliver Hahm 3b4de3d39c [projects default]
* adapted default project to different platforms

[sys transceiver]

* removed warning
2012-11-07 09:11:10 -05:00

45 lines
816 B
C

/*
* Copyright (C) 2008, 2009, 2010 Kaspar Schleiser <kaspar@schleiser.de>
*/
#include <stdio.h>
#include <string.h>
#include <posix_io.h>
#include <ltc4150.h>
#include <shell.h>
#include <shell_commands.h>
#include <board_uart0.h>
#include <transceiver.h>
static int shell_readc() {
char c = 0;
(void) posix_read(uart0_handler_pid, &c, 1);
return c;
}
static void shell_putchar(int c) {
(void) putchar(c);
}
int main(void) {
shell_t shell;
(void) posix_open(uart0_handler_pid, 0);
#ifdef MODULE_LTC4150
ltc4150_start();
#endif
#ifdef MODULE_TRANSCEIVER
transceiver_init(TRANSCEIVER_CC1100);
(void) transceiver_start();
#endif
(void) puts("Welcome to ukleos!");
shell_init(&shell, NULL, shell_readc, shell_putchar);
shell_run(&shell);
return 0;
}