diff options
Diffstat (limited to 'os/hal/lib/peripherals')
-rw-r--r-- | os/hal/lib/peripherals/flash/hal_jesd216_flash.c | 10 | ||||
-rw-r--r-- | os/hal/lib/peripherals/flash/hal_jesd216_flash.h | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/os/hal/lib/peripherals/flash/hal_jesd216_flash.c b/os/hal/lib/peripherals/flash/hal_jesd216_flash.c index 53f458c03..58212a2a1 100644 --- a/os/hal/lib/peripherals/flash/hal_jesd216_flash.c +++ b/os/hal/lib/peripherals/flash/hal_jesd216_flash.c @@ -332,7 +332,9 @@ void jesd216_cmd_addr_dummy_receive(BUSDriver *busp, #if ((JESD216_BUS_MODE != JESD216_BUS_MODE_SPI) && \
(JESD216_SHARED_BUS == TRUE)) || defined(__DOXYGEN__)
-void jesd216_bus_acquire(BUSDriver *busp) {
+void jesd216_bus_acquire(BUSDriver *busp, BUSConfig *config) {
+
+ (void)config;
qspiAcquireBus(busp);
}
@@ -343,13 +345,13 @@ void jesd216_bus_release(BUSDriver *busp) { }
#elif (JESD216_BUS_MODE == JESD216_BUS_MODE_SPI) && \
(JESD216_SHARED_BUS == TRUE)
-static void jesd216_bus_acquire(BUSDriver *busp) {
+void jesd216_bus_acquire(BUSDriver *busp, const BUSConfig *config) {
spiAcquireBus(busp);
- spiStart(busp, busp->config->spicfg);
+ spiStart(busp, config);
}
-static void jesd216_bus_release(BUSDriver *busp) {
+void jesd216_bus_release(BUSDriver *busp) {
spiReleaseBus(busp);
}
diff --git a/os/hal/lib/peripherals/flash/hal_jesd216_flash.h b/os/hal/lib/peripherals/flash/hal_jesd216_flash.h index bb2214e81..1cff3cc32 100644 --- a/os/hal/lib/peripherals/flash/hal_jesd216_flash.h +++ b/os/hal/lib/peripherals/flash/hal_jesd216_flash.h @@ -78,7 +78,7 @@ /**
* @brief Physical transport interface.
*/
-#if !defined(JESD216_USE_SPI) || defined(__DOXYGEN__)
+#if !defined(JESD216_BUS_MODE) || defined(__DOXYGEN__)
#define JESD216_BUS_MODE JESD216_BUS_MODE_QSPI4L
#endif
@@ -107,7 +107,7 @@ #endif
#if (JESD216_BUS_MODE == JESD216_BUS_MODE_SPI) && \
- (JESD216_SHARED_SPI == TRUE) && \
+ (JESD216_SHARED_BUS == TRUE) && \
(SPI_USE_MUTUAL_EXCLUSION == FALSE)
#error "JESD216_SHARED_SPI requires SPI_USE_MUTUAL_EXCLUSION"
#endif
@@ -209,7 +209,7 @@ extern "C" { size_t n, uint8_t *p);
#endif /* JESD216_BUS_MODE != JESD216_BUS_MODE_SPI */
#if JESD216_SHARED_BUS == TRUE
- void jesd216_bus_acquire(BUSDriver *busp);
+ void jesd216_bus_acquire(BUSDriver *busp, const BUSConfig *config);
void jesd216_bus_release(BUSDriver *busp);
#endif
#ifdef __cplusplus
|