summaryrefslogtreecommitdiffhomepage
path: root/digital/io-serial/src/codebar/codebar.h
blob: 5b84f898b6a92a06812d9752b0bdf54c20409897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef codebar_h
#define codebar_h
/* codebar.h */
/*  {{{
 *
 * Copyright (C) 2011
 *
 * Robot APB Team/Efrei 2011
 *        Web: http://assos.efrei.fr/robot/
 *      Email: robot AT efrei DOT fr
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 * }}} */

/* Read a string from UART0 and return NULL or the string read. */
char* read_string(int uart_port); 

/* Take a string and check it againt the list of valid element
 * as defined in io-hub/src/robospierre/element.h and return the
 * u8 value of this element. 
 */
uint8_t string_to_element(char* data);

void proto_callback (uint8_t cmd, uint8_t size, uint8_t *args);

#endif /* codebar_h */