mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
tests/saul_drivers: add saul build test application
This commit is contained in:
parent
ad03af4a50
commit
70d7b4eb13
52
tests/saul_drivers/Makefile
Normal file
52
tests/saul_drivers/Makefile
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
BOARD ?= stm32f4discovery
|
||||||
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
|
# Only build on a subset of boards (one per arch supported and
|
||||||
|
# with enough features provided)
|
||||||
|
BOARD_WHITELIST ?= \
|
||||||
|
atmega256rfr2-xpro \
|
||||||
|
esp32-wroom-32 \
|
||||||
|
stm32f4discovery \
|
||||||
|
#
|
||||||
|
|
||||||
|
# Get the list of drivers with a SAUL interface (without saul periph)
|
||||||
|
DRIVERS_DIR = $(RIOTBASE)/drivers
|
||||||
|
DRIVERS_WITH_SAUL_PATHS = $(filter-out $(wildcard $(DRIVERS_DIR)/saul/*_saul.c),$(wildcard $(DRIVERS_DIR)/*/*_saul.c))
|
||||||
|
DRIVERS ?= $(subst _saul.c,,$(notdir $(DRIVERS_WITH_SAUL_PATHS)))
|
||||||
|
USEMODULE += $(DRIVERS)
|
||||||
|
|
||||||
|
# Somes drivers with submodules needs special care to select a precise driver variant
|
||||||
|
ifneq (,$(filter adcxx1c,$(DRIVERS)))
|
||||||
|
USEMODULE += adc081c
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter apds99xx,$(DRIVERS)))
|
||||||
|
USEMODULE += apds9960
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter bme680,$(DRIVERS)))
|
||||||
|
USEMODULE += bme680_i2c
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter lm75,$(DRIVERS)))
|
||||||
|
USEMODULE += tmp1075
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter lpsxxx,$(DRIVERS)))
|
||||||
|
USEMODULE += lps22hh
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter mhz19,$(DRIVERS)))
|
||||||
|
USEMODULE += mhz19_uart
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter mpu9x50,$(DRIVERS)))
|
||||||
|
USEMODULE += mpu9150
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter pcf857x,$(DRIVERS)))
|
||||||
|
USEMODULE += pcf8575
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter si70xx,$(DRIVERS)))
|
||||||
|
USEMODULE += si7021
|
||||||
|
endif
|
||||||
|
ifneq (,$(filter tmp00x,$(DRIVERS)))
|
||||||
|
USEMODULE += tmp006
|
||||||
|
endif
|
||||||
|
|
||||||
|
USEMODULE += saul_default
|
||||||
|
|
||||||
|
include $(RIOTBASE)/Makefile.include
|
9
tests/saul_drivers/README.md
Normal file
9
tests/saul_drivers/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
saul_drivers
|
||||||
|
============
|
||||||
|
|
||||||
|
This application is only used by the CI to check the build of drivers that
|
||||||
|
provide a SAUL interface.
|
||||||
|
All such drivers are added automatically to the build along with the
|
||||||
|
`saul_default` module. This will check:
|
||||||
|
- the build of the saul interface,
|
||||||
|
- the build of driver auto initialization.
|
24
tests/saul_drivers/main.c
Normal file
24
tests/saul_drivers/main.c
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup tests
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Build test application for drivers providing a SAUL interface
|
||||||
|
*
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user