My own driver
Joel Sherrill <joel@OARcorp.com>
joel.sherrill at OARcorp.com
Mon Dec 13 15:32:52 UTC 2004
komam at interia.pl wrote:
> I have one problem with rtems. I want write my own driver and I have questions about it:
> 1) It's most important to me - how set autoconf/automake. I don't known how set parameters, compile and link my driver with BSP.
> 2) Could you tell me that I am right:
> a) First I create my driver files, add function like initialize, open, close read, write and control (of course if I need it). In my initialization funcion I use rtems_io_register_name.
> b) Second I set define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE in my application code file and I set my own DRIVER_TABLE_ENTRY and create my own Device_drivers table.
> c) Now I can use my device from /dev with function like open.
>
> And now I don't know how to compile and link this. I tryed use function rtems_io_register_driver but I had errors like rtems_io_register_driver resources still outstanding.
You seem to be on the right track but you didn't mention what type of
device you are writing a driver for. At least serial ports,
disks/non-volatile storage for filesystems, real-time clocks, and
network interface controllers have frameworks to adhere to in
order to plug into standard subsystems.
What tpe of device is it? Then we can point you to a good example
or maybe a template for the device driver.
For example, a clock tick or serial port driver can often just be a
few lines of BSP specific glue code.
> Thanks
>
> Adam Piotrowski
>
>
> ----------------------------------------------------------------------
> Startuj z INTERIA.PL!!! >>> http://link.interia.pl/f1837
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list