ToCoNet_vDebugInit()

Explanation

Initialisation of the TWELITE NET debug message output.

The specified UART output is used in common with the application's output, and debug messages are output during the application's output.

Argument

Type
Name
Remark

pSer

Pointer to a structure defining the UART output destination.

Returns

None

Sample code

#include "serial.h"
#include "fprintf.h"

tsFILE sSerStream; // use for fprintf
tsSerialPortSetup sSerPort;

void initser() {
  //... setup serial port
  sSerPort.u8SerialPort = E_AHI_UART_0;
  //...
  SERIAL_vInitEx(&sSerPort, pUartOpt);
  
  // setup fprintf
  sSerStream.bPutChar = SERIAL_bTxChar; // lib function
  sSerStream.u8Device = E_AHI_UART_0; // UART0
  
  // setup TWELITE NET debug message.
  ToCoNet_vDebugInit(&sSerStream);
  ToCoNet_vDebugLevel(0); // start with no debug message.
}

最終更新