Welcome, Guest. Please login or register.

Author Topic: OpenDevice (C help needed please!)  (Read 2208 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline golemTopic starter

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 432
    • Show all replies
OpenDevice (C help needed please!)
« on: November 01, 2003, 03:51:01 PM »
I'm learning how to program the serial device but finding it difficult to fathom the RKM examples.
e.g. return = OpenDevice(serial.device,0,(struct IoRequest *)IORequest, flags)

What I don't understand about that is what the (struct IORequest *) part does.
I understand you pass a pointer to an IORequest structure to the OpenDevice call but the above C declaration I no understand! I'm much more comfortable with 68k asm but figure it's time I learnt to do things properly!

Thanks
                                                             
A1200 desktop, Blizzard 1260, OS3.9BB2, Indivision Mk II, SCSI Jaz, Ethernet
A1200 desktop, Blizzard 1230, OS3.1, Ethernet
A500, OS1.3
 

Offline golemTopic starter

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 432
    • Show all replies
Re: OpenDevice (C help needed please!)
« Reply #1 on: November 01, 2003, 07:05:07 PM »
Yes I keep reading your reply and its starting to make sense!

Thanks Chris
                                                             
A1200 desktop, Blizzard 1260, OS3.9BB2, Indivision Mk II, SCSI Jaz, Ethernet
A1200 desktop, Blizzard 1230, OS3.1, Ethernet
A500, OS1.3
 

Offline golemTopic starter

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 432
    • Show all replies
Re: OpenDevice (C help needed please!)
« Reply #2 on: November 02, 2003, 11:38:39 AM »
Thanks Cymric - I thought it had something to do with casting.
I have got Kernigan and Ritchie and keep meaning to read it cover to cover but I'm a book dipper and keep trying to fly before I can walk! Same goes for the full set of ROM Kernel Manuals I have at last got hold of.
I think I need to work through K & R compiling the examples as I go and bite the bullet!
 
                                                             
A1200 desktop, Blizzard 1260, OS3.9BB2, Indivision Mk II, SCSI Jaz, Ethernet
A1200 desktop, Blizzard 1230, OS3.1, Ethernet
A500, OS1.3