diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-06-07 12:55:23 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-06-07 12:55:23 +0000 |
commit | afc0508c0b98188ecd6467391cd8043f0ba9ff57 (patch) | |
tree | f592dc64b8896990985fb2dcb175402e31fc4167 /os/hal/lib/peripherals/flash | |
parent | d151ada9c34470d74729e9d00467a40970e5beae (diff) | |
download | ChibiOS-afc0508c0b98188ecd6467391cd8043f0ba9ff57.tar.gz ChibiOS-afc0508c0b98188ecd6467391cd8043f0ba9ff57.tar.bz2 ChibiOS-afc0508c0b98188ecd6467391cd8043f0ba9ff57.zip |
M25Qxx demos working in both SPI and QSPI modes.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9600 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/lib/peripherals/flash')
-rw-r--r-- | os/hal/lib/peripherals/flash/hal_jesd216_flash.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/os/hal/lib/peripherals/flash/hal_jesd216_flash.c b/os/hal/lib/peripherals/flash/hal_jesd216_flash.c index 58212a2a1..af7823ac8 100644 --- a/os/hal/lib/peripherals/flash/hal_jesd216_flash.c +++ b/os/hal/lib/peripherals/flash/hal_jesd216_flash.c @@ -337,6 +337,9 @@ void jesd216_bus_acquire(BUSDriver *busp, BUSConfig *config) { (void)config;
qspiAcquireBus(busp);
+ if (busp->config != config) {
+ qspiStart(busp, config);
+ }
}
void jesd216_bus_release(BUSDriver *busp) {
@@ -348,7 +351,9 @@ void jesd216_bus_release(BUSDriver *busp) { void jesd216_bus_acquire(BUSDriver *busp, const BUSConfig *config) {
spiAcquireBus(busp);
- spiStart(busp, config);
+ if (busp->config != config) {
+ spiStart(busp, config);
+ }
}
void jesd216_bus_release(BUSDriver *busp) {
|