X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=app%2Ftriface%2Ftriface.c;h=00c1a58025fa3ca2d1f0077c51ef553946598431;hb=cfd59c8655ed7268c9c48aa58560158d235bc0de;hp=5856c9f06ea20cc0fe5e917eba35e242085e2057;hpb=9ba9dcf2a59a952609e19154e11de3e2478cbf42;p=bertos.git diff --git a/app/triface/triface.c b/app/triface/triface.c index 5856c9f0..00c1a580 100644 --- a/app/triface/triface.c +++ b/app/triface/triface.c @@ -26,7 +26,8 @@ * invalidate any other reasons why the executable file might be covered by * the GNU General Public License. * - * Copyright 2006 Develer S.r.l. (http://www.develer.com/) + * Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/) + * Copyright 2000 Bernardo Innocenti * * --> * @@ -38,40 +39,45 @@ * \brief Windowing system test. */ -/*#* - *#* $Log$ - *#* Revision 1.4 2006/06/14 00:28:52 marco - *#* Removed initial delay. - *#* - *#* Revision 1.3 2006/06/12 21:37:02 marco - *#* implemented some commands (ver and sleep) - *#* - *#* Revision 1.2 2006/06/01 12:29:21 marco - *#* Add first simple protocol command (version request). - *#* - *#* Revision 1.1 2006/05/18 00:41:47 bernie - *#* New triface devlib application. - *#* - *#*/ #include #include #include #include #include +#include +#include #include "protocol.h" +#include "hw_input.h" +#include "hw_adc.h" int main(void) { + /* SPI Port Initialization */ + sipo_init(); + kdbg_init(); timer_init(); -// buz_init(); + adc_init(); + buz_init(); IRQ_ENABLE; + INPUT_INIT; + + /* Initialize Tag serial port and data structure */ + TagPacket pkt; + + /* Open the main communication port */ + Serial *host_port = ser_open(CONFIG_SER_HOSTPORT); + ser_setbaudrate(host_port, CONFIG_SER_HOSTPORTBAUDRATE); + + pkt.tag_ser = ser_open(TAG_SER_PORT); + ser_setbaudrate(pkt.tag_ser, TAG_SER_BAUDRATE); + pkt.comm_ser = host_port; + keytag_init(&pkt); + - Serial *host_port = ser_open(0); - ser_setbaudrate(host_port, 38400); protocol_init(host_port); @@ -79,6 +85,7 @@ int main(void) for(;;) { protocol_run(host_port); + keytag_poll(&pkt); } return 0;