1./arch/arm/src/samv7/sam_spi.c DMA Tx/Rx timeout issue.
2./arch/arm/src/samv7/sam_qspi.c compiling error when set CONFIG_SAMV7_QSPI_DLYBCT 3. fix compiling error when set CONFIG_BOARDCTL_IOCTL/CONFIG_BOARDCTL_UNIQUEID
This commit is contained in:
parent
8dd17362e3
commit
46895dc86b
|
@ -1189,7 +1189,7 @@ static uint32_t qspi_setfrequency(struct qspi_dev_s *dev, uint32_t frequency)
|
|||
regval &= ~QSPI_MR_DLYBCT_MASK;
|
||||
|
||||
#if CONFIG_SAMV7_QSPI_DLYBCT > 0
|
||||
dlybct = ((CONFIG_SAMV7_QSPI_DLYBCT * (SAM_QSPI_CLOCK /1000000)) / 1000 / 32;
|
||||
dlybct = ((CONFIG_SAMV7_QSPI_DLYBCT * (SAM_QSPI_CLOCK /1000000)) / 1000 / 32);
|
||||
regval |= dlybct << QSPI_MR_DLYBCT_SHIFT;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1736,7 +1736,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
|||
rxflags = DMACH_FLAG_FIFOCFG_LARGEST | DMACH_FLAG_PERIPHPID(spi->pid) |
|
||||
DMACH_FLAG_PERIPHH2SEL | DMACH_FLAG_PERIPHISPERIPH |
|
||||
DMACH_FLAG_PERIPHCHUNKSIZE_1 | DMACH_FLAG_MEMPID_MAX |
|
||||
DMACH_FLAG_MEMCHUNKSIZE_1;
|
||||
DMACH_FLAG_MEMCHUNKSIZE_1 | DMACH_FLAG_PERIPHAHB_AHB_IF1;
|
||||
|
||||
/* Set the source and destination width bits */
|
||||
|
||||
|
@ -1772,7 +1772,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
|||
txflags = DMACH_FLAG_FIFOCFG_LARGEST | DMACH_FLAG_PERIPHPID(spi->pid) |
|
||||
DMACH_FLAG_PERIPHH2SEL | DMACH_FLAG_PERIPHISPERIPH |
|
||||
DMACH_FLAG_PERIPHCHUNKSIZE_1 | DMACH_FLAG_MEMPID_MAX |
|
||||
DMACH_FLAG_MEMCHUNKSIZE_1;
|
||||
DMACH_FLAG_MEMCHUNKSIZE_1 | DMACH_FLAG_PERIPHAHB_AHB_IF1;
|
||||
|
||||
/* Set the source and destination width bits */
|
||||
|
||||
|
|
|
@ -41,7 +41,9 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <nuttx/arch.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "samv71-xult.h"
|
||||
|
||||
|
@ -87,4 +89,30 @@ int board_app_initialize(uintptr_t arg)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BOARDCTL_IOCTL
|
||||
int board_ioctl(unsigned int cmd, uintptr_t arg)
|
||||
{
|
||||
switch(cmd)
|
||||
{
|
||||
default:
|
||||
return -ENOTTY; /* Standard return for command not supported */
|
||||
break;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BOARDCTL_UNIQUEID)
|
||||
int board_uniqueid(uint8_t *uniqueid)
|
||||
{
|
||||
if (uniqueid == NULL)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_LIB_BOARDCTL */
|
||||
|
|
Loading…
Reference in New Issue