Netcruzer Library API  V2.03
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Serial Data Ports

Sections

 I2C Serial Data Ports
 
 UART Serial Data Ports
 

Description

Serial Data Ports (SDP) is a term used in the Netcruzer Library for many different modules that use data serially. All serial communication ports, like the UARTs, I2C port, SPI Port, UDP Port, TCP Ports... are referred to as "Serial Data Port". There are also a couple of General purpose "Serial Data Port" that can be used in user applications. All "Serial Data Port" use Circular Buffers for transferring data.

Serial Data Port Numbers

All Serial Data Ports are assigned numbers:

  • 0 = Default Debug Port
  • 1 = UART 1
  • 2 = UART 2
  • 3 = UART 3
  • 4 = UART 4
  • 5 = SPI 1
  • 6 = SPI 3
  • 7 = I2C 1
  • 8 = I2C 2
  • 9 = I2C 3
  • 10(a) = UDP 1
  • 11(b) = UDP 2
  • 12(c) = UDP 3
  • 13(d) = TCP 1
  • 14(e) = TCP 2
  • 15(f) = TCP 3
  • 16(g) = USB HID Port 1
  • 17(h) = User 1 General Purpose Serial Data Port
  • 18(i) = User 2 General Purpose Serial Data Port
  • 19(j) = User 3 General Purpose Serial Data Port
  • 20(k) = User 4 General Purpose Serial Data Port
  • 21(l) = User 5 General Purpose Serial Data Port
  • 22(m) = User 6 General Purpose Serial Data Port
  • 23(n) = User 7 General Purpose Serial Data Port
  • 24(o) = User 8 General Purpose Serial Data Port

The number of circular buffers. Each "Serial Data Port" consists of a TX and RX circular buffer. There are thus BUF_COUNT/2 "Serial Data Ports"

Serial Data Port Buffers

Each "Serial Data Port" has a transmit and receive buffer. They are identified by their "Serial Data Port Buffer ID" number.

For example, the "Serial Data Port ID" for I2C 1 is 7. It's transmit buffer will have the "Serial Data Port Buffer ID" of 14 (7*2), and it's receive buffer will be 15.