[Oberon] call ioctl() function in linux from AOS

Jörg Straube joerg.straube at iaeth.ch
Wed Apr 10 23:54:25 CEST 2013


Hi Zdenek

Try something like the follwing small snippet.
You of course have to adopt the portname and the io functions you want to call.

MODULE test;

IMPORT Unix;

PROCEDURE Do*;
  VAR
     portname: ARRAY 16 OF CHAR;
     fd: LONGINT;
     err: LONGINT;
     result: LONGINT;
  BEGIN {EXCLUSIVE}
     portname := "/dev/ttyS1"; fd := 0;
     fd := Unix.open(ADDRESSOF(portname), Unix.rdwr, {});
     err := Unix.ioctl(fd, Unix.FioRead, ADDRESSOF(result))
  END Do;

BEGIN
END test.Do

Jörg

Am 10.04.2013 um 18:46 schrieb Zdenek <oberon at moravcik.info>:

> Hello, is there any way to call ioctl() function in linux from AOS?
> ioctl() is being used to control UVC (V4L2) webcameras in linux.
> What I would basically like to do in aos is write some simple image
> grabber for usb webcamera.
> Because of ioctl() clib calls I cannot get any further.
> 
> Zdenek
> 
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3644 bytes
Desc: not available
Url : https://lists.inf.ethz.ch/pipermail/oberon/attachments/20130410/97f9041f/attachment.bin 


More information about the Oberon mailing list