Skip to content

Commit

Permalink
[sw,spi_host_config_test] Fix backdoor variables
Browse files Browse the repository at this point in the history
Signed-off-by: Amaury Pouly <[email protected]>
  • Loading branch information
pamaury committed Feb 23, 2025
1 parent 8c535a1 commit 9f7c339
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sw/device/tests/spi_host_config_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ enum {
kSpiClock = 20000,
};

uint8_t backdoor_cpha = UINT8_MAX;
uint8_t backdoor_cpol = UINT8_MAX;
uint32_t backdoor_data = UINT32_MAX;
OTTF_BACKDOOR_VAR(uint8_t, backdoor_cpha, UINT8_MAX)
OTTF_BACKDOOR_VAR(uint8_t, backdoor_cpol, UINT8_MAX)
OTTF_BACKDOOR_VAR(uint32_t, backdoor_data, UINT32_MAX)

static status_t spi_config_test(dif_spi_host_t *spi);

Expand Down Expand Up @@ -80,7 +80,7 @@ static status_t spi_config_test(dif_spi_host_t *spi) {
static uint32_t address = 0;
OTTF_WAIT_FOR(backdoor_data != UINT32_MAX, kDefaultTimeoutMicros);
uint8_t data[sizeof(backdoor_data)];
memcpy(data, &backdoor_data, sizeof(data));
memcpy(data, (const void *)&backdoor_data, sizeof(data));
busy_spin_micros(40000);
TRY(spi_flash_testutils_program_page(spi, data, sizeof(data), address,
false));
Expand Down

0 comments on commit 9f7c339

Please sign in to comment.