1 /*******************************************************************
2 Components for embedded applications builded for
3 laboratory and medical instruments firmware
5 cmd_bth.c - interconnection of text command processor
8 Copyright (C) 2001 by Pavel Pisa pisa@cmp.felk.cvut.cz
9 (C) 2002 by PiKRON Ltd. http://www.pikron.com
11 *******************************************************************/
14 #include <bth_inface.h>
16 #define ED_LINE_CHARS 80
18 /* cmd_io_t cmd_io_bth_dev; */
20 /* char ed_line_chars_bth_in[ED_LINE_CHARS+1]; */
21 /* char ed_line_chars_bth_out[ED_LINE_CHARS+1]; */
23 /* ed_line_buf_t ed_line_buf_bth_in={ */
24 /* flg:FL_ELB_ECHO, */
26 /* alloc:sizeof(ed_line_chars_bth_in), */
29 /* buf:ed_line_chars_bth_in */
32 /* ed_line_buf_t ed_line_buf_bth_out={ */
33 /* flg:FL_ELB_NOCRLF, */
35 /* alloc:sizeof(ed_line_chars_bth_out), */
38 /* buf:ed_line_chars_bth_out */
41 /* cmd_io_t cmd_io_bth={ */
42 /* putc:cmd_io_putc_ed_line, */
44 /* write:cmd_io_write_bychar, */
48 /* in: &ed_line_buf_bth_in, */
49 /* out:&ed_line_buf_bth_out, */
50 /* io_stack:&cmd_io_bth_dev */
55 int cmd_io_putc_bth(struct cmd_io *cmd_io,int ch)
57 return bth_inface_sendch(ch,0); //=0; //sci_bth_sendch(ch,IMPLIC_NUM_SERIAL_PORT);;
60 int cmd_io_getc_bth(struct cmd_io *cmd_io)
62 return bth_inface_recch(0);//=-1; //sci_bth_recch(IMPLIC_NUM_SERIAL_PORT);
68 write:cmd_io_write_bychar,
69 read:cmd_io_read_bychar