/* BlueDataDistributor - data distribution module from ethernet to 32 serial ports
 * version 0.1.1 date 2006-10-07
 * Copyright (C) 2006 Stefan Schuermans <stefan@blinkenarea.org>
 * a BlinkenArea project - http://www.blinkenarea.org/
 */

#ifndef INC_serial
#define INC_serial

// number of serial outputs
#define SERIAL_OUTPUT_CNT 32

// initialize
extern void SerialInit( void );

// output the specified bit of a byte on every serial port
//  - data must point to SERIAL_OUTPUT_CNT=32 bytes
//  - bit_mask must be 0x01, 0x02, ... 0x80 for bits 0, 1, ..., 7
//  - bit_mask must be 0x00 for the start bit and 0xFF for the stop bit
extern void SerialOutputBit( unsigned char * data, unsigned char bit_mask );

// bit time of serial port elapsed
extern void SerialOutputBitTime( void );

// schedule data to be output on serial ports
//  - data_len should be a multiple of SERIAL_OUTPUT_CNT
extern void SerialOutput( unsigned char * data, unsigned int data_len );

#endif // #ifdef INC_serial

