Add RPi4 to tests 27/262227/2
authorMichal Bloch <m.bloch@samsung.com>
Wed, 4 Aug 2021 13:12:10 +0000 (15:12 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 12 Aug 2021 15:03:57 +0000 (15:03 +0000)
Change-Id: I98a9b186ff5039b2ce3adc906c927714c364f4e3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
test/peripheral-io-test.c
test/src/test_peripheral_i2c.c
test/src/test_peripheral_pwm.c
test/src/test_peripheral_spi.c
test/src/test_peripheral_uart.c

index 44478b1..c5bee68 100644 (file)
@@ -56,6 +56,7 @@ typedef struct
 } skip_test_t;
 
 static skip_test_t skip_test_list[] = {
+       {"test_peripheral_io_spi_peripheral_spi_set_bit_order_p2", "rpi4"},
        {"test_peripheral_io_spi_peripheral_spi_set_bit_order_p2", "rpi3"}
 };
 
index 12e4266..e330ca8 100644 (file)
@@ -75,7 +75,7 @@ int test_peripheral_io_i2c_initialize(char *model, bool feature)
 {
        g_feature = feature;
 
-       if (strcmp(model, "rpi3") != 0 && strcmp(model, "artik") != 0)
+       if (strcmp(model, "rpi3") != 0 && strcmp(model, "rpi4") != 0 && strcmp(model, "artik") != 0)
                return PERIPHERAL_ERROR_NO_DEVICE;
 
        bus = __find_stub_driver();
index 77ecfe7..e04c6bf 100644 (file)
@@ -34,7 +34,7 @@ int test_peripheral_io_pwm_initialize(char *model, bool feature)
 {
        g_feature = feature;
 
-       if ((!strcmp(model, "rpi3")) || (!strcmp(model, "artik"))) {
+       if (!strcmp(model, "rpi3") || !strcmp(model, "rpi4") || !strcmp(model, "artik")) {
                chip = PWM_CHIP;
                pin = PWM_PIN;
        } else {
index 56d2761..4084e76 100644 (file)
@@ -20,6 +20,7 @@
 #include "test_peripheral_spi.h"
 
 #define SPI_BUS_RPI3 0
+#define SPI_BUS_RPI4 0
 #define SPI_BUS_ARTIK530 2
 #define SPI_BUS_INVALID -99
 #define SPI_CS 0
@@ -40,6 +41,8 @@ int test_peripheral_io_spi_initialize(char *model, bool feature)
 
        if (!strcmp(model, "rpi3"))
                bus = SPI_BUS_RPI3;
+       else if (!strcmp(model, "rpi4"))
+               bus = SPI_BUS_RPI4;
        else if (!strcmp(model, "artik"))
                bus = SPI_BUS_ARTIK530;
        else
index c32bb34..0c7db85 100644 (file)
@@ -20,6 +20,7 @@
 #include "test_peripheral_uart.h"
 
 #define UART_PORT_RPI3 0
+#define UART_PORT_RPI4 0
 #define UART_PORT_ARTIK530 4
 #define UART_PORT_INVALID -99
 #define UART_BUFFER_LEN 10
@@ -34,6 +35,8 @@ int test_peripheral_io_uart_initialize(char *model, bool feature)
 
        if (!strcmp(model, "rpi3"))
                port = UART_PORT_RPI3;
+       else if (!strcmp(model, "rpi4"))
+               port = UART_PORT_RPI4;
        else if (!strcmp(model, "artik"))
                port = UART_PORT_ARTIK530;
        else