From 1946bf12fe1af2b85162b6ca8a872f1bf1c5fe7f Mon Sep 17 00:00:00 2001 From: Miguel Boing Date: Fri, 9 Aug 2024 14:09:24 -0300 Subject: [PATCH] firmware: tests: drivers: Fixing radio includes #76 --- firmware/tests/drivers/Makefile | 3 ++- firmware/tests/drivers/si446x_test.c | 9 --------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/firmware/tests/drivers/Makefile b/firmware/tests/drivers/Makefile index 2b6fd07..67d2262 100644 --- a/firmware/tests/drivers/Makefile +++ b/firmware/tests/drivers/Makefile @@ -10,13 +10,14 @@ endif CC=gcc INC=../../ +INC_RADIO=../../config FLAGS=-fpic -std=c99 -Wall -pedantic -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -I$(INC) -I../../tests/freertos_sim/ -Wl,--wrap=sys_log_init,--wrap=sys_log_print_event,--wrap=sys_log_print_event_from_module,--wrap=sys_log_print_msg,--wrap=sys_log_print_str,--wrap=sys_log_new_line,--wrap=sys_log_print_uint,--wrap=sys_log_print_int,--wrap=sys_log_print_hex,--wrap=sys_log_dump_hex,--wrap=sys_log_print_float,--wrap=sys_log_print_byte,--wrap=sys_log_print_system_time,--wrap=sys_log_print_license_msg,--wrap=sys_log_print_splash_screen,--wrap=sys_log_print_firmware_version TCA4311A_TEST_FLAGS=$(FLAGS),--wrap=i2c_init,--wrap=i2c_write,--wrap=i2c_read,--wrap=gpio_init,--wrap=gpio_set_state,--wrap=gpio_get_state,--wrap=gpio_toggle ISIS_ANTENNA_TEST_FLAGS=$(FLAGS),--wrap=tca4311a_init,--wrap=tca4311a_enable,--wrap=tca4311a_disable,--wrap=tca4311a_is_ready,--wrap=tca4311a_write,--wrap=tca4311a_read,--wrap=tca4311a_write_byte,--wrap=tca4311a_read_byte -SI446X_TEST_FLAGS=$(FLAGS),--wrap=spi_init,--wrap=spi_select_slave,--wrap=spi_write,--wrap=spi_read,--wrap=spi_transfer,--wrap=gpio_init,--wrap=gpio_set_state,--wrap=gpio_get_state,--wrap=gpio_toggle +SI446X_TEST_FLAGS=-D SI446X_TEST -I$(INC_RADIO) $(FLAGS),--wrap=spi_init,--wrap=spi_select_slave,--wrap=spi_write,--wrap=spi_read,--wrap=spi_transfer,--wrap=gpio_init,--wrap=gpio_set_state,--wrap=gpio_get_state,--wrap=gpio_toggle INA22X_TEST_FLAGS=$(FLAGS),--wrap=i2c_init,--wrap=i2c_write,--wrap=i2c_read diff --git a/firmware/tests/drivers/si446x_test.c b/firmware/tests/drivers/si446x_test.c index 9c21e3f..3ecd672 100644 --- a/firmware/tests/drivers/si446x_test.c +++ b/firmware/tests/drivers/si446x_test.c @@ -44,15 +44,6 @@ #include #include -#include - -#if defined(RADIO_MODULE) && (RADIO_MODULE == 0) -#include - -#elif defined(RADIO_MODULE) && (RADIO_MODULE == 1) -#include -#endif - #include #include #include