vxworks device drivers - VxWorks
This is a discussion on vxworks device drivers - VxWorks ; Hi all,
A small doubt in Vxworks device drivers.
In Vxworks for a device to be used first the Device driver must be
initialised and the device must be created.
Can we use a device by directly configuring it by ...
-
vxworks device drivers
Hi all,
A small doubt in Vxworks device drivers.
In Vxworks for a device to be used first the Device driver must be
initialised and the device must be created.
Can we use a device by directly configuring it by accessing its
registers and declaring a function as ISR to device interrupt ( in
userappinit before my application starts ).If we can do in this method
what is the diffrence diffrence between two methods.
sai kumar reddy
-
Re: vxworks device drivers
Reddy,
There is no user space and kernal space in vxworks like linux.
Every thing will be treated as same space. Almost you can access low
level calls from your application thats why you can create device in
device table and can register ISR from application.
Driver is layer which will provide interface to access
hardware.It will reduce overhead of application developer.If
application developer knows what are all the function available in
driver, then he can fullfill his task.No need to worry about hardware
mapping ,register details,ISR registeration....
Speaking myself...
-
Re: vxworks device drivers
Hi:
I guess it's depends on what you are trying to do. If you want to
write a vxWorks device driver, you have to define all the standard
driver entry points (open, close, read, write, ioctl, etc), and call
the iosLib routines to add the entry point to the io system and give
the device a name (ie /ata0) that will allow a user to acces it via
normal io calls (like read, write, etc).
Alternatively, you can make up your own user API and just write enough
code to make the thing work - or just do "*(register)= ___;" in the
middle of you application. Either one can work. Just depends on your
goals.
Note that to do a standard vxWorks device driver, you can still compile
it separately, and init it up from a startup script or the command
line. There is no requirement to put all the device drivers in a
kernel.
lc
reddy.saikumar@gmail.com wrote:
> Hi all,
>
> A small doubt in Vxworks device drivers.
>
> In Vxworks for a device to be used first the Device driver must be
> initialised and the device must be created.
>
> Can we use a device by directly configuring it by accessing its
> registers and declaring a function as ISR to device interrupt ( in
> userappinit before my application starts ).If we can do in this method
> what is the diffrence diffrence between two methods.
>
>
> sai kumar reddy
-
Re: vxworks device drivers
LarryC wrote:
>Hi:
>
>I guess it's depends on what you are trying to do. If you want to
>write a vxWorks device driver, you have to define all the standard
>driver entry points (open, close, read, write, ioctl, etc), and call
>the iosLib routines to add the entry point to the io system and give
>the device a name (ie /ata0) that will allow a user to acces it via
>normal io calls (like read, write, etc).
>
>Alternatively, you can make up your own user API and just write enough
>code to make the thing work - or just do "*(register)= ___;" in the
>middle of you application. Either one can work. Just depends on your
>goals.
True, and mostly the goal it depends on is portability, but even if you
don't care about portability, writing device drivers adds structure to
systems.
>Note that to do a standard vxWorks device driver, you can still compile
>it separately, and init it up from a startup script or the command
>line. There is no requirement to put all the device drivers in a
>kernel.
Again true, and it's good to write the component definition files to
facilitate configuring the drivers in or out.
--
================================================== ======================
Michael Kesti | "And like, one and one don't make
| two, one and one make one."
mrkesti at hotmail dot com | - The Who, Bargain