Purpose of rtems_device_driver?

Joel Sherrill joel at rtems.org
Tue Sep 29 14:13:45 UTC 2020


On Tue, Sep 29, 2020 at 8:54 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 29/09/2020 15:47, Sebastian Huber wrote:
>
> > On 29/09/2020 15:42, Joel Sherrill wrote:
> >
> >>
> >>
> >> On Tue, Sep 29, 2020 at 8:37 AM Sebastian Huber
> >> <sebastian.huber at embedded-brains.de
> >> <mailto:sebastian.huber at embedded-brains.de>> wrote:
> >>
> >>     Hello,
> >>
> >>     I work currently on the documentation of the IO Manager. What is the
> >>     purpose of
> >>
> >>     typedef rtems_status_code rtems_device_driver;
> >>
> >>     ?
> >>
> >>     For me this looks a bit like camouflage.
> >>
> >>
> >> No. It is a use of typedef to make the purpose of the method clear.
> >>
> >> You have nibbled at these for years. There were at least types for
> >> Classic Tasks, ASRs, and TSRs at one point.
> > Yes, the typedefs to void.
> >>
> >> If this is the last one, I'm not going to fight it. This isn't the
> >> hill I am
> >> going to die on.
> > I am not suggesting to remove them although I find these typedefs
> > pretty odd. I just look for some documentation text.
>
> What about this:
>
> /**
>   * @ingroup RTEMSAPIClassicIO
>   *
>   * @brief This type shall be used in device driver entry declarations and
>   *   definitions.
>   *
>   * Device driver entries return an #rtems_status_code status code. This
> type
>   * definition helps to document device driver entries in the source code.
>   */
> typedef rtems_status_code rtems_device_driver;
>

That's more than sufficient.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200929/c7688445/attachment-0001.html>


More information about the devel mailing list