From d151ada9c34470d74729e9d00467a40970e5beae Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 7 Jun 2016 10:12:08 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9599 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/lib/peripherals/flash/hal_jesd216_flash.c | 10 ++++++---- os/hal/lib/peripherals/flash/hal_jesd216_flash.h | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'os/hal/lib') 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 -- cgit v1.2.3