Functions | |
| void | SerialInit (SerialMode_t Mode) |
| Initializes the serial module in the requested mode. | |
| WORD | SerialGetTCPPort (BOOL bPersistent) |
| Delivers the current configured TCP port of the serial server. | |
| void | SerialSetTCPPort (WORD Port) |
| Configures a new TCP port for the serial server. | |
| BOOL | bSerialGetSPIMasterSample (void) |
| Delivers the sampling mode of the input signal in SPI master mode. | |
| SPIClockFrequencies_t | SerialGetSPIFrequency (void) |
| Delivers the currently used frequency of SPI master mode. | |
| SPIModes_t | SerialGetSPIMode (void) |
| Delivers the currently used clock mode in SPI master mode. | |
| void | SerialSetSPIFrequency (SPIClockFrequencies_t Frequency) |
| Sets the clock frequency in SPI master mode. | |
| void | SerialSetSPIMasterSample (BOOL Sample) |
| Sets the sampling mode of the input signal in SPI master mode. | |
| void | SerialSetSPIMode (SPIModes_t Mode) |
| Sets the SPI clock mode in SPI master mode. | |
| UARTBaudrates_t | SerialGetUARTBaudrate (void) |
| Delivers the currently used baudrate in the UART mode. | |
| void | SerialSetUARTBaudrate (UARTBaudrates_t Baudrate) |
| Sets the UART baudrate in UART mode. | |
| void | SerialResetToFactory (void) |
| Resets the serial module EEPROM section to well known start parameters. | |
| BOOL | SerialInitTask (void) |
| After initializing network and application stuff the application should call this function to prepare task members needed for proper serial task operation. | |
| void | SerialStopTask (void) |
| On network errors or shut down events these function should be called by the main application to proper stop the serial tasks (i.e disconnecting a connected client). | |
| BOOL | bSerialCheckForStoppedTask (void) |
| Before shutting down the application should poll for valid serial task shutdown. | |
| void | SerialTask (void) |
| Call this function periodically from main application to execute serial module tasks. | |
| void | SerialShutdown (void) |
| Call this function to process shutdown actions for serial server and serial connections. | |
| void | SerialRegisterHandling (void) |
| Call this function to serve the virtual register set accessed by the SPI master. | |
| SerialServerConnection_t | SerialGetServerState (void) |
| This function delivers the current state of the serial server. | |
| DWORD | SerialGetConnectedIP (void) |
| Delivers the IP of a client who is connected to serial server. | |
| DWORD | SerialGetRXCounter (void) |
| Delivers the count of bytes the serial server has sent to a client. | |
| DWORD | SerialGetTXCounter (void) |
| Delivers the count of bytes the serial server has received from a client. | |
| BOOL bSerialCheckForStoppedTask | ( | void | ) |
Before shutting down the application should poll for valid serial task shutdown.
| TRUE | The task has successfully stopped. | |
| FALSE | Stopping the serial task is pending. |
| BOOL bSerialGetSPIMasterSample | ( | void | ) |
Delivers the sampling mode of the input signal in SPI master mode.
The mode can be read indepently from the current active NetzerIO mode.
| FALSE | Input data sampled at middle of data output time. | |
| TRUE | Input data sampled at end of data output time. |
| DWORD SerialGetConnectedIP | ( | void | ) |
Delivers the IP of a client who is connected to serial server.
| DWORD SerialGetRXCounter | ( | void | ) |
Delivers the count of bytes the serial server has sent to a client.
The counter is set to zero while a new session starts.
| SerialServerConnection_t SerialGetServerState | ( | void | ) |
This function delivers the current state of the serial server.
| SPIClockFrequencies_t SerialGetSPIFrequency | ( | void | ) |
Delivers the currently used frequency of SPI master mode.
The frequency can be read indepently from the current active NetzerIO mode.
| SPIModes_t SerialGetSPIMode | ( | void | ) |
Delivers the currently used clock mode in SPI master mode.
The mode can be read indepently from the current active NetzerIO mode.
| WORD SerialGetTCPPort | ( | BOOL | bPersistent | ) |
Delivers the current configured TCP port of the serial server.
| bPersistent | If TRUE the return value is read from EEPROM. If FALSE the value is taken from the current state. |
| DWORD SerialGetTXCounter | ( | void | ) |
Delivers the count of bytes the serial server has received from a client.
The counter is set to zero while a new session starts.
| UARTBaudrates_t SerialGetUARTBaudrate | ( | void | ) |
Delivers the currently used baudrate in the UART mode.
The baudrate can be read indepently from the current active NetzerIO mode.
| void SerialInit | ( | SerialMode_t | Mode | ) |
Initializes the serial module in the requested mode.
Should be called once at startup (very early).
| Mode | Specifies the mode for NetzerIO. GPIO module must know this because it configures some port pins also for the serial modes. |
| BOOL SerialInitTask | ( | void | ) |
After initializing network and application stuff the application should call this function to prepare task members needed for proper serial task operation.
| TRUE | Initialization was successful. | |
| FALSE | Initialization failed, try again later. |
| void SerialSetSPIFrequency | ( | SPIClockFrequencies_t | Frequency | ) |
Sets the clock frequency in SPI master mode.
If in SPI master mode the change takes effect directly. The new mode is stored persistent in EEPROM.
| Frequency | The frequency as enumerated value. |
| void SerialSetSPIMasterSample | ( | BOOL | bSample | ) |
Sets the sampling mode of the input signal in SPI master mode.
If in SPI master mode the change takes effect directly. The new mode is stored persistent in EEPROM.
| bSample | If FALSE, the input data is sampled at middle of data output time. If TRUE, the input data is sampled at end of data output time. |
| void SerialSetSPIMode | ( | SPIModes_t | Mode | ) |
Sets the SPI clock mode in SPI master mode.
If in SPI master mode the change takes effect directly. The new mode is stored persistent in EEPROM.
| Mode | The SPI clock mode as enumerated value. |
| void SerialSetTCPPort | ( | WORD | Port | ) |
Configures a new TCP port for the serial server.
This value is stored persistent in EEPROM.
| Port | The new port value. |
| void SerialSetUARTBaudrate | ( | UARTBaudrates_t | eBaudrate | ) |
Sets the UART baudrate in UART mode.
If in UART mode the change takes effect directly. The new mode is stored persistent in EEPROM.
| eBaudrate | The baudrate as enumerated value. |
| void SerialStopTask | ( | void | ) |
On network errors or shut down events these function should be called by the main application to proper stop the serial tasks (i.e disconnecting a connected client).
| void SerialTask | ( | void | ) |
Call this function periodically from main application to execute serial module tasks.
1.5.5