Specifications

0 = DS_NULL
1 = DS_UART0
2 = DS_UART1
3 = DS_TRANSPARENT
4 = DS_STDIO
5 = DS_ERROR
6 = DS_PACKET_SERIAL
The SNAPpy API for creating Switchboard connections is:
crossConnect(dataSrc1, dataSrc2) # Cross-connect SNAP data sources (bidirectional)
uniConnect(dst, src) # Connect src --> dst SNAP data sources (unidirectional)
For example, to configure UART1
2
for Transparent (Wireless Serial) mode, put the following
statement in your SNAPpy startup handler:
crossConnect(DS_UART1, DS_TRANSPARENT)
The following table is a matrix of possible Switchboard connections. Each cell label describes the
“mode” enabled by row-column cross-connect. Note that the “DS_” prefixes have been omitted to
save space.
UART0 UART1 TRANSPARENT STDIO PACKET_SERIAL
UART0
Loopback Crossover Wireless Serial Local
Terminal
Local SNAPconnect,
Portal, or another
SNAP Node
UART1
Crossover Loopback Wireless Serial Local
Terminal
Local SNAPconnect,
Portal, or another
SNAP Node
TRANSPARENT
Wireless
Serial
Wireless
Serial
Loopback Remote
Terminal
Remote SNAPconnect
Any given data sink can be the destination for multiple data sources, but a data source can only be
connected to a single destination. Therefore, if you cross-connect two elements, you cannot direct
serial data from either of those elements to additionally go anywhere else, but you can still direct other
elements to be routed to one of the elements specified in the cross-connect.
The DS_ERROR element is a data source, but cannot be a data sink. Uniconnecting DS_ERROR to a
destination causes any error messages generated by your program to be routed to that sink. In this way,
you can (for example) route error messages to Portal while allowing other serial data to be directed to
a UART.
You can configure Portal (using the preferences) to intercept just errors, non-error text, or both when
you intercept STDIO to the application.
2
Most platforms have two UARTs available, so with most SNAP Engines UART0 will connect to the USB port on a
SN163 board and UART1 will connect to the RS-232 port on any appropriate Synapse demonstration board. However the
RF300 SNAP Engine has only one UART – UART0 – and it comes out where UART1 normally comes out (to the RS-232
port, via GPIO pins 7 through 10). If you are working with RF300 SNAP Engines, be sure to adjust your code to reference
UART0 rather than UART1 for your RS-232 serial connections.
Page 28 of 202 SNAP Reference Manual Document Number 600-0007K