Casio EG-800U - Cassiopeia - Win CE 3.0 150 MHz Specifications Page 22

  • Download
  • Add to my manuals
  • Print
  • Page
    / 32
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 21
SLAA137A
22 MSP430 Internet Connectivity
void TCPClose(void)
Use this API function to close an open connection. Before disconnecting, the stack ensures that
a packet that still resides in the output buffer is transmitted and acknowledged properly. After
closing, the application may reconfigure IP addresses, reassign port numbers, and open a new
connection.
void TCPReleaseRxBuffer(void)
After reading out the receive buffer, calling this function tells the stack that the buffer contents is
not needed anymore and may be overwritten by new incoming TCP data. This function also
clears the SOCK_TX_BUF_RELEASED flag used to indicate the presence of new data.
void TCPTransmitTxBuffer(void)
By using this function, an application can send data over an already opened connection. First,
the application has to check if it may write data to the transmit buffer. This is done by testing the
flag SOCK_TX_BUF_RELEASED of the SocketStatus register. If this flag is set, the application
may write a maximum of MAX_TCP_TX_DATA_SIZE bytes to the transmit buffer, starting at
address TCP_TX_BUF (points to the data section of the TxFrame1 buffer). Afterwards, the byte
count must be written to TCPTxDataCount register. Finally, calling TCPTransmitTxBuffer() leads
to the transmission of the data (Figure 10).
TX_BUF_RELEASED?
Yes
No
Copy Data to Transmit to TCP_TX_BUF
TCPTxDataCount = Number of Bytes to Send
TCPTransmitTxBuffer()
Figure 10. Transmitting of Data
4.3.2 Flags
The API status flags are stored in the global 8-bit variable SocketStatus. This register can only
be read out. The bit positions of the described flags are shown in Figure 11.
Page view 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 31 32

Comments to this Manuals

No comments