Fixed build problem.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11272 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
e00c841efc
commit
f6b807fd5a
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue