X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=app%2Ftriface%2Ftriface.c;h=00c1a58025fa3ca2d1f0077c51ef553946598431;hb=cfd59c8655ed7268c9c48aa58560158d235bc0de;hp=c34b50036cfa311dee6b1057c5df5c76e7ac9b5a;hpb=07382ad480794063a2d5be63547eb288034d9832;p=bertos.git diff --git a/app/triface/triface.c b/app/triface/triface.c index c34b5003..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,24 +39,45 @@ * \brief Windowing system test. */ + #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); @@ -63,6 +85,7 @@ int main(void) for(;;) { protocol_run(host_port); + keytag_poll(&pkt); } return 0;