-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Improve driver implementation documentation #14330
Description
I recently wrote my first RIOT device driver. In the process of porting my driver I discovered the following (incomplete) documentation here: http://doc.riot-os.org/driver-guide.html.
There is a General Device Driver Checklist. It tells us for example, that there needs to be a include/devab_params.h file for default parameters of the driver devab. But in order to get access to these params from outside of the driver module, one needs to add
ifneq (,$(filter devab,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/drivers/devab/include
endif
to Makefile.include within the drivers directory. This is not explained in the documentation as far as I can see.
I also tested this with the command make generate-driver. It created two header files include/bla_constants.h and include/bla_params.h for me. The problem is that they are included with #include "bla_constants.h" and #include "bla_params.h". Trying to use this new driver gives fatal error: bla_constants.h: No such file or directory on compilation, because they are "hidden" in the include directoy. The script should also adapt Makefile.include as stated above.