How to test if an I/O driver is installed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to test if an I/O driver is installed

541 Views
dry
Senior Contributor I

How can I test if a particular IO driver is installed, using it's name?

In one part of my code may do _io_xxx_install(), and elsewhere I need to test if kernel has that driver available.

I see in _io_fopen(), there is code which iterates over the IO driver list until a driver name is a match. But I can't find if there is a standalone function which would just do this in similar (or better ..) way.

0 Kudos
3 Replies

326 Views
dry
Senior Contributor I

Hi,

Thanks for the howto.

I'm beyond that, i got my driver working.

However I don't see the howto answering my question on how do you check if the driver is installed.

What i see it seems it was not meant for you to query that independently of fopen call.

(I don't think i want to do a test with fopen() followed by fclose (allocate/deallocate resources) just to find out the driver exists).

May be my question is weird to begin with - why would you not know that you have installed the driver ...

0 Kudos

326 Views
soledad
NXP Employee
NXP Employee

Hi,

Please check the below document page 9.

How to Make a new MQX Driver 

I hope this helps.


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

326 Views
dry
Senior Contributor I

I think what I want is to copy the first part of _io_fopen() code to my own functions that can list and search for the device string.

So I would have and MQX 'lsmod' (kind of) to list all IO driver names in kernel, and also something like query_IO_driver(const char* name)  to check if the one I want has been installed.

0 Kudos