My Documents/icctest/ASIO/asio.c File Reference

#include "asio.h"
#include <propeller.h>

Functions

void asio_init (int rxmap, int txmap, int rxflowmap, int txflowmap, ASIO_SPEED_EN speed)
void asio_tx (char val)
void asio_txString (char *str)
int asio_rx (void)
int asio_rxString (char *str, int len)
void asio_handler (void)

Detailed Description


Function Documentation

void asio_handler ( void   ) 

Handle transmit and receive here. Hard to make our deadline ... again :) LMM/Time lessons learned with beta preview:

void asio_init ( int  rxmap,
int  txmap,
int  rxflowmap,
int  txflowmap,
ASIO_SPEED_EN  speed 
)

Init interface direction bits and speed. Interface uses "N,1,8": no parity, 1 stop bit, 8 data bits.

Note:
A pin map is a power of 2 integer representing the pin used for a function. If pin 0 is to be the receive pin, then 0x1 (2^0) would be passed via rxmap.

Flow control parameters are reserved and have no affect today except the direction is set if the pinmap is non-zero for rxflow (backpressure bit).

The only way to do invert on an interface today is to define override the default constant value. Using a variable would likely change timing.

Parameters:
rxmap is receive pin map.
txmap is transmit pin map.
rxflowmap is receive flow control pin map; disabled if 0.
txflowmap is transmit flow control pin map; disabled if 0.
speed is a typedef enum integer indicating interface bit rate.

int asio_rx ( void   ) 

Get a byte from the serial interface. param are set by # define constants in asio.h

Returns:
int representing byte received.

int asio_rxString ( char *  str,
int  len 
)

Use calls to asio_rx until a terminator like "\r" is found. All strings returned are null terminated.

Parameters:
str is a predefined input buffer of len.
len is maximum number of chars to receive in buffer.
Returns:
number of bytes received.

void asio_tx ( char  val  ) 

Transmit a char on interface.

Parameters:
val is byte to send

void asio_txString ( char *  str  ) 

Transmit a string on interface.

Parameters:
str is string to send.


Generated on Thu Apr 17 12:27:00 2008 for ASIO by  doxygen 1.5.4