programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

Re: Serial Terminal IO with commdriver.f

From: Virgil Stamps <vstamps_at_houston.rr.com>
Date: Wed, 21 Dec 2005 13:20:18 -0600

Pedro,
Basic Open and close ports using Commdriver.
HANDLE_MODBUS is my packet handler application.
Virgil

: +PORT1 ( -- )
    Z" COM1" PORT1 OPEN THROW PORT1 ACTIVATE
    9600 PORT1 BAUD 0 PORT1 PARITY
    8 PORT1 BYTE-SIZE 1 PORT1 STOP-BITS ;

: /EVENT ( -- handle ) 0 0 0 0 CreateEvent HEVENT ! ;

: WAIT ( -- ) HEVENT @ INFINITE WaitForSingleObject DROP ;

: RCVR ( -- )
    /EVENT FORKS>
    BEGIN WAIT HANDLE_MODBUS INBUF-STOP
    UNTIL
    PORT1 -DTR PORT1 KILL ;

: STOP-COM ( -- ) 1 TO INBUF-STOP ;

-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf Of
Pedro Monteiro
Sent: Wednesday, December 21, 2005 10:58 AM
To: sftalk_at_forth.com
Subject: [sftalk] Serial Terminal IO with commdriver.f
I am trying to open COM ports, check for errors, read/write to that port,
then close the port, all using commdriver.f instead of SIO.f. Sample code
would be very helpful.
Pedro

----------------------------------------------------------------------

----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Wed Dec 21 2005 - 11:20:52 PST

This archive was generated by hypermail 2.2.0 : Thu Dec 04 2008 - 03:04:20 PST