Skip to content

Commit

Permalink
hw/mcu/nordic: Add common QSPI HAL
Browse files Browse the repository at this point in the history
  • Loading branch information
m-gorecki committed Dec 5, 2024
1 parent 11d13cc commit 5f8038e
Show file tree
Hide file tree
Showing 15 changed files with 136 additions and 880 deletions.
2 changes: 1 addition & 1 deletion hw/bsp/nordic_pca10056/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ hal_bsp_flash_dev(uint8_t id)
}
#if MYNEWT_VAL(QSPI_ENABLE)
if (id == 1) {
return &nrf52k_qspi_dev;
return &nrf_qspi_dev;
}
#endif
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/nordic_pca10059/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ hal_bsp_flash_dev(uint8_t id)
}
#if MYNEWT_VAL(QSPI_ENABLE)
if (id == 1) {
return &nrf52k_qspi_dev;
return &nrf_qspi_dev;
}
#endif
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/nordic_pca10095/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ hal_bsp_flash_dev(uint8_t id)
}
#if MYNEWT_VAL(QSPI_ENABLE)
if (id == 1) {
return &nrf5340_qspi_dev;
return &nrf_qspi_dev;
}
#endif
#if MYNEWT_VAL(IPC_NRF5340_FLASH_CLIENT)
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/nordic_pca10121/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ hal_bsp_flash_dev(uint8_t id)
}
#if MYNEWT_VAL(QSPI_ENABLE)
if (id == 1) {
return &nrf5340_qspi_dev;
return &nrf_qspi_dev;
}
#endif
#if MYNEWT_VAL(IPC_NRF5340_FLASH_CLIENT)
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/nordic_thingy53/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ hal_bsp_flash_dev(uint8_t id)
}
#if MYNEWT_VAL(QSPI_ENABLE)
if (id == 1) {
return &nrf5340_qspi_dev;
return &nrf_qspi_dev;
}
#endif
#if MYNEWT_VAL(IPC_NRF5340_FLASH_CLIENT)
Expand Down
2 changes: 1 addition & 1 deletion hw/bsp/ublox_bmd_345/src/hal_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ hal_bsp_flash_dev(uint8_t id)
}
#if MYNEWT_VAL(QSPI_ENABLE)
if (id == 1) {
return &nrf52k_qspi_dev;
return &nrf_qspi_dev;
}
#endif
return NULL;
Expand Down
2 changes: 0 additions & 2 deletions hw/mcu/nordic/nrf52xxx/include/mcu/nrf52_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ struct nrf52_hal_i2c_cfg {
uint32_t i2c_frequency;
};

extern const struct hal_flash nrf52k_qspi_dev;

/* SPI configuration (used for both master and slave) */
struct nrf52_hal_spi_cfg {
uint8_t sck_pin;
Expand Down
4 changes: 4 additions & 0 deletions hw/mcu/nordic/nrf52xxx/include/nrfx_config_nrf52840.h
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,12 @@
* Boolean. Accepted values: 0 and 1.
*/
#ifndef NRFX_QSPI_ENABLED
#if MYNEWT_VAL(QSPI_ENABLE)
#define NRFX_QSPI_ENABLED 1
#else
#define NRFX_QSPI_ENABLED 0
#endif
#endif

/**
* @brief NRFX_QSPI_DEFAULT_CONFIG_IRQ_PRIORITY
Expand Down
Loading

0 comments on commit 5f8038e

Please sign in to comment.