This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CTL_CODE confiliction on omap3530 bsp 6.14.01

 in Bus.h file

#define IOCTL_BUS_REQUEST_CLOCK         \
    CTL_CODE(FILE_DEVICE_UNKNOWN, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)

but in file gpio.h, there is another ctl_code definition

#define IOCTL_GPIO_SETBIT       \
    CTL_CODE(FILE_DEVICE_UNKNOWN, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)

 

the above two definitions are the same. We know ctl_code is unique identifier for OS. should we need to change one of the two?

and also, this is just an example, there are many secinaros in bsp 6.14.01

  • Huai:

    An IOCTL code is usually  passed to a driver to indicate which type of operation is to be performed.

    All the IOCTL codes for a given driver need to be unique.  It is OK if IOCTL_GPIO_SETBIT and

    IOCTL_BUS_REQUEST_CLOCK are the same value if the former is passed to a GPIO driver

    and the latter is passed to a different driver.

    Regards,

    Michael T

    PS: Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

     

  • OK, thank you!