Serial communication API - Petewg/harbour-core GitHub Wiki

πŸ”™ Home

  • hb_comClose(<nPort>) ➜ lSuccess
    closes (the handle of) <nPort> invalidating any pending communication process. should be invoked upon finishing working with that com port.

  • hb_comDiscardChar(nPort, nChar|cChar) ➜ lSuccess

  • hb_comErrorChar(nPort, nChar|cChar ) ➜ lSuccess

  • hb_comFindPort(<cDeviceName> [,<lCreate> = .F.]) ➜ nPort

  • hb_comFlowChars(nPort, nXONchar|cXONchar, nXOFFchar|cXOFFchar) ➜ lSuccess

  • hb_comFlowControl(nPort, @nOldFlow [,nNewFlow]) ➜ lSuccess

  • hb_comFlowSet(nPort, nFlow) ➜ lSuccess

  • hb_comFlush(nPort, [ nType = HB_COM_IOFLUSH ] ) ➜ lSuccess

  • hb_comGetDevice(nPort) ➜ cDeviceName

  • hb_comGetDeviceHandle(nPort) ➜ nHandle | F_ERROR

  • hb_comGetError(nPort) ➜ nError

  • hb_comGetOSError(nPort) ➜ nError

  • hb_comInit(nPort, nBaud, cParity, nSize, nStop) ➜ lSuccess

  • hb_comInputCount(<nPort>) ➜ nCount
    returns the number of bytes currently (but not yet read) in input buffer of <nPort> or -1 on error.

  • hb_comInputState(nPort) ➜ nState

  • hb_comLastNum() ➜ nLastPortNumber

  • hb_comLSR(nPort, @nValue) ➜ lSuccess

  • hb_comMCR(nPort, @nValue, nClear, nSet) ➜ lSuccess

  • hb_comMSR(nPort, @nValue) ➜ lSuccess

  • hb_comOpen(nPort) ➜ lSuccess
    opens com port specified by <nPort> and returns .T. on success or .F. on failure.

  • hb_comOutputCount(<nPort>) ➜ nCount
    returns the number of bytes currently (remaining to be transmitted) in output buffer of <nPort> or -1 on error.

  • hb_comOutputState(nPort) ➜ nState

  • hb_comRecv(nPort, @cBuffer, [nLen = Len(cBuffer)], [nTimeout = 0]) ➜ nBytesRecv

  • hb_comSend(nPort, cBuffer, [nLen = Len(cBuffer)], [nTimeout = 0]) ➜ nBytesSent

  • hb_comSendBreak(nPort, [nDuration = 50]) ➜ lSuccess

  • hb_comSetDevice(nPort, cDeviceName) ➜ lSuccess

  • hb_comSetError(nPort, nError) ➜ NIL

πŸ”™ Home

⚠️ **GitHub.com Fallback** ⚠️