MakingThings
Make Controller Kit
Firmware API
MAKE Zine

serial.c File Reference

Functions for working with the Serial Interface on the Make Controller Board. More...

Go to the source code of this file.


Functions

int Serial_SetActive (int state)
 Set the active state of the Serial subsystem.
int Serial_GetActive ()
 Read the active state of the Serial subsystem.
int Serial_Write (uchar *buffer, int count, int timeout)
 Write a block of data to the Serial port.
int Serial_Read (uchar *buffer, int size, int timeout)
 Read data from the Serial port.
int Serial_GetReadable (void)
 Returns the number of bytes in the queue waiting to be read.
int Serial_SetChar (int character)
 Sends a character (in the range of 0 to 255) to the write queue.
int Serial_SetBaud (int baud)
 Sets the serial baud rate.
int Serial_SetBits (int bits)
 Sets the number of bits per character.
int Serial_SetParity (int parity)
 Sets the parity.
int Serial_SetStopBits (int stopBits)
 Sets the stop bits per character.
int Serial_SetHardwareHandshake (int hardwareHandshake)
 Sets whether hardware handshaking is being used.
int Serial_GetChar ()
 Returns a single character from the receive queue if available.
int Serial_GetBaud ()
 Returns the current baud rate.
int Serial_GetBits ()
 Returns the number of bits for each character.
int Serial_GetParity ()
 Returns the current parity.
int Serial_GetStopBits ()
 Returns the number of stop bits.
int Serial_GetHardwareHandshake ()
 Returns whether hardware handshaking is being employed or not.
void Serial_Flush ()
 Clear out the serial port.
void Serial_ClearErrors ()
 Reset the error flags in the serial system.
bool Serial_GetErrors (bool *overrun, bool *frame, bool *parity)
 Read whether there are any errors.
void Serial_StartBreak ()
 Start the transimission of a break.
void Serial_StopBreak ()
 Stop the transimission of a break.

Detailed Description

Functions for working with the Serial Interface on the Make Controller Board.

Definition in file serial.c.

Make Controller Kit