Allow rpi3/rpi4 ADC tests to pass initialization 73/286773/4
authorAntoni Adaszkiewicz <a.adaszkiewi@samsung.com>
Thu, 12 Jan 2023 13:23:40 +0000 (14:23 +0100)
committerAntoni Adaszkiewicz <a.adaszkiewi@samsung.com>
Mon, 13 Feb 2023 13:33:11 +0000 (14:33 +0100)
Change-Id: I97a438605315c78d256e0328b18e5fdcce1e8368

test/src/test_peripheral_adc.c

index c7b8088..bb89fd5 100644 (file)
 #include "test_peripheral_adc.h"
 
 #define ADC_DEVICE_ARTIK530 0
+/*
+Our tests cover device support checking capability of this api.
+ADC_DEVICE_DEFAULT is a mock constant (only used to pass initial
+verification in api calls).
+*/
+#define ADC_DEVICE_DEFAULT 0
 #define ADC_DEVICE_INVALID -99
 #define ADC_CHANNEL 3
 #define ADC_CHANNEL_INVALID -99
@@ -34,6 +40,8 @@ int test_peripheral_io_adc_initialize(char *model, bool feature)
 
        if (!strcmp(model, "artik"))
                device = ADC_DEVICE_ARTIK530;
+       else if (!strcmp(model, "rpi3") || !strcmp(model, "rpi4"))
+               device = ADC_DEVICE_DEFAULT;
        else
                return PERIPHERAL_ERROR_NO_DEVICE;