Library interface in devices

This forum is for general developer support questions.

Library interface in devices

Postby chris » Mon Apr 17, 2017 3:57 pm

Are the steps to add a library interface to a device documented anywhere?
Is there any example source code for a .device with a library interface?
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: Library interface in devices

Postby tonyw » Tue Apr 18, 2017 1:17 am

The so-called "library" part is just the data header connecting the ".device" to the system. It enables Exec to start the driver at boot time and DOS to generate a "struct DeviceNode" in the DOS list. Handlers like file systems use a similar (but different) means of initialisation. The driver uses the library "open count" and other flags to make sure that it is not expunged while tasks are using it, much like a library.

I'll send you an example privately.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Library interface in devices

Postby chris » Tue Apr 18, 2017 7:32 pm

Thanks Tony, appreciated.

I was wondering if I needed to regenerate the files with fdtrans, but wasn't sure how to even get a .device out of it (I'm using old source code and don't have the original files that were apparently passed through fdtrans).
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: Library interface in devices

Postby tonyw » Wed Apr 26, 2017 12:51 am

Chris, did you get my PM? I don't know your email address, or at least I'm not sure which Chris I'm talking to ;)
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Library interface in devices

Postby chris » Wed Apr 26, 2017 10:45 am

tonyw wrote:Chris, did you get my PM? I don't know your email address, or at least I'm not sure which Chris I'm talking to ;)


No :( I had an empty deleted message, but nothing else.
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: Library interface in devices

Postby tonyw » Thu Apr 27, 2017 1:09 am

Can you PM me your email address, then? I'll send you the archive I've made up for you.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia


Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 2 guests