Changes between Version 13 and Version 14 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/Comm/CComm


Ignore:
Timestamp:
03/04/20 13:55:46 (5 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/Comm/CComm

    v13 v14  
    148148}}}
    149149
     150=== !SetDebugRawRead ===
     151
     152{{{
     153void SetDebugRawRead(bool bDebugShowRawRead)
     154}}}
     155
     156==== Parameters ====
     157
     158 * bDebugShowRawRead - true to enable console output showing read data, false to disable
     159
     160==== Description ====
     161
     162This is only compiled for DEBUG build so must be wrapped with precompile options to only call this function when DEBUG defined.
     163
     164==== Example ====
     165
     166{{{
     167CComm *pComm = NULL;
     168
     169void StartCommunications(void)
     170{
     171    int commPort = 2;
     172    CCommSerial *pSerial = new CCommSerial(commPort);
     173    pComm = pSerial;
     174 
     175    pComm->Open();
     176
     177    pComm->AddRcvEvent(CHR_STX, CHR_ETX, NAME_COMM_EVENT(DataMsg), 0, NULL);
     178
     179#if defined(DEBUG)
     180    // Helpful for initial development to see all characters received on the port
     181    pComm->SetDebugRawRead(true);
     182#endif
     183}
     184
     185
     186}}}
    150187
    151188== See Also ==