From f6b807fd5a089607a1e21dbcad3c060363650fa1 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 14 Jan 2018 11:09:44 +0000 Subject: Fixed build problem. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11272 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/lib/peripherals/flash/hal_jesd216_flash.c | 18 +++++++++--------- release_note_next.txt | 1 - testex/STM32/STM32F3xx/SPI-N25Q128/Makefile | 1 - testex/STM32/STM32F3xx/SPI-N25Q128/main.c | 7 ++++--- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/os/hal/lib/peripherals/flash/hal_jesd216_flash.c b/os/hal/lib/peripherals/flash/hal_jesd216_flash.c index 9cc986c04..c27a1ba02 100644 --- a/os/hal/lib/peripherals/flash/hal_jesd216_flash.c +++ b/os/hal/lib/peripherals/flash/hal_jesd216_flash.c @@ -184,9 +184,9 @@ void jesd216_cmd_addr(BUSDriver *busp, spiSelect(busp); buf[0] = cmd; - buf[1] = (uint8_t)(addr >> 16); - buf[2] = (uint8_t)(addr >> 8); - buf[3] = (uint8_t)(addr >> 0); + buf[1] = (uint8_t)(offset >> 16); + buf[2] = (uint8_t)(offset >> 8); + buf[3] = (uint8_t)(offset >> 0); spiSend(busp, 4, buf); spiUnselect(busp); #endif @@ -231,9 +231,9 @@ void jesd216_cmd_addr_send(BUSDriver *busp, spiSelect(busp); buf[0] = cmd; - buf[1] = (uint8_t)(addr >> 16); - buf[2] = (uint8_t)(addr >> 8); - buf[3] = (uint8_t)(addr >> 0); + buf[1] = (uint8_t)(offset >> 16); + buf[2] = (uint8_t)(offset >> 8); + buf[3] = (uint8_t)(offset >> 0); spiSend(busp, 4, buf); spiSend(busp, n, p); spiUnselect(busp); @@ -280,9 +280,9 @@ void jesd216_cmd_addr_receive(BUSDriver *busp, spiSelect(busp); buf[0] = cmd; - buf[1] = (uint8_t)(addr >> 16); - buf[2] = (uint8_t)(addr >> 8); - buf[3] = (uint8_t)(addr >> 0); + buf[1] = (uint8_t)(offset >> 16); + buf[2] = (uint8_t)(offset >> 8); + buf[3] = (uint8_t)(offset >> 0); spiSend(busp, 4, buf); spiReceive(busp, n, p); spiUnselect(busp); diff --git a/release_note_next.txt b/release_note_next.txt index 2d8d67471..6b402943f 100644 --- a/release_note_next.txt +++ b/release_note_next.txt @@ -131,4 +131,3 @@ received a series of important improvements, new features have been added. - Added STM32L496xx/STM32L4A6xx support. - Added STM32F030x4 support. - Added initial STM32H7xx support. - \ No newline at end of file diff --git a/testex/STM32/STM32F3xx/SPI-N25Q128/Makefile b/testex/STM32/STM32F3xx/SPI-N25Q128/Makefile index bc34444bd..40fdc3429 100644 --- a/testex/STM32/STM32F3xx/SPI-N25Q128/Makefile +++ b/testex/STM32/STM32F3xx/SPI-N25Q128/Makefile @@ -99,7 +99,6 @@ include $(CHIBIOS)/os/rt/rt.mk include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk # Other files (optional). include $(CHIBIOS)/os/ex/Micron/m25q.mk -include $(CHIBIOS)/os/ex/subsystems/mfs/mfs.mk # Define linker script file here LDSCRIPT= $(STARTUPLD)/STM32F303xC.ld diff --git a/testex/STM32/STM32F3xx/SPI-N25Q128/main.c b/testex/STM32/STM32F3xx/SPI-N25Q128/main.c index 836e26956..1cec3f524 100644 --- a/testex/STM32/STM32F3xx/SPI-N25Q128/main.c +++ b/testex/STM32/STM32F3xx/SPI-N25Q128/main.c @@ -23,6 +23,7 @@ * Maximum speed SPI configuration (18MHz, CPHA=0, CPOL=0, MSb first). */ static const SPIConfig hs_spicfg = { + false, NULL, GPIOB, 12, @@ -114,12 +115,12 @@ int main(void) { m25qStart(&flash, &flashcfg); /* Programming a pattern.*/ - err = flashProgram(&flash, 0, pattern, 128); + err = flashProgram(&flash, 0, 128, pattern); if (err != FLASH_NO_ERROR) chSysHalt("program error"); /* Reading it back.*/ - err = flashRead(&flash, 0, buffer, 128); + err = flashRead(&flash, 0, 128, buffer); if (err != FLASH_NO_ERROR) chSysHalt("read error"); @@ -135,7 +136,7 @@ int main(void) { chSysHalt("verify erase error"); /* Reading back for confirmation.*/ - err = flashRead(&flash, 0, buffer, 128); + err = flashRead(&flash, 0, 128, buffer); if (err != FLASH_NO_ERROR) chSysHalt("read error"); -- cgit v1.2.3