From: Michal Bloch Date: Wed, 4 Aug 2021 13:12:10 +0000 (+0200) Subject: Add RPi4 to tests X-Git-Tag: submit/tizen/20210813.142813~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F27%2F262227%2F2;p=platform%2Fcore%2Fapi%2Fperipheral-io.git Add RPi4 to tests Change-Id: I98a9b186ff5039b2ce3adc906c927714c364f4e3 Signed-off-by: Michal Bloch --- diff --git a/test/peripheral-io-test.c b/test/peripheral-io-test.c index 44478b1..c5bee68 100644 --- a/test/peripheral-io-test.c +++ b/test/peripheral-io-test.c @@ -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"} }; diff --git a/test/src/test_peripheral_i2c.c b/test/src/test_peripheral_i2c.c index 12e4266..e330ca8 100644 --- a/test/src/test_peripheral_i2c.c +++ b/test/src/test_peripheral_i2c.c @@ -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(); diff --git a/test/src/test_peripheral_pwm.c b/test/src/test_peripheral_pwm.c index 77ecfe7..e04c6bf 100644 --- a/test/src/test_peripheral_pwm.c +++ b/test/src/test_peripheral_pwm.c @@ -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 { diff --git a/test/src/test_peripheral_spi.c b/test/src/test_peripheral_spi.c index 56d2761..4084e76 100644 --- a/test/src/test_peripheral_spi.c +++ b/test/src/test_peripheral_spi.c @@ -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 diff --git a/test/src/test_peripheral_uart.c b/test/src/test_peripheral_uart.c index c32bb34..0c7db85 100644 --- a/test/src/test_peripheral_uart.c +++ b/test/src/test_peripheral_uart.c @@ -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