Serial Input Output


void serial_init (void)
unsigned char serial_receive_pending (void)
void serial_flush (void)
void serial_send (char c)
unsigned char serial_recv (void)

Function Documentation

void serial_flush void    [inline]

Wait until the SIO has finished to send the character.

This function waits for the transmission of the current character. While waiting, the COP is reset using cop_optional_reset.

See also:
cop_optional_reset, serial_init, serial_send

Definition at line 75 of file asm-m68hc11/sio.h.

void serial_init void    [inline]

Initialize the SCI.

This function configures the SCI to send at M6811_DEF_BAUD baud rate. It must be called before any other serial operation unless the program is started from another one (such as a monitor or in bootstrap mode).

See also:
serial_print, M6811_DEF_BAUD

Definition at line 44 of file asm-m68hc11/sio.h.

unsigned char serial_receive_pending void    [inline]

Test for pending character on the reception.

Return != 0 if there is something to read on the serial line.

1 if there is something to read on the serial line.

Definition at line 62 of file asm-m68hc11/sio.h.

unsigned char serial_recv void    [inline]

Wait for a character on the serial line and return it.

This function waits for a character to be received by the SCI. While waiting, it calls cop_optional_reset to probe the COP regularly.

the character received from the SCI.
See also:
serial_init, cop_optional_reset

Definition at line 112 of file asm-m68hc11/sio.h.

void serial_send char    c [inline]

Send the character on the serial line.

This function sends the character c on the serial line. Before sending, it calls serial_flush to make sure the transmitter is ready. Once the function returns, the character is in the SCI queue and it may not be sent completely over the serial line.

c  character to send on the serial line.
See also:
serial_init, serial_flush

Definition at line 94 of file asm-m68hc11/sio.h.