#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) |
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
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.
str | is a predefined input buffer of len. | |
len | is maximum number of chars to receive in buffer. |
void asio_tx | ( | char | val | ) |
Transmit a char on interface.
val | is byte to send |
void asio_txString | ( | char * | str | ) |
Transmit a string on interface.
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
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 |