Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/drivers/audio/pdm_loopback/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ CONFIG_AUDIO=y
CONFIG_AUDIO_DMIC=y
CONFIG_GPIO=y
CONFIG_NRFX_GPPI=y
CONFIG_NRFX_TIMER=y
2 changes: 1 addition & 1 deletion tests/drivers/audio/pdm_loopback/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ ZTEST(pdm_loopback, test_pdm_clk_frequency)
timer_config.mode = NRF_TIMER_MODE_COUNTER;

ret = nrfx_timer_init(&timer_instance, &timer_config, timer_handler);
zassert_true(ret == NRFX_SUCCESS,
zassert_true(ret == 0,
"TIMER initialization failed, return code = 0x%08X", ret);

nrfx_timer_enable(&timer_instance);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions tests/drivers/i2c/i2c_latency/prj.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
CONFIG_I2C=y
CONFIG_NRFX_TWIS=y

CONFIG_ZTEST=y
CONFIG_DK_LIBRARY=y
Expand Down
22 changes: 6 additions & 16 deletions tests/drivers/i2c/i2c_latency/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@

#include <zephyr/ztest.h>

#if CONFIG_NRFX_TWIS1
#define I2C_S_INSTANCE 1
#elif CONFIG_NRFX_TWIS2
#define I2C_S_INSTANCE 2
#elif CONFIG_NRFX_TWIS22
#define I2C_S_INSTANCE 22
#elif CONFIG_NRFX_TWIS131
#define I2C_S_INSTANCE 131
#else
#error "TWIS instance not enabled or not supported"
#endif

#define NODE_TWIM DT_NODELABEL(sensor)
#define NODE_TWIS DT_ALIAS(i2c_slave)
#define MEASUREMENT_REPEATS 10
Expand All @@ -42,7 +30,9 @@

#define TEST_TIMER_COUNT_TIME_LIMIT_MS 500
#define MAX_TEST_DATA_SIZE 255
static const nrfx_twis_t twis = NRFX_TWIS_INSTANCE(I2C_S_INSTANCE);
static nrfx_twis_t twis = {
.p_reg = (NRF_TWIS_Type *)DT_REG_ADDR(NODE_TWIS)
};
const struct device *const tst_timer_dev = DEVICE_DT_GET(DT_ALIAS(tst_timer));

static uint8_t i2c_slave_buffer[MAX_TEST_DATA_SIZE] TWIS_MEMORY_SECTION;
Expand Down Expand Up @@ -143,7 +133,7 @@ static void assess_measurement_result(uint64_t timer_value_us,
"Measured call latency is over the specified limit");
}

static void i2s_slave_handler(nrfx_twis_evt_t const *p_event)
static void i2s_slave_handler(nrfx_twis_event_t const *p_event)
{
switch (p_event->type) {
case NRFX_TWIS_EVT_READ_REQ:
Expand Down Expand Up @@ -174,15 +164,15 @@ static void *test_setup(void)
zassert_equal(dk_leds_init(), 0, "DK leds init failed");

dk_set_led_off(DK_LED1);
zassert_equal(NRFX_SUCCESS, nrfx_twis_init(&twis, &config, i2s_slave_handler),
zassert_equal(0, nrfx_twis_init(&twis, &config, i2s_slave_handler),
"TWIS initialization failed");

PINCTRL_DT_DEFINE(NODE_TWIS);
ret = pinctrl_apply_state(PINCTRL_DT_DEV_CONFIG_GET(NODE_TWIS), PINCTRL_STATE_DEFAULT);
zassert_ok(ret);

IRQ_CONNECT(DT_IRQN(NODE_TWIS), DT_IRQ(NODE_TWIS, priority),
NRFX_TWIS_INST_HANDLER_GET(I2C_S_INSTANCE), NULL, 0);
nrfx_twis_irq_handler, &twis, 0);

nrfx_twis_enable(&twis);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y

# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y

# Reduce GPIO driver size
CONFIG_GPIO_NRFX_INTERRUPT=n