File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 11#ifdef __MEMOTECH__
22#include <stdio.h>
33#include <string.h>
4+ #include <rs232.h>
45#include "../include/io.h"
56#include "../include/protocol.h"
67
@@ -10,14 +11,25 @@ char io_initialized=0;
1011
1112void io_init (void )
1213{
14+ rs232_params (RS_BAUD_9600 |RS_STOP_1 |RS_BITS_8 ,RS_PAR_NONE ); // Bauds tested 1200[/] 2400[/] 4800[/] 9600[/] 19200[X] 38400[X] 57600[] 115200[]
15+ rs232_init ();
16+ io_initialized = 1 ;
1317}
1418
1519void io_send_byte (unsigned char b )
1620{
21+ if (io_initialized == 1 )
22+ {
23+ rs232_put (b ); //*IRQ-OFF (SENDING DATA)
24+ }
1725}
1826
1927void io_main (void )
2028{
29+ if (rs232_get (& inb ) != RS_ERR_NO_DATA ) // *IRQ-OFF (RECEIVING DATA)
30+ { /* [RX - Display] */
31+ ShowPLATO (& inb ,1 );
32+ }
2133}
2234
2335#endif /* __MEMOTECH__ */
You can’t perform that action at this time.
0 commit comments