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

#include "asio.h"

Functions

int show_val (int val, int mask, int pinmap, int syncmap)
void asio_init (void)
void asio_tx (char val)
void asio_txString (char *str)
int asio_rx (void)
int asio_rxString (char *str, int len)

Detailed Description


Function Documentation

void asio_init ( void   ) 

Init direction bits. Would init baud here, but using const vs var has different timing.

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 
)

Prefer using a buffer head/tail strategy provided by starting a COG. For now use asio_rx byte by byte blocking calls. 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.

int show_val ( int  val,
int  mask,
int  pinmap,
int  syncmap 
)

Show bits on oscilloscope. This is for debug only ... bits come out LSB first

Parameters:
val is value to show
mask is the byte/word/long mask
pinmap is the pin bit map for bit stream output
syncmap is the bit map for bit stream oscope sync
Returns:
non-zero for looping;


Generated on Mon Apr 14 14:31:18 2008 for ASIO by  doxygen 1.5.4