Pond Electronics - Home of the µFlash876 & µFlash876B embedded controllers, µStack & µConnect Bus.

com module

Provides support for the uCore asynchronous serial communications port.

open_com

void open_com(WORD rate,BYTE bits,BYTE parity,BYTE stop);

Open the com port using the specified settings.

rate

Specifies the baud rate for the com port, the following baud rate settings are available:

BAUD_110
BAUD_300
BAUD_1200
BAUD_2400
BAUD_4800
BAUD_9600
BAUD_19K2
BAUD_38K4

bits

Specifies the number of bits in each data word. Choose from:

BITS_7
BITS_8

parity

Specifies the parity setting for error detection on the com port. Choose from:

NO_PARITY
ODD_PARITY
EVEN_PARITY

stop

Specifies the number of stop bits to use. Available options are:

STOP_1
STOP_2

Note that as the port settings are specified as bit patterns for the com port control register, you should use only use the options shown above, for example:

open_com(BAUD_9600,BITS_8,NO_PARITY,STOP_1);

 

close_com

void close_com(void);

Close the com port.

 

c_putc

void c_putc(BYTE c);

Write a single byte/character to the open com port.

 

c_getc

BYTE c_getc(void);

Read a single character from the open com port.

 

c_printf

void c_printf(char *format,...);

Formatted string output for the com port. Refer to the xprintf module for details of operation.


Home | Products | Technical Info | How to Order | Contact Us | Links