typedef unsigned char byte;
#define TB_BROADCAST 0xFF
| tbClose | |
|---|---|
| Purpose | Close an open connection to a TactaBoard |
| Prototype | int tbClose(TACTABOARD * tb); |
| Parameters | -> tb : Pointer to open TactaBoard object |
| Result | Returns 0 if the TactaBoard connection is successfully closed or EOF if any error occurred. |
| See Also | tbOpen |
| tbDisableOutput | |
| Purpose | Disable (turn off) an output |
| Prototype | int tbDisableOutput(TACTABOARD * tb, byte id, byte output); |
| Parameters | -> tb : Pointer to open TactaBoard object |
-> id : ID of TactaBoard |
|
-> output : Output ID |
|
| Result | Returns the number of bytes written or -1 if an error occured |
| See Also | tbEnableOutput |
| tbEnableOutput | |
| Purpose | Enable (turn on) an output |
| Prototype | int tbEnableOutput(TACTABOARD * tb, byte id, byte output); |
| Parameters | -> tb : Pointer to open TactaBoard object |
-> id : ID of TactaBoard |
|
-> output : Output ID |
|
| Result | Returns the number of bytes written or -1 if an error occured |
| See Also | tbDisableOutput |
| tbOpen | |
| Purpose | Opens a connection to a TactaBoard |
| Prototype | TACTABOARD * tbOpen(int portNo); |
| Parameters | -> portNo : Port number to open |
| Result | A pointer to the newly opened TactaBoard object or NULL if the port could not be opened. |
| See Also | tbClose, tbSetBaudRate |
| tbResetBoard | |
| Purpose | Reset a TactaBoard to its initial state |
| Prototype | int tbResetBoard(TACTABOARD * tb, byte id); |
| Parameters | -> tb : Pointer to open TactaBoard object |
-> id : ID of TactaBoard |
|
| Result | Returns the number of bytes written or -1 if an error occured |
| tbSendCommand | |
| Purpose | Internal function to send a properly encoded command |
| Prototype | int tbSendCommand(TACTABOARD * tb, byte type, byte id, byte length, const byte * payload); |
| Parameters | -> tb : Pointer to open TactaBoard object |
-> id : ID of TactaBoard |
|
| Result | Returns the number of bytes written or -1 if an error occured |
| tbSetBaudRate | |
| Purpose | Set the baud rate to use to communicate with a TactaBoard |
| Prototype | int tbSetBaudRate(TACTABOARD * tb, long baudrate); |
| Parameters | -> tb : Pointer to open TactaBoard object |
-> baudrate : Baud rate to use for communication |
|
| Result | Returns 0 if success or -1 if an error occured |
| See Also | tbOpen |
| tbSetEEPROM | |
| Purpose | Change a TactaBoard's configuration |
| Prototype | void tbSetEEPROM(TACTABOARD * tb, byte id, byte address, byte value); |
| Parameters | -> tb : Pointer to open TactaBoard object |
-> id : ID of TactaBoard |
|
-> address : EEPROM Address to write |
|
-> value : Value to write to EEPROM |
|
| Result | Returns the number of bytes written or -1 if an error occured |
| tbSetOutput | |
| Purpose | Set a TactaBoard output to a given value |
| Prototype | int tbSetOutput(TACTABOARD * tb, byte id, byte output, byte value); |
| Parameters | -> tb : Pointer to open TactaBoard object |
-> id : ID of TactaBoard |
|
-> output : Output ID |
|
-> value : New value of output |
|
| Result | Returns the number of bytes written or -1 if an error occured |
This page has been accessed times.
Copyright © 2005, Robert W. Lindeman (gogo [at] wpi.edu). All rights reserved.
This site uses valid HTML 4.01 and CSS
Last modified on .