epuckecho.c
Go to the documentation of this file.
00001 /*
00002         Aseba - an event-based framework for distributed robot control
00003         Copyright (C) 2007--2010:
00004                 Stephane Magnenat <stephane at magnenat dot net>
00005                 (http://stephane.magnenat.net)
00006                 and other contributors, see authors.txt for details
00007         
00008         This program is free software: you can redistribute it and/or modify
00009         it under the terms of the GNU Lesser General Public License as published
00010         by the Free Software Foundation, version 3 of the License.
00011         
00012         This program is distributed in the hope that it will be useful,
00013         but WITHOUT ANY WARRANTY; without even the implied warranty of
00014         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015         GNU Lesser General Public License for more details.
00016         
00017         You should have received a copy of the GNU Lesser General Public License
00018         along with this program. If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #include <p30f6014a.h>
00022 
00023 #include <e_epuck_ports.h>
00024 #include <e_uart_char.h>
00025 
00026 int main()
00027 {
00028         e_init_port();
00029         e_init_uart1();
00030         
00031         int i;
00032         for (i = 0; i < 14; i++)
00033         {
00034                 char c;
00035                 while (!e_ischar_uart1());
00036                 e_getchar_uart1(&c);
00037         }
00038         
00039         while (1)
00040         {
00041                 char c;
00042                 while (!e_ischar_uart1());
00043                 e_getchar_uart1(&c);
00044                 e_send_uart1_char(&c, 1);
00045                 while (e_uart1_sending());
00046         }
00047         return 0;
00048 }


aseba
Author(s): Stéphane Magnenat
autogenerated on Sun Oct 5 2014 23:46:38