Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #736

Re: DEVICEFS Serial Driver RPC examples

Date 2011-09-18 17:46 +0100
From cferris@freeRemoveuk.com.invalid
Newsgroups comp.sys.acorn.programmer
Subject Re: DEVICEFS Serial Driver RPC examples
Message-ID <2e14be1452.cferris@cferris.freeuk.com> (permalink)
References <d698181452.cferris@cferris.freeuk.com> <265b6a1452.beeb@ron1954.woosh.co.nz> <j545kg$vk3$1@dont-email.me> <516fb31452.beeb@ron1954.woosh.co.nz>
Organization Home

Show all headers | View raw


In message <516fb31452.beeb@ron1954.woosh.co.nz>
          Ron <beeb@woosh.co.nz> wrote:

> In message <j545kg$vk3$1@dont-email.me>
>           druck <news@druck.org.uk> wrote:
> 
> > On 18/09/2011 02:32, Ron wrote:
> > > I got a Syntax error on my Iyonix.
> > > Changing this definition
> > >
[snip]

> 
> The Iyonix and internal32 doesn't initialise with 'Example' 
> It may be that the internal32 driver was written at a later date and
> by a different person.
>

Perhaps you would like to have go with this code copied off ROOL.
  
*******
  REM Error handling
  in% = 0
  out% = 0
  REM ON ERROR PROCerror

  REM Flush some buffers
  *FX 7 8
  *FX 8 8

  REM Identify the hardware platform and open serial input and output streams
  SYS "OS_Byte", 129, 0, 255 TO , hw%
  IF hw% < &AA THEN
    REM Pre-Iyonix uses serial
    in%  = OPENIN"devices#baud19200;sleep:$.Serial" 
    out% = OPENOUT"devices#baud19200;sleep:$.Serial" 
  ELSE
    REM Iyonix uses serial1 - Iyonix has dual serial
    in%  = OPENIN"devices#baud19200;sleep:$.Serial1" 
    out% = OPENOUT"devices#baud19200;sleep:$.Serial1" 
  ENDIF

  REM Create a buffer
  DIM buf% 256

  REM Send something
  $(buf%) = "hello" 
  SYS "OS_GBPB", 2, out%, buf%, LEN $(buf%)

  REM Receive something (a byte)
  SYS "OS_GBPB", 4, in%, buf%, 1

  REM Or (untested) poll for input
  WHILE NOT EOF#in%
    PRINT GET$#in%
  ENDWHILE

  REM Close the streams
  CLOSE#in%
  CLOSE#out%
  QUIT

  DEF PROCerror
    ON ERROR OFF
    PRINT'REPORT$" at line ";ERL
    IF in% THEN CLOSE#in%
    IF out% THEN CLOSE#out%
    QUIT
  ENDPROC
********
  
-- 
Colin Ferris Cornwall UK

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

DEVICEFS Serial Driver RPC examples cferris@freeRemoveuk.com.invalid - 2011-09-17 11:39 +0100
  Re: DEVICEFS Serial Driver RPC examples Ron <beeb@woosh.co.nz> - 2011-09-18 13:32 +1200
    Re: DEVICEFS Serial Driver RPC examples druck <news@druck.org.uk> - 2011-09-18 08:12 +0100
      Re: DEVICEFS Serial Driver RPC examples cferris@freeRemoveuk.com.invalid - 2011-09-18 09:34 +0100
      Re: DEVICEFS Serial Driver RPC examples Ron <beeb@woosh.co.nz> - 2011-09-19 02:50 +1200
        Re: DEVICEFS Serial Driver RPC examples cferris@freeRemoveuk.com.invalid - 2011-09-18 17:46 +0100
          Re: DEVICEFS Serial Driver RPC examples Ron <beeb@woosh.co.nz> - 2011-09-19 08:34 +1200
            Re: DEVICEFS Serial Driver RPC examples Ron <beeb@woosh.co.nz> - 2011-09-19 09:08 +1200
              Re: DEVICEFS Serial Driver RPC examples "John Williams (News)" <UCEbin@tiscali.co.uk> - 2011-09-18 23:15 +0200
                Re: DEVICEFS Serial Driver RPC examples Ron <beeb@woosh.co.nz> - 2011-09-21 14:14 +1200
            Re: DEVICEFS Serial Driver RPC examples cferris@freeRemoveuk.com.invalid - 2011-09-18 22:42 +0100
              Re: DEVICEFS Serial Driver RPC examples Ron <beeb@woosh.co.nz> - 2011-09-19 10:57 +1200
              Re: DEVICEFS Serial Driver RPC examples Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-09-19 18:37 +0200
                Re: DEVICEFS Serial Driver RPC examples Thomas Milius <Thomas-Milius@t-online.de> - 2011-09-20 19:49 +0200
                Re: DEVICEFS Serial Driver RPC examples Ron <beeb@woosh.co.nz> - 2011-09-21 11:34 +1200
                Re: DEVICEFS Serial Driver RPC examples Thomas Milius <Thomas-Milius@t-online.de> - 2011-09-23 20:55 +0200
                Re: DEVICEFS Serial Driver RPC examples Ron <beeb@woosh.co.nz> - 2011-09-24 19:16 +1200

csiph-web