Fix the coding style and typo issue
Signed-off-by: anjiahao <anjiahao@xiaomi.com> Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
d07792a343
commit
a4563b8744
@ -173,7 +173,7 @@ struct cxd56adc_dev_s
|
||||
uint8_t fifomode; /* fifo mode */
|
||||
struct scufifo_wm_s *wm; /* water mark */
|
||||
struct math_filter_s *filter; /* math filter */
|
||||
struct scuev_notify_s * notify; /* notify */
|
||||
struct scuev_notify_s *notify; /* notify */
|
||||
mutex_t lock; /* exclusive mutex */
|
||||
int crefs; /* reference count */
|
||||
};
|
||||
|
@ -292,6 +292,10 @@ struct dma_channel_s
|
||||
static struct dma_channel_s g_dmach[NCHANNELS];
|
||||
static mutex_t g_dmalock = NXMUTEX_INITIALIZER;
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
static int dma_init(int ch);
|
||||
static int dma_uninit(int ch);
|
||||
static int dma_open(int ch);
|
||||
@ -328,6 +332,7 @@ static struct dmac_register_map *get_device(int ch)
|
||||
case 2: return (struct dmac_register_map *)DMAC2_REG_BASE;
|
||||
case 3: return (struct dmac_register_map *)DMAC3_REG_BASE;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -335,7 +340,9 @@ static struct dmac_ch_register_map *get_channel(int ch)
|
||||
{
|
||||
struct dmac_register_map *dev = get_device(ch);
|
||||
if (dev == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (is_dmac(2, dev))
|
||||
{
|
||||
|
@ -935,13 +935,11 @@ static int cxd56_emmc_geometry(struct inode *inode,
|
||||
|
||||
int cxd56_emmcinitialize(void)
|
||||
{
|
||||
struct cxd56_emmc_state_s *priv;
|
||||
struct cxd56_emmc_state_s *priv = &g_emmcdev;
|
||||
uint8_t *buf;
|
||||
struct emmc_dma_desc_s *descs;
|
||||
int ret;
|
||||
|
||||
priv = &g_emmcdev;
|
||||
|
||||
ret = emmc_hwinitialize();
|
||||
if (ret != OK)
|
||||
{
|
||||
|
@ -550,7 +550,7 @@ static int cxd56_geofence_poll(struct file *filep,
|
||||
struct pollfd *fds,
|
||||
bool setup)
|
||||
{
|
||||
struct inode * inode;
|
||||
struct inode *inode;
|
||||
struct cxd56_geofence_dev_s *priv;
|
||||
int ret = OK;
|
||||
int i;
|
||||
|
@ -161,7 +161,7 @@ struct cxd56_gnss_dev_s
|
||||
uint8_t num_open;
|
||||
uint8_t notify_data;
|
||||
struct file cepfp;
|
||||
void * cepbuf;
|
||||
void *cepbuf;
|
||||
struct pollfd *fds[CONFIG_CXD56_GNSS_NPOLLWAITERS];
|
||||
#if CONFIG_CXD56_GNSS_NSIGNALRECEIVERS != 0
|
||||
struct cxd56_gnss_sig_s sigs[CONFIG_CXD56_GNSS_NSIGNALRECEIVERS];
|
||||
@ -2688,7 +2688,7 @@ static int cxd56_gnss_initialize(struct cxd56_gnss_dev_s *dev)
|
||||
|
||||
static int cxd56_gnss_open(struct file *filep)
|
||||
{
|
||||
struct inode * inode;
|
||||
struct inode *inode;
|
||||
struct cxd56_gnss_dev_s *priv;
|
||||
int ret = OK;
|
||||
int retry = 50;
|
||||
@ -2795,7 +2795,7 @@ success:
|
||||
|
||||
static int cxd56_gnss_close(struct file *filep)
|
||||
{
|
||||
struct inode * inode;
|
||||
struct inode *inode;
|
||||
struct cxd56_gnss_dev_s *priv;
|
||||
int ret = OK;
|
||||
|
||||
@ -2937,7 +2937,7 @@ static ssize_t cxd56_gnss_write(struct file *filep,
|
||||
static int cxd56_gnss_ioctl(struct file *filep, int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
struct inode * inode;
|
||||
struct inode *inode;
|
||||
struct cxd56_gnss_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
|
@ -442,9 +442,7 @@ static int hif_initialize(struct hostif_buff_s *buffer)
|
||||
|
||||
cxd56_iccinit(CXD56_PROTO_HOSTIF);
|
||||
|
||||
ret = cxd56_iccregisterhandler(CXD56_PROTO_HOSTIF, hif_rxhandler, NULL);
|
||||
|
||||
return ret;
|
||||
return cxd56_iccregisterhandler(CXD56_PROTO_HOSTIF, hif_rxhandler, NULL);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -179,7 +179,7 @@ static struct cxd56_spidev_s g_spi4dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi4ops
|
||||
.ops = &g_spi4ops,
|
||||
},
|
||||
.spibase = CXD56_IMG_SPI_BASE,
|
||||
.spibasefreq = 0,
|
||||
@ -226,7 +226,7 @@ static struct cxd56_spidev_s g_spi5dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi5ops
|
||||
.ops = &g_spi5ops,
|
||||
},
|
||||
.spibase = CXD56_IMG_WSPI_BASE,
|
||||
.spibasefreq = 0,
|
||||
@ -272,7 +272,7 @@ static struct cxd56_spidev_s g_spi0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops,
|
||||
},
|
||||
.spibase = CXD56_SPIM_BASE,
|
||||
.spibasefreq = 0,
|
||||
@ -318,7 +318,7 @@ static struct cxd56_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
.spibase = CXD56_SCU_SPI_BASE,
|
||||
.spibasefreq = 0,
|
||||
|
@ -231,15 +231,7 @@ static ssize_t uart0_write(struct file *filep,
|
||||
|
||||
int cxd56_uart0initialize(const char *devname)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = register_driver(devname, &g_uart0fops, 0666, NULL);
|
||||
if (ret != 0)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
return OK;
|
||||
return register_driver(devname, &g_uart0fops, 0666, NULL);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -742,7 +742,7 @@ static void efm32_i2c_setclock(struct efm32_i2c_priv_s *priv,
|
||||
#elif defined(CONFIG_EFM32_I2C_CLHR_ASYMMETRIC)
|
||||
# define n (6 + 3) /* Ratio is 6:3 */
|
||||
#else /* CLHR STANDARD */
|
||||
# define n ( 4 + 4) /* Ratio is 4:4 */
|
||||
# define n (4 + 4) /* Ratio is 4:4 */
|
||||
#endif
|
||||
|
||||
div = (BOARD_HFPERCLK_FREQUENCY - (4 * frequency)) / (n * frequency);
|
||||
|
@ -294,7 +294,7 @@ static struct gd32_spidev_s g_spi0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops
|
||||
},
|
||||
.spibase = GD32_SPI0,
|
||||
.spiclock = GD32_PCLK2_FREQUENCY,
|
||||
|
@ -4978,19 +4978,19 @@ struct usbhost_connection_s *imxrt_ehci_initialize(int controller)
|
||||
/* Sanity checks */
|
||||
|
||||
DEBUGASSERT(controller == 0);
|
||||
DEBUGASSERT(((uintptr_t) & g_asynchead & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t)&g_asynchead & 0x1f) == 0);
|
||||
DEBUGASSERT((sizeof(struct imxrt_qh_s) & 0x1f) == 0);
|
||||
DEBUGASSERT((sizeof(struct imxrt_qtd_s) & 0x1f) == 0);
|
||||
|
||||
# ifdef CONFIG_IMXRT_EHCI_PREALLOCATE
|
||||
DEBUGASSERT(((uintptr_t) & g_qhpool & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t) & g_qtdpool & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t)&g_qhpool & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t)&g_qtdpool & 0x1f) == 0);
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_USBHOST_INT_DISABLE
|
||||
DEBUGASSERT(((uintptr_t) & g_intrhead & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t)&g_intrhead & 0x1f) == 0);
|
||||
# ifdef CONFIG_IMXRT_EHCI_PREALLOCATE
|
||||
DEBUGASSERT(((uintptr_t) g_framelist & 0xfff) == 0);
|
||||
DEBUGASSERT(((uintptr_t)g_framelist & 0xfff) == 0);
|
||||
# endif
|
||||
# endif /* CONFIG_USBHOST_INT_DISABLE */
|
||||
|
||||
@ -5199,7 +5199,7 @@ struct usbhost_connection_s *imxrt_ehci_initialize(int controller)
|
||||
*/
|
||||
|
||||
memset(&g_asynchead, 0, sizeof(struct imxrt_qh_s));
|
||||
physaddr = imxrt_physramaddr((uintptr_t) & g_asynchead);
|
||||
physaddr = imxrt_physramaddr((uintptr_t)&g_asynchead);
|
||||
g_asynchead.hw.hlp = imxrt_swap32(physaddr | QH_HLP_TYP_QH);
|
||||
g_asynchead.hw.epchar = imxrt_swap32(QH_EPCHAR_H | QH_EPCHAR_EPS_FULL);
|
||||
g_asynchead.hw.overlay.nqp = imxrt_swap32(QH_NQP_T);
|
||||
@ -5230,7 +5230,7 @@ struct usbhost_connection_s *imxrt_ehci_initialize(int controller)
|
||||
|
||||
/* Attach the periodic QH to Period Frame List */
|
||||
|
||||
physaddr = imxrt_physramaddr((uintptr_t) & g_intrhead);
|
||||
physaddr = imxrt_physramaddr((uintptr_t)&g_intrhead);
|
||||
for (i = 0; i < FRAME_LIST_SIZE; i++)
|
||||
{
|
||||
g_framelist[i] = imxrt_swap32(physaddr) | PFL_TYP_QH;
|
||||
|
@ -1201,7 +1201,7 @@ static int imxrt_ioctl(struct qe_lowerhalf_s *lower, int cmd,
|
||||
|
||||
int imxrt_qeinitialize(const char *devpath, int enc)
|
||||
{
|
||||
struct imxrt_enc_lowerhalf_s * priv = NULL;
|
||||
struct imxrt_enc_lowerhalf_s *priv = NULL;
|
||||
|
||||
switch (enc)
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ static struct imxrt_flexspidev_s g_flexspi0dev =
|
||||
{
|
||||
.ops = &g_flexspi0ops,
|
||||
},
|
||||
.base = (struct flexspi_type_s *) IMXRT_FLEXSPIC_BASE,
|
||||
.base = (struct flexspi_type_s *)IMXRT_FLEXSPIC_BASE,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
};
|
||||
|
||||
|
@ -1070,7 +1070,7 @@ static void imxrt_lpi2c_setclock(struct imxrt_lpi2c_priv_s *priv,
|
||||
CCM_CSCDR2_LPI2C_CLK_PODF_SHIFT;
|
||||
lpi2c_clk_div = lpi2c_clk_div + 1;
|
||||
src_freq = (BOARD_XTAL_FREQUENCY * pll3_div) /
|
||||
(8 * lpi2c_clk_div) ;
|
||||
(8 * lpi2c_clk_div);
|
||||
}
|
||||
|
||||
/* LPI2C output frequency = (Source Clock (Hz)/ 2^prescale) /
|
||||
@ -1976,7 +1976,7 @@ static int imxrt_lpi2c_dma_transfer(struct imxrt_lpi2c_priv_s *priv)
|
||||
LPI2C_MIER_NDIE | LPI2C_MIER_ALIE |
|
||||
LPI2C_MIER_PLTIE | LPI2C_MIER_FEIE);
|
||||
|
||||
imxrt_dmach_start(priv->dma, imxrt_dma_callback, (void *)priv);
|
||||
imxrt_dmach_start(priv->dma, imxrt_dma_callback, priv);
|
||||
|
||||
imxrt_lpi2c_modifyreg(priv, IMXRT_LPI2C_MDER_OFFSET, 0,
|
||||
LPI2C_MDER_TDDE | LPI2C_MDER_RDDE);
|
||||
|
@ -242,7 +242,7 @@ static struct imxrt_lpspidev_s g_lpspi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.spibase = IMXRT_LPSPI1_BASE,
|
||||
#ifdef CONFIG_IMXRT_LPSPI_INTERRUPTS
|
||||
@ -291,7 +291,7 @@ static struct imxrt_lpspidev_s g_lpspi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.spibase = IMXRT_LPSPI2_BASE,
|
||||
#ifdef CONFIG_IMXRT_LPSPI_INTERRUPTS
|
||||
@ -340,7 +340,7 @@ static struct imxrt_lpspidev_s g_lpspi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
.spibase = IMXRT_LPSPI3_BASE,
|
||||
#ifdef CONFIG_IMXRT_LPSPI_INTERRUPTS
|
||||
@ -389,7 +389,7 @@ static struct imxrt_lpspidev_s g_lpspi4dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi4ops
|
||||
.ops = &g_spi4ops,
|
||||
},
|
||||
.spibase = IMXRT_LPSPI4_BASE,
|
||||
#ifdef CONFIG_IMXRT_LPSPI_INTERRUPTS
|
||||
@ -1310,8 +1310,8 @@ static void imxrt_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
{
|
||||
/* 16-bit mode */
|
||||
|
||||
const uint16_t *src = (const uint16_t *)txbuffer;
|
||||
uint16_t *dest = (uint16_t *) rxbuffer;
|
||||
const uint16_t *src = txbuffer;
|
||||
uint16_t *dest = rxbuffer;
|
||||
uint16_t word;
|
||||
|
||||
while (nwords-- > 0)
|
||||
@ -1343,8 +1343,8 @@ static void imxrt_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
{
|
||||
/* 8-bit mode */
|
||||
|
||||
const uint8_t *src = (const uint8_t *)txbuffer;
|
||||
uint8_t *dest = (uint8_t *) rxbuffer;
|
||||
const uint8_t *src = txbuffer;
|
||||
uint8_t *dest = rxbuffer;
|
||||
uint8_t word;
|
||||
|
||||
while (nwords-- > 0)
|
||||
@ -1362,7 +1362,7 @@ static void imxrt_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
|
||||
/* Exchange one word */
|
||||
|
||||
word = (uint8_t) imxrt_lpspi_send(dev, (uint32_t) word);
|
||||
word = (uint8_t)imxrt_lpspi_send(dev, word);
|
||||
|
||||
/* Is there a buffer to receive the return value? */
|
||||
|
||||
@ -1396,9 +1396,9 @@ static void imxrt_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_IMXRT_LPSPI_DMA
|
||||
static void imxrt_lpspi_exchange(struct spi_dev_s * dev,
|
||||
const void * txbuffer,
|
||||
void * rxbuffer, size_t nwords)
|
||||
static void imxrt_lpspi_exchange(struct spi_dev_s *dev,
|
||||
const void *txbuffer,
|
||||
void *rxbuffer, size_t nwords)
|
||||
{
|
||||
int ret;
|
||||
size_t adjust;
|
||||
|
@ -1538,7 +1538,7 @@ static int imxrt_dma_setup(struct uart_dev_s *dev)
|
||||
* worth of time to claim bytes before they are overwritten.
|
||||
*/
|
||||
|
||||
imxrt_dmach_start(priv->rxdma, imxrt_dma_rxcallback, (void *)priv);
|
||||
imxrt_dmach_start(priv->rxdma, imxrt_dma_rxcallback, priv);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2398,7 +2398,7 @@ static void imxrt_dma_reenable(struct imxrt_uart_s *priv)
|
||||
* worth of time to claim bytes before they are overwritten.
|
||||
*/
|
||||
|
||||
imxrt_dmach_start(priv->rxdma, imxrt_dma_rxcallback, (void *)priv);
|
||||
imxrt_dmach_start(priv->rxdma, imxrt_dma_rxcallback, priv);
|
||||
|
||||
/* Clear DMA suspended flag. */
|
||||
|
||||
@ -2569,7 +2569,7 @@ static void imxrt_dma_send(struct uart_dev_s *dev)
|
||||
|
||||
/* Start transmission with the callback on DMA completion */
|
||||
|
||||
imxrt_dmach_start(priv->txdma, imxrt_dma_txcallback, (void *)priv);
|
||||
imxrt_dmach_start(priv->txdma, imxrt_dma_txcallback, priv);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -950,7 +950,7 @@ static void imxrt_receive(struct imxrt_dev_s *priv)
|
||||
{
|
||||
/* Transfer any trailing fractional word */
|
||||
|
||||
uint8_t *ptr = (uint8_t *) priv->buffer;
|
||||
uint8_t *ptr = (uint8_t *)priv->buffer;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < priv->remaining; i++)
|
||||
@ -2244,7 +2244,8 @@ static int imxrt_recvsetup(struct sdio_dev_s *dev, uint8_t *buffer,
|
||||
* handler and DMA memory invalidation.
|
||||
*/
|
||||
|
||||
priv->buffer = (uint32_t *) buffer; priv->remaining = nbytes;
|
||||
priv->buffer = (uint32_t *)buffer;
|
||||
priv->remaining = nbytes;
|
||||
|
||||
/* Then set up the SDIO data path */
|
||||
|
||||
@ -2292,7 +2293,8 @@ static int imxrt_sendsetup(struct sdio_dev_s *dev,
|
||||
|
||||
/* Save the source buffer information for use by the interrupt handler */
|
||||
|
||||
priv->buffer = (uint32_t *) buffer; priv->remaining = nbytes;
|
||||
priv->buffer = (uint32_t *)buffer;
|
||||
priv->remaining = nbytes;
|
||||
|
||||
/* Then set up the SDIO data path */
|
||||
|
||||
@ -3039,7 +3041,7 @@ static int imxrt_dmasendsetup(struct sdio_dev_s *dev,
|
||||
|
||||
# endif
|
||||
#endif
|
||||
priv->buffer = (uint32_t *) buffer;
|
||||
priv->buffer = (uint32_t *)buffer;
|
||||
priv->remaining = buflen;
|
||||
|
||||
/* Then set up the SDIO data path */
|
||||
|
@ -4042,10 +4042,6 @@ static int kinetis_epalloc(struct usbhost_driver_s *drvr,
|
||||
epinfo->xfrtype = epdesc->xfrtype;
|
||||
epinfo->speed = hport->speed;
|
||||
|
||||
/* The iocsem semaphore is used for signaling and, hence, should not have
|
||||
* priority inheritance enabled.
|
||||
*/
|
||||
|
||||
nxsem_init(&epinfo->iocsem, 0, 0);
|
||||
|
||||
/* Success.. return an opaque reference to the endpoint information
|
||||
@ -5052,19 +5048,19 @@ struct usbhost_connection_s *kinetis_ehci_initialize(int controller)
|
||||
/* Sanity checks */
|
||||
|
||||
DEBUGASSERT(controller == 0);
|
||||
DEBUGASSERT(((uintptr_t) & g_asynchead & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t)&g_asynchead & 0x1f) == 0);
|
||||
DEBUGASSERT((sizeof(struct kinetis_qh_s) & 0x1f) == 0);
|
||||
DEBUGASSERT((sizeof(struct kinetis_qtd_s) & 0x1f) == 0);
|
||||
|
||||
# ifdef CONFIG_KINETIS_EHCI_PREALLOCATE
|
||||
DEBUGASSERT(((uintptr_t) & g_qhpool & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t) & g_qtdpool & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t)&g_qhpool & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t)&g_qtdpool & 0x1f) == 0);
|
||||
# endif
|
||||
|
||||
# ifndef CONFIG_USBHOST_INT_DISABLE
|
||||
DEBUGASSERT(((uintptr_t) & g_intrhead & 0x1f) == 0);
|
||||
DEBUGASSERT(((uintptr_t)&g_intrhead & 0x1f) == 0);
|
||||
# ifdef CONFIG_KINETIS_EHCI_PREALLOCATE
|
||||
DEBUGASSERT(((uintptr_t) g_framelist & 0xfff) == 0);
|
||||
DEBUGASSERT(((uintptr_t)g_framelist & 0xfff) == 0);
|
||||
# endif
|
||||
# endif /* CONFIG_USBHOST_INT_DISABLE */
|
||||
|
||||
@ -5300,7 +5296,7 @@ struct usbhost_connection_s *kinetis_ehci_initialize(int controller)
|
||||
|
||||
/* Attach the periodic QH to Period Frame List */
|
||||
|
||||
physaddr = kinetis_physramaddr((uintptr_t) & g_intrhead);
|
||||
physaddr = kinetis_physramaddr((uintptr_t)&g_intrhead);
|
||||
for (i = 0; i < FRAME_LIST_SIZE; i++)
|
||||
{
|
||||
g_framelist[i] = kinetis_swap32(physaddr) | PFL_TYP_QH;
|
||||
|
@ -123,7 +123,7 @@ static struct kl_spidev_s g_spi0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops
|
||||
},
|
||||
.spibase = KL_SPI0_BASE,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
@ -156,7 +156,7 @@ static struct kl_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops
|
||||
},
|
||||
.spibase = KL_SPI1_BASE,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
|
@ -306,7 +306,7 @@ static void dma_done(DMA_HANDLE handle, void *arg, int result)
|
||||
test_done = 1;
|
||||
}
|
||||
|
||||
void lc823450_dma_test()
|
||||
void lc823450_dma_test(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 256; i++)
|
||||
|
@ -815,7 +815,6 @@ int lc823450_mtd_uninitialize(uint32_t devno)
|
||||
DEBUGASSERT(ret == OK);
|
||||
|
||||
nxmutex_destroy(&priv->lock);
|
||||
|
||||
kmm_free(g_mtdmaster[ch]);
|
||||
|
||||
g_mtdmaster[ch] = NULL;
|
||||
|
@ -82,7 +82,7 @@
|
||||
static mutex_t _sdc_lock[2] =
|
||||
{
|
||||
NXMUTEX_INITIALIZER,
|
||||
NXMUTEX_INITIALIZER
|
||||
NXMUTEX_INITIALIZER,
|
||||
};
|
||||
|
||||
static struct sddrcfg_s _sdch0;
|
||||
|
@ -168,7 +168,6 @@ struct up_dev_s
|
||||
DMA_HANDLE hrxdma;
|
||||
DMA_HANDLE htxdma;
|
||||
sem_t rxdma_wait;
|
||||
sem_t rxpkt_wait;
|
||||
sem_t txdma_wait;
|
||||
#endif /* CONFIG_HSUART */
|
||||
spinlock_t lock;
|
||||
@ -1112,7 +1111,7 @@ static void uart_rxdma_callback(DMA_HANDLE hdma, void *arg, int result)
|
||||
* Name: up_hs_dmasetup
|
||||
****************************************************************************/
|
||||
|
||||
static void up_hs_dmasetup()
|
||||
static void up_hs_dmasetup(void)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
|
@ -128,7 +128,7 @@ static struct lc823450_spidev_s g_spidev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spiops
|
||||
.ops = &g_spiops
|
||||
},
|
||||
#ifndef CONFIG_SPI_OWNBUS
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
|
@ -560,7 +560,7 @@ static struct usbdev_req_s *lc823450_epallocreq(struct usbdev_ep_s *ep)
|
||||
usbtrace(TRACE_EPALLOCREQ, ((struct lc823450_ep_s *)ep)->epphy);
|
||||
|
||||
privreq = (struct lc823450_req_s *)
|
||||
kmm_malloc(sizeof(struct lc823450_req_s));
|
||||
kmm_zalloc(sizeof(struct lc823450_req_s));
|
||||
|
||||
if (!privreq)
|
||||
{
|
||||
@ -568,7 +568,6 @@ static struct usbdev_req_s *lc823450_epallocreq(struct usbdev_ep_s *ep)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(privreq, 0, sizeof(struct lc823450_req_s));
|
||||
return &privreq->req;
|
||||
}
|
||||
|
||||
@ -1710,7 +1709,7 @@ int usbdev_unregister(struct usbdevclass_driver_s *driver)
|
||||
* Name: usbdev_msc_read_enter
|
||||
****************************************************************************/
|
||||
|
||||
void usbdev_msc_read_enter()
|
||||
void usbdev_msc_read_enter(void)
|
||||
{
|
||||
struct lc823450_ep_s *privep;
|
||||
# ifdef CONFIG_DVFS
|
||||
@ -1727,7 +1726,7 @@ void usbdev_msc_read_enter()
|
||||
* Name: usbdev_msc_read_exit
|
||||
****************************************************************************/
|
||||
|
||||
void usbdev_msc_read_exit()
|
||||
void usbdev_msc_read_exit(void)
|
||||
{
|
||||
struct lc823450_ep_s *privep;
|
||||
|
||||
|
@ -139,7 +139,7 @@ static void lpc17_40_stopnext(struct lpc17_40_i2cdev_s *priv);
|
||||
static int lpc17_40_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int lpc17_40_i2c_reset(struct i2c_master_s * dev);
|
||||
static int lpc17_40_i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -505,7 +505,7 @@ static int lpc17_40_i2c_interrupt(int irq, void *context, void *arg)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int lpc17_40_i2c_reset(struct i2c_master_s * dev)
|
||||
static int lpc17_40_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
@ -651,9 +651,9 @@ struct i2c_master_s *lpc17_40_i2cbus_initialize(int port)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lpc17_40_i2cbus_uninitialize(struct i2c_master_s * dev)
|
||||
int lpc17_40_i2cbus_uninitialize(struct i2c_master_s *dev)
|
||||
{
|
||||
struct lpc17_40_i2cdev_s *priv = (struct lpc17_40_i2cdev_s *) dev;
|
||||
struct lpc17_40_i2cdev_s *priv = (struct lpc17_40_i2cdev_s *)dev;
|
||||
|
||||
/* Disable I2C */
|
||||
|
||||
|
@ -140,7 +140,7 @@ static struct lpc17_40_spidev_s g_spidev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spiops
|
||||
.ops = &g_spiops,
|
||||
},
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
};
|
||||
|
@ -178,7 +178,7 @@ static struct lpc17_40_sspdev_s g_ssp0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops,
|
||||
},
|
||||
.sspbase = LPC17_40_SSP0_BASE,
|
||||
#ifdef CONFIG_LPC17_40_SSP_INTERRUPTS
|
||||
@ -214,7 +214,7 @@ static struct lpc17_40_sspdev_s g_ssp1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.sspbase = LPC17_40_SSP1_BASE,
|
||||
#ifdef CONFIG_LPC17_40_SSP_INTERRUPTS
|
||||
@ -250,7 +250,7 @@ static struct lpc17_40_sspdev_s g_ssp2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.sspbase = LPC17_40_SSP2_BASE,
|
||||
#ifdef CONFIG_LPC17_40_SSP_INTERRUPTS
|
||||
|
@ -145,7 +145,7 @@ static void lpc2378_stopnext(struct lpc2378_i2cdev_s *priv);
|
||||
static int lpc2378_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int lpc2378_i2c_reset(struct i2c_master_s * dev);
|
||||
static int lpc2378_i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -457,7 +457,7 @@ static int lpc2378_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int lpc2378_i2c_reset(struct i2c_master_s * dev)
|
||||
static int lpc2378_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
@ -614,9 +614,9 @@ struct i2c_master_s *lpc2378_i2cbus_initialize(int port)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lpc2378_i2cbus_uninitialize(struct i2c_master_s * dev)
|
||||
int lpc2378_i2cbus_uninitialize(struct i2c_master_s *dev)
|
||||
{
|
||||
struct lpc2378_i2cdev_s *priv = (struct lpc2378_i2cdev_s *) dev;
|
||||
struct lpc2378_i2cdev_s *priv = (struct lpc2378_i2cdev_s *)dev;
|
||||
|
||||
/* Disable I2C */
|
||||
|
||||
|
@ -159,7 +159,7 @@ static struct lpc23xx_spidev_s g_spidev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spiops
|
||||
.ops = &g_spiops,
|
||||
},
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
};
|
||||
|
@ -115,7 +115,7 @@ static void i2c_setfrequency(struct lpc31_i2cdev_s *priv,
|
||||
static int i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int i2c_reset(struct i2c_master_s * dev);
|
||||
static int i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -418,7 +418,7 @@ out:
|
||||
|
||||
static void i2c_timeout(wdparm_t arg)
|
||||
{
|
||||
struct lpc31_i2cdev_s *priv = (struct lpc31_i2cdev_s *) arg;
|
||||
struct lpc31_i2cdev_s *priv = (struct lpc31_i2cdev_s *)arg;
|
||||
|
||||
irqstate_t flags = enter_critical_section();
|
||||
|
||||
@ -478,7 +478,7 @@ static void i2c_hwreset(struct lpc31_i2cdev_s *priv)
|
||||
static int i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count)
|
||||
{
|
||||
struct lpc31_i2cdev_s *priv = (struct lpc31_i2cdev_s *) dev;
|
||||
struct lpc31_i2cdev_s *priv = (struct lpc31_i2cdev_s *)dev;
|
||||
irqstate_t flags;
|
||||
int ret;
|
||||
|
||||
@ -539,7 +539,7 @@ static int i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int i2c_reset(struct i2c_master_s * dev)
|
||||
static int i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ static struct lpc31_spidev_s g_spidev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spiops
|
||||
.ops = &g_spiops,
|
||||
},
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
};
|
||||
@ -489,7 +489,7 @@ static int spi_lock(struct spi_dev_s *dev, bool lock)
|
||||
static void spi_select(struct spi_dev_s *dev, uint32_t devid,
|
||||
bool selected)
|
||||
{
|
||||
struct lpc31_spidev_s *priv = (struct lpc31_spidev_s *) dev;
|
||||
struct lpc31_spidev_s *priv = (struct lpc31_spidev_s *)dev;
|
||||
uint8_t slave = 0;
|
||||
|
||||
/* FIXME: map the devid to the SPI slave - this should really
|
||||
|
@ -145,7 +145,7 @@ static void lpc43_i2c_setfrequency(struct lpc43_i2cdev_s *priv,
|
||||
static int lpc43_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int lpc43_i2c_reset(struct i2c_master_s * dev);
|
||||
static int lpc43_i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -436,7 +436,7 @@ static int lpc43_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int lpc43_i2c_reset(struct i2c_master_s * dev)
|
||||
static int lpc43_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
@ -558,9 +558,9 @@ struct i2c_master_s *lpc43_i2cbus_initialize(int port)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lpc43_i2cbus_uninitialize(struct i2c_master_s * dev)
|
||||
int lpc43_i2cbus_uninitialize(struct i2c_master_s *dev)
|
||||
{
|
||||
struct lpc43_i2cdev_s *priv = (struct lpc43_i2cdev_s *) dev;
|
||||
struct lpc43_i2cdev_s *priv = (struct lpc43_i2cdev_s *)dev;
|
||||
|
||||
putreg32(I2C_CONCLRT_I2ENC, priv->base + LPC43_I2C_CONCLR_OFFSET);
|
||||
up_disable_irq(priv->irqid);
|
||||
|
@ -131,7 +131,7 @@ static struct lpc43_spidev_s g_spidev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spiops
|
||||
.ops = &g_spiops,
|
||||
},
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
};
|
||||
|
@ -145,7 +145,7 @@ static struct lpc43_sspdev_s g_ssp0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops,
|
||||
},
|
||||
.sspbase = LPC43_SSP0_BASE,
|
||||
.sspbasefreq = BOARD_SSP0_BASEFREQ,
|
||||
@ -186,7 +186,7 @@ static struct lpc43_sspdev_s g_ssp1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.sspbase = LPC43_SSP1_BASE,
|
||||
.sspbasefreq = BOARD_SSP1_BASEFREQ,
|
||||
|
@ -169,7 +169,7 @@ static int lpc54_i2c_poll(struct lpc54_i2cdev_s *priv);
|
||||
static int lpc54_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int lpc54_i2c_reset(struct i2c_master_s * dev);
|
||||
static int lpc54_i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -878,7 +878,7 @@ static int lpc54_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int lpc54_i2c_reset(struct i2c_master_s * dev)
|
||||
static int lpc54_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
#warning Missing logic
|
||||
return OK;
|
||||
@ -1302,9 +1302,9 @@ struct i2c_master_s *lpc54_i2cbus_initialize(int port)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int lpc54_i2cbus_uninitialize(struct i2c_master_s * dev)
|
||||
int lpc54_i2cbus_uninitialize(struct i2c_master_s *dev)
|
||||
{
|
||||
struct lpc54_i2cdev_s *priv = (struct lpc54_i2cdev_s *) dev;
|
||||
struct lpc54_i2cdev_s *priv = (struct lpc54_i2cdev_s *)dev;
|
||||
uint32_t regval;
|
||||
|
||||
/* Disable I2C interrupts */
|
||||
|
@ -233,7 +233,7 @@ static struct max326_spidev_s g_spi0dev =
|
||||
{
|
||||
.dev =
|
||||
{
|
||||
&g_sp0iops
|
||||
.ops = &g_sp0iops,
|
||||
},
|
||||
.base = MAX326_SPI0_BASE,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
|
@ -145,7 +145,7 @@ static int nrf52_rng_initialize(void)
|
||||
|
||||
static int nrf52_rng_irqhandler(int irq, void *context, void *arg)
|
||||
{
|
||||
struct rng_dev_s *priv = (struct rng_dev_s *) &g_rngdev;
|
||||
struct rng_dev_s *priv = (struct rng_dev_s *)&g_rngdev;
|
||||
uint8_t *addr;
|
||||
|
||||
if (getreg32(NRF52_RNG_EVENTS_RDY) == RNG_INT_RDY)
|
||||
@ -200,7 +200,7 @@ static ssize_t nrf52_rng_read(struct file *filep, char *buffer,
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
priv->rd_buf = (uint8_t *) buffer;
|
||||
priv->rd_buf = (uint8_t *)buffer;
|
||||
priv->buflen = buflen;
|
||||
priv->rd_count = 0;
|
||||
|
||||
|
@ -198,7 +198,7 @@ static struct nrf52_spidev_s g_spi0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops,
|
||||
},
|
||||
|
||||
.base = NRF52_SPIM0_BASE,
|
||||
@ -251,7 +251,7 @@ static struct nrf52_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
|
||||
.base = NRF52_SPIM1_BASE,
|
||||
@ -304,7 +304,7 @@ static struct nrf52_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
|
||||
.base = NRF52_SPIM2_BASE,
|
||||
@ -357,7 +357,7 @@ static struct nrf52_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
|
||||
.base = NRF52_SPIM3_BASE,
|
||||
|
@ -68,8 +68,8 @@
|
||||
#define FLASH_BLOCK_ERASE_CMD 0x20
|
||||
#define BOOT_2_SIZE 256
|
||||
|
||||
#define FLASH_START_OFFSET (rp2040_smart_flash_start - (uint8_t *) XIP_BASE)
|
||||
#define FLASH_END_OFFSET (rp2040_smart_flash_end - (uint8_t *) XIP_BASE)
|
||||
#define FLASH_START_OFFSET (rp2040_smart_flash_start - (uint8_t *)XIP_BASE)
|
||||
#define FLASH_END_OFFSET (rp2040_smart_flash_end - (uint8_t *)XIP_BASE)
|
||||
#define FLASH_START_READ (rp2040_smart_flash_start + 0x03000000)
|
||||
|
||||
/* Note: There is some ambiguity in terminology when it comes to flash.
|
||||
@ -247,7 +247,7 @@ static int rp2040_flash_erase(struct mtd_dev_s *dev,
|
||||
off_t startblock,
|
||||
size_t nblocks)
|
||||
{
|
||||
rp2040_flash_dev_t *rp_dev = (rp2040_flash_dev_t *) dev;
|
||||
rp2040_flash_dev_t *rp_dev = (rp2040_flash_dev_t *)dev;
|
||||
irqstate_t flags;
|
||||
int ret = OK;
|
||||
|
||||
@ -293,7 +293,7 @@ static ssize_t rp2040_flash_block_read(struct mtd_dev_s *dev,
|
||||
size_t nblocks,
|
||||
uint8_t *buffer)
|
||||
{
|
||||
rp2040_flash_dev_t *rp_dev = (rp2040_flash_dev_t *) dev;
|
||||
rp2040_flash_dev_t *rp_dev = (rp2040_flash_dev_t *)dev;
|
||||
int start;
|
||||
int length;
|
||||
int ret = OK;
|
||||
@ -336,7 +336,7 @@ static ssize_t rp2040_flash_block_write(struct mtd_dev_s *dev,
|
||||
size_t nblocks,
|
||||
const uint8_t *buffer)
|
||||
{
|
||||
rp2040_flash_dev_t *rp_dev = (rp2040_flash_dev_t *) dev;
|
||||
rp2040_flash_dev_t *rp_dev = (rp2040_flash_dev_t *)dev;
|
||||
irqstate_t flags;
|
||||
int ret;
|
||||
|
||||
@ -443,7 +443,7 @@ static int rp2040_flash_ioctl(struct mtd_dev_s *dev,
|
||||
int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
rp2040_flash_dev_t *rp_dev = (rp2040_flash_dev_t *) dev;
|
||||
rp2040_flash_dev_t *rp_dev = (rp2040_flash_dev_t *)dev;
|
||||
int ret = OK;
|
||||
|
||||
UNUSED(rp_dev);
|
||||
@ -452,7 +452,7 @@ static int rp2040_flash_ioctl(struct mtd_dev_s *dev,
|
||||
{
|
||||
case MTDIOC_GEOMETRY:
|
||||
{
|
||||
struct mtd_geometry_s *geo = (struct mtd_geometry_s *) arg;
|
||||
struct mtd_geometry_s *geo = (struct mtd_geometry_s *)arg;
|
||||
|
||||
if (geo != NULL)
|
||||
{
|
||||
@ -525,7 +525,7 @@ struct mtd_dev_s *rp2040_flash_mtd_initialize(void)
|
||||
* the rom until after this call completes.
|
||||
*/
|
||||
|
||||
memcpy(my_dev.boot_2, (void *) XIP_BASE, BOOT_2_SIZE);
|
||||
memcpy(my_dev.boot_2, (void *)XIP_BASE, BOOT_2_SIZE);
|
||||
rom_functions.flash_enable_xip = (flash_enable_xip_f)my_dev.boot_2 + 1;
|
||||
|
||||
/* Do we need to initialize the flash? */
|
||||
|
@ -1095,7 +1095,7 @@ static int rp2040_i2s_ioctl(struct i2s_dev_s *dev, int cmd,
|
||||
{
|
||||
i2sinfo("AUDIOIOC_ALLOCBUFFER\n");
|
||||
|
||||
bufdesc = (struct audio_buf_desc_s *) arg;
|
||||
bufdesc = (struct audio_buf_desc_s *)arg;
|
||||
ret = apb_alloc(bufdesc);
|
||||
}
|
||||
break;
|
||||
@ -1109,7 +1109,7 @@ static int rp2040_i2s_ioctl(struct i2s_dev_s *dev, int cmd,
|
||||
{
|
||||
i2sinfo("AUDIOIOC_FREEBUFFER\n");
|
||||
|
||||
bufdesc = (struct audio_buf_desc_s *) arg;
|
||||
bufdesc = (struct audio_buf_desc_s *)arg;
|
||||
DEBUGASSERT(bufdesc->u.buffer != NULL);
|
||||
apb_free(bufdesc->u.buffer);
|
||||
ret = sizeof(struct audio_buf_desc_s);
|
||||
|
@ -178,7 +178,7 @@ static struct rp2040_spidev_s g_spi0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops,
|
||||
},
|
||||
.spibase = RP2040_SPI0_BASE,
|
||||
.spibasefreq = 0,
|
||||
@ -227,7 +227,7 @@ static struct rp2040_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.spibase = RP2040_SPI1_BASE,
|
||||
.spibasefreq = 0,
|
||||
@ -874,7 +874,6 @@ struct spi_dev_s *rp2040_spibus_initialize(int port)
|
||||
/* Set a initialized flag */
|
||||
|
||||
priv->initialized = 1;
|
||||
|
||||
return &priv->spidev;
|
||||
}
|
||||
|
||||
|
@ -1776,8 +1776,8 @@ static int s32k1xx_lpi2c_dma_transfer(struct s32k1xx_lpi2c_priv_s *priv)
|
||||
LPI2C_MIER_NDIE | LPI2C_MIER_ALIE |
|
||||
LPI2C_MIER_PLTIE | LPI2C_MIER_FEIE);
|
||||
|
||||
s32k1xx_dmach_start(priv->rxdma, s32k1xx_rxdma_callback, (void *)priv);
|
||||
s32k1xx_dmach_start(priv->txdma, s32k1xx_txdma_callback, (void *)priv);
|
||||
s32k1xx_dmach_start(priv->rxdma, s32k1xx_rxdma_callback, priv);
|
||||
s32k1xx_dmach_start(priv->txdma, s32k1xx_txdma_callback, priv);
|
||||
|
||||
s32k1xx_lpi2c_modifyreg(priv, S32K1XX_LPI2C_MDER_OFFSET, 0,
|
||||
LPI2C_MDER_TDDE | LPI2C_MDER_RDDE);
|
||||
|
@ -255,7 +255,7 @@ static struct s32k1xx_lpspidev_s g_lpspi0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops,
|
||||
},
|
||||
.spibase = S32K1XX_LPSPI0_BASE,
|
||||
#ifdef CONFIG_S32K1XX_LPSPI_INTERRUPTS
|
||||
@ -306,7 +306,7 @@ static struct s32k1xx_lpspidev_s g_lpspi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.spibase = S32K1XX_LPSPI1_BASE,
|
||||
#ifdef CONFIG_S32K1XX_LPSPI_INTERRUPTS
|
||||
@ -357,7 +357,7 @@ static struct s32k1xx_lpspidev_s g_lpspi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.spibase = S32K1XX_LPSPI2_BASE,
|
||||
#ifdef CONFIG_S32K1XX_LPSPI_INTERRUPTS
|
||||
@ -1369,8 +1369,8 @@ static void s32k1xx_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
* take care of big endian mode of hardware !!
|
||||
*/
|
||||
|
||||
const uint8_t *src = (const uint8_t *)txbuffer;
|
||||
uint8_t *dest = (uint8_t *) rxbuffer;
|
||||
const uint8_t *src = txbuffer;
|
||||
uint8_t *dest = rxbuffer;
|
||||
uint32_t word = 0x0;
|
||||
#ifdef CONFIG_S32K1XX_LPSPI_DWORD
|
||||
uint32_t word1 = 0x0;
|
||||
@ -1447,8 +1447,8 @@ static void s32k1xx_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
{
|
||||
/* 32-bit or 64 bit, word size memory transfers */
|
||||
|
||||
const uint32_t *src = (const uint32_t *)txbuffer;
|
||||
uint32_t *dest = (uint32_t *) rxbuffer;
|
||||
const uint32_t *src = txbuffer;
|
||||
uint32_t *dest = rxbuffer;
|
||||
uint32_t word = 0x0;
|
||||
#ifdef CONFIG_S32K1XX_LPSPI_DWORD
|
||||
uint32_t word1 = 0x0;
|
||||
@ -1528,8 +1528,8 @@ static void s32k1xx_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
{
|
||||
/* 16-bit mode */
|
||||
|
||||
const uint16_t *src = (const uint16_t *)txbuffer;
|
||||
uint16_t *dest = (uint16_t *) rxbuffer;
|
||||
const uint16_t *src = txbuffer;
|
||||
uint16_t *dest = rxbuffer;
|
||||
uint16_t word;
|
||||
|
||||
while (nwords-- > 0)
|
||||
@ -1563,8 +1563,8 @@ static void s32k1xx_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
{
|
||||
/* 8-bit mode */
|
||||
|
||||
const uint8_t *src = (const uint8_t *)txbuffer;
|
||||
uint8_t *dest = (uint8_t *) rxbuffer;
|
||||
const uint8_t *src = txbuffer;
|
||||
uint8_t *dest = rxbuffer;
|
||||
uint8_t word;
|
||||
|
||||
while (nwords-- > 0)
|
||||
|
@ -246,7 +246,7 @@ static struct s32k3xx_lpspidev_s g_lpspi0dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi0ops
|
||||
.ops = &g_spi0ops,
|
||||
},
|
||||
.spibase = S32K3XX_LPSPI0_BASE,
|
||||
#ifdef CONFIG_S32K3XX_LPSPI_INTERRUPTS
|
||||
@ -296,7 +296,7 @@ static struct s32k3xx_lpspidev_s g_lpspi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.spibase = S32K3XX_LPSPI1_BASE,
|
||||
#ifdef CONFIG_S32K3XX_LPSPI_INTERRUPTS
|
||||
@ -346,7 +346,7 @@ static struct s32k3xx_lpspidev_s g_lpspi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.spibase = S32K3XX_LPSPI2_BASE,
|
||||
#ifdef CONFIG_S32K3XX_LPSPI_INTERRUPTS
|
||||
@ -396,7 +396,7 @@ static struct s32k3xx_lpspidev_s g_lpspi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
.spibase = S32K3XX_LPSPI3_BASE,
|
||||
#ifdef CONFIG_S32K3XX_LPSPI_INTERRUPTS
|
||||
@ -446,7 +446,7 @@ static struct s32k3xx_lpspidev_s g_lpspi4dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi4ops
|
||||
.ops = &g_spi4ops,
|
||||
},
|
||||
.spibase = S32K3XX_LPSPI4_BASE,
|
||||
#ifdef CONFIG_S32K3XX_LPSPI_INTERRUPTS
|
||||
@ -496,7 +496,7 @@ static struct s32k3xx_lpspidev_s g_lpspi5dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi5ops
|
||||
.ops = &g_spi5ops,
|
||||
},
|
||||
.spibase = S32K3XX_LPSPI5_BASE,
|
||||
#ifdef CONFIG_S32K3XX_LPSPI_INTERRUPTS
|
||||
@ -1535,8 +1535,8 @@ static void s32k3xx_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
* take care of big endian mode of hardware !!
|
||||
*/
|
||||
|
||||
const uint8_t *src = (const uint8_t *)txbuffer;
|
||||
uint8_t *dest = (uint8_t *) rxbuffer;
|
||||
const uint8_t *src = txbuffer;
|
||||
uint8_t *dest = rxbuffer;
|
||||
uint32_t word = 0x0;
|
||||
#ifdef CONFIG_S32K3XX_LPSPI_DWORD
|
||||
uint32_t word1 = 0x0;
|
||||
@ -1613,8 +1613,8 @@ static void s32k3xx_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
{
|
||||
/* 32-bit or 64 bit, word size memory transfers */
|
||||
|
||||
const uint32_t *src = (const uint32_t *)txbuffer;
|
||||
uint32_t *dest = (uint32_t *) rxbuffer;
|
||||
const uint32_t *src = txbuffer;
|
||||
uint32_t *dest = rxbuffer;
|
||||
uint32_t word = 0x0;
|
||||
#ifdef CONFIG_S32K3XX_LPSPI_DWORD
|
||||
uint32_t word1 = 0x0;
|
||||
@ -1694,8 +1694,8 @@ static void s32k3xx_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
{
|
||||
/* 16-bit mode */
|
||||
|
||||
const uint16_t *src = (const uint16_t *)txbuffer;
|
||||
uint16_t *dest = (uint16_t *) rxbuffer;
|
||||
const uint16_t *src = txbuffer;
|
||||
uint16_t *dest = rxbuffer;
|
||||
uint16_t word;
|
||||
|
||||
while (nwords-- > 0)
|
||||
@ -1729,8 +1729,8 @@ static void s32k3xx_lpspi_exchange_nodma(struct spi_dev_s *dev,
|
||||
{
|
||||
/* 8-bit mode */
|
||||
|
||||
const uint8_t *src = (const uint8_t *)txbuffer;
|
||||
uint8_t *dest = (uint8_t *) rxbuffer;
|
||||
const uint8_t *src = txbuffer;
|
||||
uint8_t *dest = rxbuffer;
|
||||
uint8_t word;
|
||||
|
||||
while (nwords-- > 0)
|
||||
|
@ -174,7 +174,7 @@ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg);
|
||||
static int twi_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int twi_reset(struct i2c_master_s * dev);
|
||||
static int twi_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/* Initialization */
|
||||
@ -747,7 +747,7 @@ static int twi_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int twi_reset(struct i2c_master_s * dev)
|
||||
static int twi_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
@ -982,9 +982,9 @@ struct i2c_master_s *sam_i2cbus_initialize(int bus)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int sam_i2cbus_uninitialize(struct i2c_master_s * dev)
|
||||
int sam_i2cbus_uninitialize(struct i2c_master_s *dev)
|
||||
{
|
||||
struct twi_dev_s *priv = (struct twi_dev_s *) dev;
|
||||
struct twi_dev_s *priv = (struct twi_dev_s *)dev;
|
||||
|
||||
i2cinfo("TWI%d Un-initializing\n", priv->twi);
|
||||
|
||||
|
@ -1111,7 +1111,7 @@ static void sam_receive(struct sam_dev_s *priv)
|
||||
{
|
||||
/* Transfer any trailing fractional word */
|
||||
|
||||
uint8_t *ptr = (uint8_t *) priv->buffer;
|
||||
uint8_t *ptr = (uint8_t *)priv->buffer;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < priv->remaining; i++)
|
||||
@ -1873,7 +1873,7 @@ static void sam_frequency(struct sdio_dev_s *dev, uint32_t frequency)
|
||||
|
||||
static void sam_clock(struct sdio_dev_s *dev, enum sdio_clock_e rate)
|
||||
{
|
||||
struct sam_dev_s *priv = (struct sam_dev_s *) dev;
|
||||
struct sam_dev_s *priv = (struct sam_dev_s *)dev;
|
||||
uint32_t regval;
|
||||
int wait_microseconds = 0;
|
||||
|
||||
@ -2354,7 +2354,7 @@ static int sam_recvsetup(struct sdio_dev_s *dev, uint8_t *buffer,
|
||||
* handler and DMA memory invalidation.
|
||||
*/
|
||||
|
||||
priv->buffer = (uint32_t *) buffer;
|
||||
priv->buffer = (uint32_t *)buffer;
|
||||
priv->remaining = nbytes;
|
||||
|
||||
/* Then set up the SDIO data path */
|
||||
@ -2408,7 +2408,8 @@ static int sam_sendsetup(struct sdio_dev_s *dev,
|
||||
|
||||
/* Save the source buffer information for use by the interrupt handler */
|
||||
|
||||
priv->buffer = (uint32_t *) buffer; priv->remaining = nbytes;
|
||||
priv->buffer = (uint32_t *)buffer;
|
||||
priv->remaining = nbytes;
|
||||
|
||||
/* Then set up the SDIO data path */
|
||||
|
||||
@ -3052,7 +3053,7 @@ static int sam_dmarecvsetup(struct sdio_dev_s *dev,
|
||||
* handler
|
||||
*/
|
||||
|
||||
priv->buffer = (uint32_t *) buffer;
|
||||
priv->buffer = (uint32_t *)buffer;
|
||||
priv->remaining = buflen;
|
||||
priv->bufferend = (uint32_t *)(buffer + buflen);
|
||||
|
||||
@ -3122,7 +3123,7 @@ static int sam_dmasendsetup(struct sdio_dev_s *dev,
|
||||
|
||||
/* Save the source buffer information for use by the interrupt handler */
|
||||
|
||||
priv->buffer = (uint32_t *) buffer;
|
||||
priv->buffer = (uint32_t *)buffer;
|
||||
priv->remaining = buflen;
|
||||
priv->bufferend = (uint32_t *)(buffer + buflen);
|
||||
|
||||
@ -3610,8 +3611,8 @@ struct sdio_dev_s *sam_sdmmc_sdio_initialize(int slotno)
|
||||
sam_configpio(PIO_SDMMC0_CK);
|
||||
sam_configpio(PIO_SDMMC0_CMD);
|
||||
|
||||
# if ( defined(CONFIG_SAMA5_SDMMC0_WIDTH_D1_D4) || \
|
||||
defined(CONFIG_SAMA5_SDMMC0_WIDTH_D1_D8) )
|
||||
# if (defined(CONFIG_SAMA5_SDMMC0_WIDTH_D1_D4) || \
|
||||
defined(CONFIG_SAMA5_SDMMC0_WIDTH_D1_D8))
|
||||
sam_configpio(PIO_SDMMC0_DAT1);
|
||||
sam_configpio(PIO_SDMMC0_DAT2);
|
||||
sam_configpio(PIO_SDMMC0_DAT3);
|
||||
|
@ -217,7 +217,7 @@ static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg);
|
||||
static int twi_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int twi_reset(struct i2c_master_s * dev);
|
||||
static int twi_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/* Initialization */
|
||||
@ -1289,7 +1289,7 @@ errout_with_lock:
|
||||
|
||||
int sam_i2cbus_uninitialize(struct i2c_master_s *dev)
|
||||
{
|
||||
struct twi_dev_s *priv = (struct twi_dev_s *) dev;
|
||||
struct twi_dev_s *priv = (struct twi_dev_s *)dev;
|
||||
|
||||
i2cinfo("TWI%d Un-initializing\n", priv->attr->twi);
|
||||
|
||||
|
@ -1174,8 +1174,8 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
||||
|
||||
/* Start RX and TX DMA channels */
|
||||
|
||||
sam_dmastart(priv->dma_tx, spi_dma_callback, (void *)priv);
|
||||
sam_dmastart(priv->dma_rx, spi_dma_callback, (void *)priv);
|
||||
sam_dmastart(priv->dma_tx, spi_dma_callback, priv);
|
||||
sam_dmastart(priv->dma_rx, spi_dma_callback, priv);
|
||||
|
||||
/* Enable SPI to trigger the TX DMA channel */
|
||||
|
||||
|
@ -1270,8 +1270,8 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
||||
|
||||
/* Start RX and TX DMA channels */
|
||||
|
||||
sam_dmastart(priv->dma_tx, spi_dma_callback, (void *)priv);
|
||||
sam_dmastart(priv->dma_rx, spi_dma_callback, (void *)priv);
|
||||
sam_dmastart(priv->dma_tx, spi_dma_callback, priv);
|
||||
sam_dmastart(priv->dma_rx, spi_dma_callback, priv);
|
||||
|
||||
/* Enable SPI to trigger the TX DMA channel */
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ static uint32_t g_mcan0_msgram[MCAN0_MSGRAM_WORDS]
|
||||
|
||||
/* Constant configuration */
|
||||
|
||||
static struct sam_config_s g_mcan0const =
|
||||
static const struct sam_config_s g_mcan0const =
|
||||
{
|
||||
.rxpinset = GPIO_MCAN0_RX,
|
||||
.txpinset = GPIO_MCAN0_TX,
|
||||
@ -1104,7 +1104,7 @@ static uint32_t g_mcan1_msgram[MCAN1_MSGRAM_WORDS]
|
||||
|
||||
/* MCAN1 constant configuration */
|
||||
|
||||
static struct sam_config_s g_mcan1const =
|
||||
static const struct sam_config_s g_mcan1const =
|
||||
{
|
||||
.rxpinset = GPIO_MCAN1_RX,
|
||||
.txpinset = GPIO_MCAN1_TX,
|
||||
|
@ -856,7 +856,7 @@ static int qspi_memory_dma(struct sam_qspidev_s *priv,
|
||||
/* Start the DMA */
|
||||
|
||||
priv->result = -EBUSY;
|
||||
ret = sam_dmastart(priv->dmach, qspi_dma_callback, (void *)priv);
|
||||
ret = sam_dmastart(priv->dmach, qspi_dma_callback, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
spierr("ERROR: sam_dmastart failed: %d\n", ret);
|
||||
|
@ -217,7 +217,7 @@ static int twi_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int twi_reset_internal(struct i2c_master_s *dev);
|
||||
static int twi_reset(struct i2c_master_s * dev);
|
||||
static int twi_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
|
||||
/* Initialization */
|
||||
@ -1461,7 +1461,7 @@ errout_with_lock:
|
||||
|
||||
int sam_i2cbus_uninitialize(struct i2c_master_s *dev)
|
||||
{
|
||||
struct twi_dev_s *priv = (struct twi_dev_s *) dev;
|
||||
struct twi_dev_s *priv = (struct twi_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
|
@ -189,7 +189,7 @@ static const struct sam_pidmap_s g_xdmac_txchan[] =
|
||||
|
||||
/* This array describes the available link list descriptors */
|
||||
|
||||
struct chnext_view1_s g_lldesc[CONFIG_SAMV7_NLLDESC];
|
||||
static struct chnext_view1_s g_lldesc[CONFIG_SAMV7_NLLDESC];
|
||||
|
||||
/* This array describes the state of each XDMAC channel 0 */
|
||||
|
||||
|
@ -1348,7 +1348,7 @@ static int adc_timinit(struct stm32_dev_s *priv)
|
||||
* 0 <= prescaler <= 65536
|
||||
* 1 <= reload <= 65535
|
||||
*
|
||||
* So ( prescaler = pclck / 65535 / freq ) would be optimal.
|
||||
* So (prescaler = pclck / 65535 / freq) would be optimal.
|
||||
*/
|
||||
|
||||
prescaler = (priv->pclck / priv->freq + 65534) / 65535;
|
||||
|
@ -110,7 +110,6 @@ struct stm32_dma2d_s
|
||||
#ifdef CONFIG_STM32_FB_CMAP
|
||||
uint32_t *clut; /* Color lookup table */
|
||||
#endif
|
||||
|
||||
mutex_t *lock; /* Ensure mutually exclusive access */
|
||||
};
|
||||
|
||||
@ -683,7 +682,7 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
|
||||
#ifdef CONFIG_STM32_FB_CMAP
|
||||
if (fmt == DMA2D_PF_L8)
|
||||
{
|
||||
struct stm32_dma2d_s * layer = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *layer = &g_dma2ddev;
|
||||
|
||||
/* Load CLUT automatically */
|
||||
|
||||
@ -747,7 +746,7 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
|
||||
static int stm32_dma2d_setclut(const struct fb_cmap_s *cmap)
|
||||
{
|
||||
int n;
|
||||
struct stm32_dma2d_s * priv = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *priv = &g_dma2ddev;
|
||||
|
||||
lcdinfo("cmap=%p\n", cmap);
|
||||
|
||||
@ -816,7 +815,7 @@ static int stm32_dma2d_fillcolor(struct stm32_dma2d_overlay_s *oinfo,
|
||||
uint32_t argb)
|
||||
{
|
||||
int ret;
|
||||
struct stm32_dma2d_s * priv = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *priv = &g_dma2ddev;
|
||||
DEBUGASSERT(oinfo != NULL && oinfo->oinfo != NULL && area != NULL);
|
||||
|
||||
lcdinfo("oinfo=%p, argb=%08" PRIx32 "\n", oinfo, argb);
|
||||
@ -899,7 +898,7 @@ static int stm32_dma2d_blit(struct stm32_dma2d_overlay_s *doverlay,
|
||||
{
|
||||
int ret;
|
||||
uint32_t mode;
|
||||
struct stm32_dma2d_s * priv = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *priv = &g_dma2ddev;
|
||||
|
||||
lcdinfo("doverlay=%p, destxpos=%" PRId32 ", destypos=%" PRId32
|
||||
", soverlay=%p, sarea=%p\n",
|
||||
@ -998,7 +997,7 @@ static int stm32_dma2d_blend(struct stm32_dma2d_overlay_s *doverlay,
|
||||
const struct fb_area_s *barea)
|
||||
{
|
||||
int ret;
|
||||
struct stm32_dma2d_s * priv = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *priv = &g_dma2ddev;
|
||||
|
||||
lcdinfo("doverlay=%p, destxpos=%" PRId32 ", destypos=%" PRId32 ", "
|
||||
"foverlay=%p, forexpos=%" PRId32 ", foreypos=%" PRId32 ", "
|
||||
|
@ -382,7 +382,7 @@ static const struct hciuart_config_s g_hciusart1_config =
|
||||
.rxbuffer = g_usart1_rxbuffer,
|
||||
.txbuffer = g_usart1_txbuffer,
|
||||
#ifdef CONFIG_STM32_HCIUART1_RXDMA
|
||||
.rxdmabuffer = ,
|
||||
.rxdmabuffer = g_usart1_rxdmabuffer,
|
||||
#endif
|
||||
.rxbufsize = CONFIG_STM32_HCIUART1_RXBUFSIZE,
|
||||
.txbufsize = CONFIG_STM32_HCIUART1_TXBUFSIZE,
|
||||
|
@ -10,7 +10,7 @@
|
||||
* Copyright (C) 2011-2014, 2016-2017 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Copyright( C) 2014 Patrizio Simona. All rights reserved.
|
||||
* Copyright (C) 2014 Patrizio Simona. All rights reserved.
|
||||
* Author: Patrizio Simona <psimona@ethz.ch>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -2233,7 +2233,7 @@ static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev)
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv = (struct stm32_i2c_priv_s *)dev;
|
||||
unsigned int clock_count;
|
||||
|
@ -473,7 +473,7 @@ static inline void stm32_i2c_sendstart(struct stm32_i2c_priv_s *priv);
|
||||
static inline void stm32_i2c_sendstop(struct stm32_i2c_priv_s *priv);
|
||||
static inline
|
||||
uint32_t stm32_i2c_getstatus(struct stm32_i2c_priv_s *priv);
|
||||
static int stm32_i2c_isr_process(struct stm32_i2c_priv_s * priv);
|
||||
static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv);
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
static int stm32_i2c_isr(int irq, void *context, void *arg);
|
||||
#endif
|
||||
@ -485,7 +485,7 @@ static int stm32_i2c_process(struct i2c_master_s *dev,
|
||||
static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev);
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
#ifdef CONFIG_PM
|
||||
static int stm32_i2c_pm_prepare(struct pm_callback_s *cb, int domain,
|
||||
@ -2468,11 +2468,18 @@ static int stm32_i2c_process(struct i2c_master_s *dev,
|
||||
static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv;
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Get I2C private structure */
|
||||
|
||||
priv = ((struct stm32_i2c_inst_s *)dev)->priv;
|
||||
|
||||
/* Ensure that address or flags don't change meanwhile */
|
||||
|
||||
ret = nxmutex_lock(&((struct stm32_i2c_inst_s *)dev)->priv->lock);
|
||||
ret = nxmutex_lock(&priv->lock);
|
||||
if (ret >= 0)
|
||||
{
|
||||
ret = stm32_i2c_process(dev, msgs, count);
|
||||
@ -2490,7 +2497,7 @@ static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev)
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv;
|
||||
unsigned int clock_count;
|
||||
|
@ -682,7 +682,7 @@ static int stm32_ltdc_reload(uint8_t value, bool waitvblank);
|
||||
static void stm32_ltdc_lpixelformat(struct stm32_ltdc_s *layer);
|
||||
static void stm32_ltdc_lframebuffer(struct stm32_ltdc_s *layer);
|
||||
static void stm32_ltdc_lenable(struct stm32_ltdc_s *layer, bool enable);
|
||||
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s * layer,
|
||||
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s *layer,
|
||||
uint32_t rgb);
|
||||
static void stm32_ltdc_ltransp(struct stm32_ltdc_s *layer,
|
||||
uint8_t transp,
|
||||
@ -703,9 +703,9 @@ static bool stm32_ltdc_lvalidate(const struct stm32_ltdc_s *layer,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_FB_CMAP
|
||||
static void stm32_ltdc_lputclut(struct stm32_ltdc_s * layer,
|
||||
static void stm32_ltdc_lputclut(struct stm32_ltdc_s *layer,
|
||||
const struct fb_cmap_s *cmap);
|
||||
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s * layer,
|
||||
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s *layer,
|
||||
struct fb_cmap_s *cmap);
|
||||
static void stm32_ltdc_lclutenable(struct stm32_ltdc_s *layer,
|
||||
bool enable);
|
||||
@ -1339,7 +1339,7 @@ static void stm32_ltdc_periphconfig(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s * layer,
|
||||
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s *layer,
|
||||
uint32_t rgb)
|
||||
{
|
||||
DEBUGASSERT(layer->layerno < LTDC_NLAYERS);
|
||||
@ -2079,8 +2079,8 @@ static void stm32_ltdc_lputclut(struct stm32_ltdc_s *layer,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s * layer,
|
||||
struct fb_cmap_s * cmap)
|
||||
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s *layer,
|
||||
struct fb_cmap_s *cmap)
|
||||
{
|
||||
int n;
|
||||
struct fb_cmap_s *priv_cmap = &g_vtable.cmap;
|
||||
@ -2401,7 +2401,7 @@ static int stm32_getcmap(struct fb_vtable_s *vtable,
|
||||
* from the main overlay.
|
||||
*/
|
||||
|
||||
struct stm32_ltdc_s * layer;
|
||||
struct stm32_ltdc_s *layer;
|
||||
# ifdef CONFIG_STM32_LTDC_L2
|
||||
layer = &priv->layer[LTDC_LAYER_L2];
|
||||
# else
|
||||
@ -2488,7 +2488,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
|
||||
|
||||
for (n = 0; n < LTDC_NLAYERS; n++)
|
||||
{
|
||||
struct stm32_ltdc_s * layer = &priv->layer[n];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[n];
|
||||
stm32_ltdc_lputclut(layer, priv_cmap);
|
||||
}
|
||||
|
||||
@ -2545,7 +2545,7 @@ static int stm32_getoverlayinfo(struct fb_vtable_s *vtable,
|
||||
|
||||
if (overlayno < LTDC_NOVERLAYS)
|
||||
{
|
||||
struct stm32_ltdc_s * layer = &priv->layer[overlayno];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[overlayno];
|
||||
memcpy(oinfo, &layer->oinfo, sizeof(struct fb_overlayinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@ -2577,7 +2577,7 @@ static int stm32_settransp(struct fb_vtable_s *vtable,
|
||||
|
||||
if (oinfo->overlay < LTDC_NOVERLAYS)
|
||||
{
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
|
||||
nxmutex_lock(layer->lock);
|
||||
layer->oinfo.transp.transp = oinfo->transp.transp;
|
||||
@ -2628,7 +2628,7 @@ static int stm32_setchromakey(struct fb_vtable_s *vtable,
|
||||
if (oinfo->overlay < LTDC_NLAYERS)
|
||||
{
|
||||
int ret;
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
|
||||
# ifndef CONFIG_STM32_LTDC_L1_CHROMAKEY
|
||||
if (oinfo->overlay == LTDC_LAYER_L1)
|
||||
@ -2703,8 +2703,8 @@ static int stm32_setcolor(struct fb_vtable_s *vtable,
|
||||
int ret;
|
||||
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)
|
||||
vtable;
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct fb_overlayinfo_s * poverlay = layer->dma2dinfo.oinfo;
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
struct fb_overlayinfo_s *poverlay = layer->dma2dinfo.oinfo;
|
||||
|
||||
DEBUGASSERT(&layer->oinfo == poverlay);
|
||||
|
||||
@ -2743,7 +2743,7 @@ static int stm32_setblank(struct fb_vtable_s *vtable,
|
||||
|
||||
if (oinfo->overlay < LTDC_NLAYERS)
|
||||
{
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
|
||||
nxmutex_lock(layer->lock);
|
||||
layer->oinfo.blank = oinfo->blank;
|
||||
@ -2794,7 +2794,7 @@ static int stm32_setarea(struct fb_vtable_s *vtable,
|
||||
{
|
||||
struct stm32_ltdcdev_s *priv = (struct stm32_ltdcdev_s *)
|
||||
vtable;
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
|
||||
nxmutex_lock(layer->lock);
|
||||
memcpy(&layer->oinfo.sarea, &oinfo->sarea, sizeof(struct fb_area_s));
|
||||
|
@ -350,7 +350,7 @@ static struct stm32_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp1iops
|
||||
.ops = &g_sp1iops
|
||||
},
|
||||
.spibase = STM32_SPI1_BASE,
|
||||
.spiclock = STM32_PCLK2_FREQUENCY,
|
||||
@ -361,7 +361,7 @@ static struct stm32_spidev_s g_spi1dev =
|
||||
# ifdef CONFIG_STM32_SPI1_DMA
|
||||
.rxch = DMACHAN_SPI1_RX,
|
||||
.txch = DMACHAN_SPI1_TX,
|
||||
#if defined(SPI1_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI1_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi1_rxbuf,
|
||||
.txbuf = g_spi1_txbuf,
|
||||
.buflen = SPI1_DMABUFSIZE_ADJUSTED,
|
||||
@ -418,7 +418,7 @@ static struct stm32_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp2iops
|
||||
.ops = &g_sp2iops
|
||||
},
|
||||
.spibase = STM32_SPI2_BASE,
|
||||
.spiclock = STM32_PCLK1_FREQUENCY,
|
||||
@ -429,7 +429,7 @@ static struct stm32_spidev_s g_spi2dev =
|
||||
# ifdef CONFIG_STM32_SPI2_DMA
|
||||
.rxch = DMACHAN_SPI2_RX,
|
||||
.txch = DMACHAN_SPI2_TX,
|
||||
#if defined(SPI2_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI2_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi2_rxbuf,
|
||||
.txbuf = g_spi2_txbuf,
|
||||
.buflen = SPI2_DMABUFSIZE_ADJUSTED,
|
||||
@ -486,7 +486,7 @@ static struct stm32_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp3iops
|
||||
.ops = &g_sp3iops
|
||||
},
|
||||
.spibase = STM32_SPI3_BASE,
|
||||
.spiclock = STM32_PCLK1_FREQUENCY,
|
||||
@ -497,7 +497,7 @@ static struct stm32_spidev_s g_spi3dev =
|
||||
# ifdef CONFIG_STM32_SPI3_DMA
|
||||
.rxch = DMACHAN_SPI3_RX,
|
||||
.txch = DMACHAN_SPI3_TX,
|
||||
#if defined(SPI3_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI3_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi3_rxbuf,
|
||||
.txbuf = g_spi3_txbuf,
|
||||
.buflen = SPI3_DMABUFSIZE_ADJUSTED,
|
||||
@ -554,7 +554,7 @@ static struct stm32_spidev_s g_spi4dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp4iops
|
||||
.ops = &g_sp4iops
|
||||
},
|
||||
.spibase = STM32_SPI4_BASE,
|
||||
.spiclock = STM32_PCLK2_FREQUENCY,
|
||||
@ -565,7 +565,7 @@ static struct stm32_spidev_s g_spi4dev =
|
||||
# ifdef CONFIG_STM32_SPI4_DMA
|
||||
.rxch = DMACHAN_SPI4_RX,
|
||||
.txch = DMACHAN_SPI4_TX,
|
||||
#if defined(SPI4_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI4_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi4_rxbuf,
|
||||
.txbuf = g_spi4_txbuf,
|
||||
.buflen = SPI4_DMABUFSIZE_ADJUSTED,
|
||||
@ -622,7 +622,7 @@ static struct stm32_spidev_s g_spi5dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp5iops
|
||||
.ops = &g_sp5iops
|
||||
},
|
||||
.spibase = STM32_SPI5_BASE,
|
||||
.spiclock = STM32_PCLK2_FREQUENCY,
|
||||
@ -633,7 +633,7 @@ static struct stm32_spidev_s g_spi5dev =
|
||||
# ifdef CONFIG_STM32_SPI5_DMA
|
||||
.rxch = DMACHAN_SPI5_RX,
|
||||
.txch = DMACHAN_SPI5_TX,
|
||||
#if defined(SPI5_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI5_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi5_rxbuf,
|
||||
.txbuf = g_spi5_txbuf,
|
||||
.buflen = SPI5_DMABUFSIZE_ADJUSTED,
|
||||
@ -690,7 +690,7 @@ static struct stm32_spidev_s g_spi6dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp6iops
|
||||
.ops = &g_sp6iops
|
||||
},
|
||||
.spibase = STM32_SPI6_BASE,
|
||||
.spiclock = STM32_PCLK2_FREQUENCY,
|
||||
@ -701,7 +701,7 @@ static struct stm32_spidev_s g_spi6dev =
|
||||
# ifdef CONFIG_STM32_SPI6_DMA
|
||||
.rxch = DMACHAN_SPI6_RX,
|
||||
.txch = DMACHAN_SPI6_TX,
|
||||
#if defined(SPI6_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI6_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi6_rxbuf,
|
||||
.txbuf = g_spi6_txbuf,
|
||||
.buflen = SPI6_DMABUFSIZE_ADJUSTED,
|
||||
|
@ -474,7 +474,7 @@ static inline void stm32_i2c_sendstart(struct stm32_i2c_priv_s *priv);
|
||||
static inline void stm32_i2c_sendstop(struct stm32_i2c_priv_s *priv);
|
||||
static inline
|
||||
uint32_t stm32_i2c_getstatus(struct stm32_i2c_priv_s *priv);
|
||||
static int stm32_i2c_isr_process(struct stm32_i2c_priv_s * priv);
|
||||
static int stm32_i2c_isr_process(struct stm32_i2c_priv_s *priv);
|
||||
#ifndef CONFIG_I2C_POLLED
|
||||
static int stm32_i2c_isr(int irq, void *context, void *arg);
|
||||
#endif
|
||||
@ -486,7 +486,7 @@ static int stm32_i2c_process(struct i2c_master_s *dev,
|
||||
static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev);
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
#ifdef CONFIG_PM
|
||||
static int stm32_i2c_pm_prepare(struct pm_callback_s *cb,
|
||||
@ -2464,11 +2464,18 @@ static int stm32_i2c_process(struct i2c_master_s *dev,
|
||||
static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv;
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Get I2C private structure */
|
||||
|
||||
priv = ((struct stm32_i2c_inst_s *)dev)->priv;
|
||||
|
||||
/* Ensure that address or flags don't change meanwhile */
|
||||
|
||||
ret = nxmutex_lock(&((struct stm32_i2c_inst_s *)dev)->priv->lock);
|
||||
ret = nxmutex_lock(&priv->lock);
|
||||
if (ret >= 0)
|
||||
{
|
||||
ret = stm32_i2c_process(dev, msgs, count);
|
||||
@ -2486,7 +2493,7 @@ static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev)
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv;
|
||||
unsigned int clock_count;
|
||||
|
@ -313,7 +313,7 @@ static struct stm32_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.spibase = STM32_SPI1_BASE,
|
||||
.spiclock = SPI1_PCLK_FREQUENCY,
|
||||
@ -372,7 +372,7 @@ static struct stm32_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.spibase = STM32_SPI2_BASE,
|
||||
.spiclock = SPI1_PCLK_FREQUENCY,
|
||||
@ -429,7 +429,7 @@ static struct stm32_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
.spibase = STM32_SPI3_BASE,
|
||||
.spiclock = SPI1_PCLK_FREQUENCY,
|
||||
|
@ -307,7 +307,7 @@ static void adc_enable(struct stm32_dev_s *priv, bool enable);
|
||||
static uint32_t adc_sqrbits(struct stm32_dev_s *priv, int first,
|
||||
int last, int offset);
|
||||
static int adc_set_ch(struct adc_dev_s *dev, uint8_t ch);
|
||||
static bool adc_internal(struct stm32_dev_s * priv);
|
||||
static bool adc_internal(struct stm32_dev_s *priv);
|
||||
|
||||
static int adc_resolution_set(struct adc_dev_s *dev, uint8_t res);
|
||||
|
||||
@ -930,7 +930,7 @@ static int adc_timinit(struct stm32_dev_s *priv)
|
||||
* 0 <= prescaler <= 65536
|
||||
* 1 <= reload <= 65535
|
||||
*
|
||||
* So ( prescaler = pclck / 65535 / freq ) would be optimal.
|
||||
* So (prescaler = pclck / 65535 / freq) would be optimal.
|
||||
*/
|
||||
|
||||
prescaler = (priv->pclck / priv->freq + 65534) / 65535;
|
||||
@ -2158,7 +2158,7 @@ static uint32_t adc_sqrbits(struct stm32_dev_s *priv, int first,
|
||||
* Name: adc_internal
|
||||
****************************************************************************/
|
||||
|
||||
static bool adc_internal(struct stm32_dev_s * priv)
|
||||
static bool adc_internal(struct stm32_dev_s *priv)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -681,7 +681,7 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
|
||||
#ifdef CONFIG_STM32F7_FB_CMAP
|
||||
if (fmt == DMA2D_PF_L8)
|
||||
{
|
||||
struct stm32_dma2d_s * layer = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *layer = &g_dma2ddev;
|
||||
|
||||
/* Load CLUT automatically */
|
||||
|
||||
@ -745,7 +745,7 @@ static void stm32_dma2d_lpfc(int lid, uint32_t blendmode, uint8_t alpha,
|
||||
static int stm32_dma2d_setclut(const struct fb_cmap_s *cmap)
|
||||
{
|
||||
int n;
|
||||
struct stm32_dma2d_s * priv = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *priv = &g_dma2ddev;
|
||||
|
||||
lcdinfo("cmap=%p\n", cmap);
|
||||
|
||||
@ -814,7 +814,7 @@ static int stm32_dma2d_fillcolor(struct stm32_dma2d_overlay_s *oinfo,
|
||||
uint32_t argb)
|
||||
{
|
||||
int ret;
|
||||
struct stm32_dma2d_s * priv = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *priv = &g_dma2ddev;
|
||||
DEBUGASSERT(oinfo != NULL && oinfo->oinfo != NULL && area != NULL);
|
||||
|
||||
lcdinfo("oinfo=%p, argb=%08x\n", oinfo, argb);
|
||||
@ -897,7 +897,7 @@ static int stm32_dma2d_blit(struct stm32_dma2d_overlay_s *doverlay,
|
||||
{
|
||||
int ret;
|
||||
uint32_t mode;
|
||||
struct stm32_dma2d_s * priv = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *priv = &g_dma2ddev;
|
||||
|
||||
lcdinfo("doverlay=%p, destxpos=%d, destypos=%d, soverlay=%p, sarea=%p\n",
|
||||
doverlay, destxpos, destypos, soverlay, sarea);
|
||||
@ -995,7 +995,7 @@ static int stm32_dma2d_blend(struct stm32_dma2d_overlay_s *doverlay,
|
||||
const struct fb_area_s *barea)
|
||||
{
|
||||
int ret;
|
||||
struct stm32_dma2d_s * priv = &g_dma2ddev;
|
||||
struct stm32_dma2d_s *priv = &g_dma2ddev;
|
||||
|
||||
lcdinfo("doverlay=%p, destxpos=%d, destypos=%d, "
|
||||
"foverlay=%p, forexpos=%d, foreypos=%d, "
|
||||
|
@ -522,7 +522,7 @@ static int stm32_i2c_process(struct i2c_master_s *dev,
|
||||
static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev);
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
#ifdef CONFIG_PM
|
||||
static int stm32_i2c_pm_prepare(struct pm_callback_s *cb, int domain,
|
||||
@ -2505,11 +2505,18 @@ static int stm32_i2c_process(struct i2c_master_s *dev,
|
||||
static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv;
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Get I2C private structure */
|
||||
|
||||
priv = ((struct stm32_i2c_inst_s *)dev)->priv;
|
||||
|
||||
/* Ensure that address or flags don't change meanwhile */
|
||||
|
||||
ret = nxmutex_lock(&((struct stm32_i2c_inst_s *)dev)->priv->lock);
|
||||
ret = nxmutex_lock(&priv->lock);
|
||||
if (ret >= 0)
|
||||
{
|
||||
ret = stm32_i2c_process(dev, msgs, count);
|
||||
@ -2527,7 +2534,7 @@ static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev)
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv;
|
||||
unsigned int clock_count;
|
||||
|
@ -683,7 +683,7 @@ static int stm32_ltdc_reload(uint8_t value, bool waitvblank);
|
||||
static void stm32_ltdc_lpixelformat(struct stm32_ltdc_s *layer);
|
||||
static void stm32_ltdc_lframebuffer(struct stm32_ltdc_s *layer);
|
||||
static void stm32_ltdc_lenable(struct stm32_ltdc_s *layer, bool enable);
|
||||
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s * layer,
|
||||
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s *layer,
|
||||
uint32_t rgb);
|
||||
static void stm32_ltdc_ltransp(struct stm32_ltdc_s *layer,
|
||||
uint8_t transp,
|
||||
@ -704,9 +704,9 @@ static bool stm32_ltdc_lvalidate(const struct stm32_ltdc_s *layer,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32F7_FB_CMAP
|
||||
static void stm32_ltdc_lputclut(struct stm32_ltdc_s * layer,
|
||||
static void stm32_ltdc_lputclut(struct stm32_ltdc_s *layer,
|
||||
const struct fb_cmap_s *cmap);
|
||||
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s * layer,
|
||||
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s *layer,
|
||||
struct fb_cmap_s *cmap);
|
||||
static void stm32_ltdc_lclutenable(struct stm32_ltdc_s *layer,
|
||||
bool enable);
|
||||
@ -1342,7 +1342,7 @@ static void stm32_ltdc_periphconfig(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s * layer,
|
||||
static void stm32_ltdc_ldefaultcolor(struct stm32_ltdc_s *layer,
|
||||
uint32_t rgb)
|
||||
{
|
||||
DEBUGASSERT(layer->layerno < LTDC_NLAYERS);
|
||||
@ -2081,8 +2081,8 @@ static void stm32_ltdc_lputclut(struct stm32_ltdc_s *layer,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s * layer,
|
||||
struct fb_cmap_s * cmap)
|
||||
static void stm32_ltdc_lgetclut(struct stm32_ltdc_s *layer,
|
||||
struct fb_cmap_s *cmap)
|
||||
{
|
||||
int n;
|
||||
struct fb_cmap_s *priv_cmap = &g_vtable.cmap;
|
||||
@ -2403,7 +2403,7 @@ static int stm32_getcmap(struct fb_vtable_s *vtable,
|
||||
* from the main overlay.
|
||||
*/
|
||||
|
||||
struct stm32_ltdc_s * layer;
|
||||
struct stm32_ltdc_s *layer;
|
||||
# ifdef CONFIG_STM32F7_LTDC_L2
|
||||
layer = &priv->layer[LTDC_LAYER_L2];
|
||||
# else
|
||||
@ -2490,7 +2490,7 @@ static int stm32_putcmap(struct fb_vtable_s *vtable,
|
||||
|
||||
for (n = 0; n < LTDC_NLAYERS; n++)
|
||||
{
|
||||
struct stm32_ltdc_s * layer = &priv->layer[n];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[n];
|
||||
stm32_ltdc_lputclut(layer, priv_cmap);
|
||||
}
|
||||
|
||||
@ -2547,7 +2547,7 @@ static int stm32_getoverlayinfo(struct fb_vtable_s *vtable,
|
||||
|
||||
if (overlayno < LTDC_NOVERLAYS)
|
||||
{
|
||||
struct stm32_ltdc_s * layer = &priv->layer[overlayno];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[overlayno];
|
||||
memcpy(oinfo, &layer->oinfo, sizeof(struct fb_overlayinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@ -2579,7 +2579,7 @@ static int stm32_settransp(struct fb_vtable_s *vtable,
|
||||
|
||||
if (oinfo->overlay < LTDC_NOVERLAYS)
|
||||
{
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
|
||||
nxmutex_lock(layer->lock);
|
||||
layer->oinfo.transp.transp = oinfo->transp.transp;
|
||||
@ -2630,7 +2630,7 @@ static int stm32_setchromakey(struct fb_vtable_s *vtable,
|
||||
if (oinfo->overlay < LTDC_NLAYERS)
|
||||
{
|
||||
int ret;
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
|
||||
# ifndef CONFIG_STM32F7_LTDC_L1_CHROMAKEY
|
||||
if (oinfo->overlay == LTDC_LAYER_L1)
|
||||
@ -2703,8 +2703,8 @@ static int stm32_setcolor(struct fb_vtable_s *vtable,
|
||||
int ret;
|
||||
struct stm32_ltdcdev_s *priv =
|
||||
(struct stm32_ltdcdev_s *)vtable;
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct fb_overlayinfo_s * poverlay = layer->dma2dinfo.oinfo;
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
struct fb_overlayinfo_s *poverlay = layer->dma2dinfo.oinfo;
|
||||
|
||||
DEBUGASSERT(&layer->oinfo == poverlay);
|
||||
|
||||
@ -2742,7 +2742,7 @@ static int stm32_setblank(struct fb_vtable_s *vtable,
|
||||
|
||||
if (oinfo->overlay < LTDC_NLAYERS)
|
||||
{
|
||||
struct stm32_ltdc_s * layer = &priv->layer[oinfo->overlay];
|
||||
struct stm32_ltdc_s *layer = &priv->layer[oinfo->overlay];
|
||||
|
||||
nxmutex_lock(layer->lock);
|
||||
layer->oinfo.blank = oinfo->blank;
|
||||
@ -2793,7 +2793,7 @@ static int stm32_setarea(struct fb_vtable_s *vtable,
|
||||
{
|
||||
struct stm32_ltdcdev_s *priv =
|
||||
(struct stm32_ltdcdev_s *)vtable;
|
||||
struct stm32_ltdc_s * layer =
|
||||
struct stm32_ltdc_s *layer =
|
||||
&priv->layer[oinfo->overlay];
|
||||
|
||||
nxmutex_lock(layer->lock);
|
||||
|
@ -1598,7 +1598,7 @@ static int stm32_sdmmc_interrupt(int irq, void *context, void *arg)
|
||||
#ifdef HAVE_SDMMC_SDIO_MODE
|
||||
uint32_t mask;
|
||||
#endif
|
||||
struct stm32_dev_s *priv = (struct stm32_dev_s *) arg;
|
||||
struct stm32_dev_s *priv = (struct stm32_dev_s *)arg;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
|
@ -330,7 +330,7 @@ static struct stm32_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp1iops
|
||||
.ops = &g_sp1iops,
|
||||
},
|
||||
.spibase = STM32_SPI1_BASE,
|
||||
.spiclock = STM32_PCLK2_FREQUENCY,
|
||||
@ -341,7 +341,7 @@ static struct stm32_spidev_s g_spi1dev =
|
||||
# ifdef CONFIG_STM32F7_SPI1_DMA
|
||||
.rxch = DMAMAP_SPI1_RX,
|
||||
.txch = DMAMAP_SPI1_TX,
|
||||
#if defined(SPI1_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI1_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi1_rxbuf,
|
||||
.txbuf = g_spi1_txbuf,
|
||||
.buflen = SPI1_DMABUFSIZE_ADJUSTED,
|
||||
@ -401,7 +401,7 @@ static struct stm32_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp2iops
|
||||
.ops = &g_sp2iops,
|
||||
},
|
||||
.spibase = STM32_SPI2_BASE,
|
||||
.spiclock = STM32_PCLK1_FREQUENCY,
|
||||
@ -412,7 +412,7 @@ static struct stm32_spidev_s g_spi2dev =
|
||||
# ifdef CONFIG_STM32F7_SPI2_DMA
|
||||
.rxch = DMAMAP_SPI2_RX,
|
||||
.txch = DMAMAP_SPI2_TX,
|
||||
#if defined(SPI2_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI3_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi2_rxbuf,
|
||||
.txbuf = g_spi2_txbuf,
|
||||
.buflen = SPI2_DMABUFSIZE_ADJUSTED,
|
||||
@ -472,7 +472,7 @@ static struct stm32_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp3iops
|
||||
.ops = &g_sp3iops,
|
||||
},
|
||||
.spibase = STM32_SPI3_BASE,
|
||||
.spiclock = STM32_PCLK1_FREQUENCY,
|
||||
@ -483,7 +483,7 @@ static struct stm32_spidev_s g_spi3dev =
|
||||
# ifdef CONFIG_STM32F7_SPI3_DMA
|
||||
.rxch = DMAMAP_SPI3_RX,
|
||||
.txch = DMAMAP_SPI3_TX,
|
||||
#if defined(SPI3_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI3_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi3_rxbuf,
|
||||
.txbuf = g_spi3_txbuf,
|
||||
.buflen = SPI3_DMABUFSIZE_ADJUSTED,
|
||||
@ -543,7 +543,7 @@ static struct stm32_spidev_s g_spi4dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp4iops
|
||||
.ops = &g_sp4iops,
|
||||
},
|
||||
.spibase = STM32_SPI4_BASE,
|
||||
.spiclock = STM32_PCLK2_FREQUENCY,
|
||||
@ -554,7 +554,7 @@ static struct stm32_spidev_s g_spi4dev =
|
||||
# ifdef CONFIG_STM32F7_SPI4_DMA
|
||||
.rxch = DMAMAP_SPI4_RX,
|
||||
.txch = DMAMAP_SPI4_TX,
|
||||
#if defined(SPI4_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI4_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi4_rxbuf,
|
||||
.txbuf = g_spi4_txbuf,
|
||||
.buflen = SPI4_DMABUFSIZE_ADJUSTED,
|
||||
@ -614,7 +614,7 @@ static struct stm32_spidev_s g_spi5dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp5iops
|
||||
.ops = &g_sp5iops,
|
||||
},
|
||||
.spibase = STM32_SPI5_BASE,
|
||||
.spiclock = STM32_PCLK2_FREQUENCY,
|
||||
@ -625,7 +625,7 @@ static struct stm32_spidev_s g_spi5dev =
|
||||
# ifdef CONFIG_STM32F7_SPI5_DMA
|
||||
.rxch = DMAMAP_SPI5_RX,
|
||||
.txch = DMAMAP_SPI5_TX,
|
||||
#if defined(SPI5_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI5_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi5_rxbuf,
|
||||
.txbuf = g_spi5_txbuf,
|
||||
.buflen = SPI5_DMABUFSIZE_ADJUSTED,
|
||||
@ -685,7 +685,7 @@ static struct stm32_spidev_s g_spi6dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp6iops
|
||||
.ops = &g_sp6iops,
|
||||
},
|
||||
.spibase = STM32_SPI6_BASE,
|
||||
.spiclock = STM32_PCLK2_FREQUENCY,
|
||||
@ -696,7 +696,7 @@ static struct stm32_spidev_s g_spi6dev =
|
||||
# ifdef CONFIG_STM32F7_SPI6_DMA
|
||||
.rxch = DMAMAP_SPI6_RX,
|
||||
.txch = DMAMAP_SPI6_TX,
|
||||
#if defined(SPI6_DMABUFSIZE_ADJUSTED)
|
||||
# ifdef SPI6_DMABUFSIZE_ADJUSTED
|
||||
.rxbuf = g_spi6_rxbuf,
|
||||
.txbuf = g_spi6_txbuf,
|
||||
.buflen = SPI6_DMABUFSIZE_ADJUSTED,
|
||||
@ -1805,7 +1805,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
||||
void *rxbuffer, size_t nwords)
|
||||
{
|
||||
struct stm32_spidev_s *priv = (struct stm32_spidev_s *)dev;
|
||||
void * xbuffer = rxbuffer;
|
||||
void *xbuffer = rxbuffer;
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
@ -481,7 +481,7 @@ static int stm32_i2c_process(struct i2c_master_s *dev,
|
||||
static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count);
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev);
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev);
|
||||
#endif
|
||||
#ifdef CONFIG_PM
|
||||
static int stm32_i2c_pm_prepare(struct pm_callback_s *cb, int domain,
|
||||
@ -2469,11 +2469,18 @@ static int stm32_i2c_process(struct i2c_master_s *dev,
|
||||
static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s *msgs, int count)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv;
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Get I2C private structure */
|
||||
|
||||
priv = ((struct stm32_i2c_inst_s *)dev)->priv;
|
||||
|
||||
/* Ensure that address or flags don't change meanwhile */
|
||||
|
||||
ret = nxmutex_lock(&((struct stm32_i2c_inst_s *)dev)->priv->lock);
|
||||
ret = nxmutex_lock(&priv->lock);
|
||||
if (ret >= 0)
|
||||
{
|
||||
ret = stm32_i2c_process(dev, msgs, count);
|
||||
@ -2491,7 +2498,7 @@ static int stm32_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32_i2c_reset(struct i2c_master_s * dev)
|
||||
static int stm32_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
struct stm32_i2c_priv_s *priv;
|
||||
unsigned int clock_count;
|
||||
|
@ -2274,7 +2274,7 @@ static int up_dma_setup(struct uart_dev_s *dev)
|
||||
* worth of time to claim bytes before they are overwritten.
|
||||
*/
|
||||
|
||||
stm32_dmastart(priv->rxdma, up_dma_rxcallback, (void *)priv, true);
|
||||
stm32_dmastart(priv->rxdma, up_dma_rxcallback, priv, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -3253,7 +3253,7 @@ static void up_dma_reenable(struct up_dev_s *priv)
|
||||
* worth of time to claim bytes before they are overwritten.
|
||||
*/
|
||||
|
||||
stm32_dmastart(priv->rxdma, up_dma_rxcallback, (void *)priv, true);
|
||||
stm32_dmastart(priv->rxdma, up_dma_rxcallback, priv, true);
|
||||
|
||||
/* Clear DMA suspended flag. */
|
||||
|
||||
@ -3352,7 +3352,7 @@ static void up_dma_txcallback(DMA_HANDLE handle, uint8_t status, void *arg)
|
||||
/* Start transmission with the callback on DMA completion */
|
||||
|
||||
stm32_dmastart(priv->txdma, up_dma_txcallback,
|
||||
(void *)priv, false);
|
||||
priv, false);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -3438,7 +3438,7 @@ static void up_dma_send(struct uart_dev_s *dev)
|
||||
|
||||
/* Start transmission with the callback on DMA completion */
|
||||
|
||||
stm32_dmastart(priv->txdma, up_dma_txcallback, (void *)priv, false);
|
||||
stm32_dmastart(priv->txdma, up_dma_txcallback, priv, false);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -3481,7 +3481,7 @@ static void up_dma_txint(struct uart_dev_s *dev, bool enable)
|
||||
* Instead, we use DMA interrupts that are activated once during boot
|
||||
* sequence. Furthermore we can use up_dma_txcallback() to handle staff at
|
||||
* half DMA transfer or after transfer completion (depending configuration,
|
||||
* see stm32_dmastart(...) ).
|
||||
* see stm32_dmastart(...)).
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
@ -396,7 +396,7 @@ static struct stm32_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp1iops
|
||||
.ops = &g_sp1iops,
|
||||
},
|
||||
.spibase = STM32_SPI1_BASE,
|
||||
.spiclock = SPI123_KERNEL_CLOCK_FREQ,
|
||||
@ -468,7 +468,7 @@ static struct stm32_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp2iops
|
||||
.ops = &g_sp2iops,
|
||||
},
|
||||
.spibase = STM32_SPI2_BASE,
|
||||
.spiclock = SPI123_KERNEL_CLOCK_FREQ,
|
||||
@ -540,7 +540,7 @@ static struct stm32_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp3iops
|
||||
.ops = &g_sp3iops,
|
||||
},
|
||||
.spibase = STM32_SPI3_BASE,
|
||||
.spiclock = SPI123_KERNEL_CLOCK_FREQ,
|
||||
@ -612,7 +612,7 @@ static struct stm32_spidev_s g_spi4dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp4iops
|
||||
.ops = &g_sp4iops,
|
||||
},
|
||||
.spibase = STM32_SPI4_BASE,
|
||||
.spiclock = SPI45_KERNEL_CLOCK_FREQ,
|
||||
@ -684,7 +684,7 @@ static struct stm32_spidev_s g_spi5dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp5iops
|
||||
.ops = &g_sp5iops,
|
||||
},
|
||||
.spibase = STM32_SPI5_BASE,
|
||||
.spiclock = SPI45_KERNEL_CLOCK_FREQ,
|
||||
@ -757,7 +757,7 @@ static struct stm32_spidev_s g_spi6dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp6iops
|
||||
.ops = &g_sp6iops,
|
||||
},
|
||||
.spibase = STM32_SPI6_BASE,
|
||||
.spiclock = SPI6_KERNEL_CLOCK_FREQ,
|
||||
@ -765,7 +765,7 @@ static struct stm32_spidev_s g_spi6dev =
|
||||
#ifdef CONFIG_STM32H7_SPI6_DMA
|
||||
.rxch = DMAMAP_SPI6_RX,
|
||||
.txch = DMAMAP_SPI6_TX,
|
||||
#if defined(SPI6_DMABUFSIZE_ADJUSTED)
|
||||
# if defined(SPI6_DMABUFSIZE_ADJUSTED)
|
||||
.rxbuf = g_spi6_rxbuf,
|
||||
.txbuf = g_spi6_txbuf,
|
||||
.buflen = SPI6_DMABUFSIZE_ADJUSTED,
|
||||
@ -2053,7 +2053,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
||||
static uint8_t rxdummy[ARMV7M_DCACHE_LINESIZE]
|
||||
aligned_data(ARMV7M_DCACHE_LINESIZE);
|
||||
static const uint16_t txdummy = 0xffff;
|
||||
void * orig_rxbuffer = rxbuffer;
|
||||
void *orig_rxbuffer = rxbuffer;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
|
@ -2704,7 +2704,7 @@ static int stm32l4_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int stm32l4_i2c_reset(struct i2c_master_s * dev)
|
||||
static int stm32l4_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
struct stm32l4_i2c_priv_s *priv;
|
||||
unsigned int clock_count;
|
||||
|
@ -281,7 +281,7 @@ static struct stm32l4_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.spibase = STM32L4_SPI1_BASE,
|
||||
.spiclock = STM32L4_PCLK2_FREQUENCY,
|
||||
@ -339,7 +339,7 @@ static struct stm32l4_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.spibase = STM32L4_SPI2_BASE,
|
||||
.spiclock = STM32L4_PCLK1_FREQUENCY,
|
||||
@ -395,7 +395,7 @@ static struct stm32l4_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
.spibase = STM32L4_SPI3_BASE,
|
||||
.spiclock = STM32L4_PCLK1_FREQUENCY,
|
||||
|
@ -281,7 +281,7 @@ static struct stm32l5_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.spibase = STM32L5_SPI1_BASE,
|
||||
.spiclock = STM32L5_PCLK2_FREQUENCY,
|
||||
@ -339,7 +339,7 @@ static struct stm32l5_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.spibase = STM32L5_SPI2_BASE,
|
||||
.spiclock = STM32L5_PCLK1_FREQUENCY,
|
||||
@ -395,7 +395,7 @@ static struct stm32l5_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
.spibase = STM32L5_SPI3_BASE,
|
||||
.spiclock = STM32L5_PCLK1_FREQUENCY,
|
||||
|
@ -348,7 +348,7 @@ static struct stm32_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp1iops
|
||||
.ops = &g_sp1iops,
|
||||
},
|
||||
.spibase = STM32_SPI1_BASE,
|
||||
.spiclock = SPI1_KERNEL_CLOCK_FREQ,
|
||||
@ -420,7 +420,7 @@ static struct stm32_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp2iops
|
||||
.ops = &g_sp2iops,
|
||||
},
|
||||
.spibase = STM32_SPI2_BASE,
|
||||
.spiclock = SPI2_KERNEL_CLOCK_FREQ,
|
||||
@ -492,7 +492,7 @@ static struct stm32_spidev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp3iops
|
||||
.ops = &g_sp3iops,
|
||||
},
|
||||
.spibase = STM32_SPI3_BASE,
|
||||
.spiclock = SPI3_KERNEL_CLOCK_FREQ,
|
||||
@ -1786,7 +1786,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
||||
static uint8_t rxdummy[ARMV7M_DCACHE_LINESIZE]
|
||||
aligned_data(ARMV7M_DCACHE_LINESIZE);
|
||||
static const uint16_t txdummy = 0xffff;
|
||||
void * orig_rxbuffer = rxbuffer;
|
||||
void *orig_rxbuffer = rxbuffer;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
|
@ -277,7 +277,7 @@ static struct stm32wb_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.spibase = STM32WB_SPI1_BASE,
|
||||
.spiclock = STM32WB_PCLK2_FREQUENCY,
|
||||
@ -335,7 +335,7 @@ static struct stm32wb_spidev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.spibase = STM32WB_SPI2_BASE,
|
||||
.spiclock = STM32WB_PCLK1_FREQUENCY,
|
||||
|
@ -312,7 +312,7 @@ static struct stm32wl5_spidev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_sp1iops
|
||||
.ops = &g_sp1iops,
|
||||
},
|
||||
.spibase = STM32WL5_SPI1_BASE,
|
||||
.spiclock = STM32WL5_PCLK2_FREQUENCY,
|
||||
|
@ -248,7 +248,7 @@ static int tivacan_rxhandler(int argc, char** argv);
|
||||
int tivacan_handle_errors(struct can_dev_s *dev);
|
||||
|
||||
#ifdef CONFIG_CAN_ERRORS
|
||||
void tivacan_handle_errors_wqueue(void * dev);
|
||||
void tivacan_handle_errors_wqueue(void *dev);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -1379,7 +1379,7 @@ static bool tivacan_txempty(struct can_dev_s *dev)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_CAN_ERRORS
|
||||
void tivacan_handle_errors_wqueue(void * dev)
|
||||
void tivacan_handle_errors_wqueue(void *dev)
|
||||
{
|
||||
irqstate_t flags;
|
||||
struct tiva_canmod_s *canmod = ((struct can_dev_s *)dev)->cd_priv;
|
||||
@ -2042,7 +2042,7 @@ int tivacan_alloc_fifo(struct can_dev_s *dev, int depth)
|
||||
static void tivacan_free_fifo(struct can_dev_s *dev,
|
||||
tiva_can_fifo_t *fifo)
|
||||
{
|
||||
struct tiva_canmod_s * canmod = dev->cd_priv;
|
||||
struct tiva_canmod_s *canmod = dev->cd_priv;
|
||||
nxmutex_lock(&canmod->thd_iface_lock);
|
||||
|
||||
for (int i = 0; i < TIVA_CAN_NUM_MBOXES; ++i)
|
||||
|
@ -1743,7 +1743,7 @@ static int tiva_i2c_transfer(struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int tiva_i2c_reset(struct i2c_master_s * dev)
|
||||
static int tiva_i2c_reset(struct i2c_master_s *dev)
|
||||
{
|
||||
struct tiva_i2c_priv_s *priv = (struct tiva_i2c_priv_s *)dev;
|
||||
unsigned int clock_count;
|
||||
|
@ -1083,7 +1083,7 @@ static int UART_RAMCODE tlsr82_interrupt(int irq, void *context, void *arg)
|
||||
UNUSED(context);
|
||||
|
||||
struct uart_dev_s *dev = (struct uart_dev_s *)arg;
|
||||
uart_priv_t * priv = (uart_priv_t *)dev->priv;
|
||||
uart_priv_t *priv = (uart_priv_t *)dev->priv;
|
||||
|
||||
if ((UART_BUF_CNT1_REG & UART_BUF_CNT1_RX_ERR))
|
||||
{
|
||||
@ -1163,7 +1163,7 @@ static int UART_RAMCODE tlsr82_dma_interrupt(int irq, void *context,
|
||||
void *arg)
|
||||
{
|
||||
struct uart_dev_s *dev = (struct uart_dev_s *)arg;
|
||||
uart_priv_t * priv = (uart_priv_t *)dev->priv;
|
||||
uart_priv_t *priv = (uart_priv_t *)dev->priv;
|
||||
|
||||
/* Check the uart dma rx interrupt status */
|
||||
|
||||
@ -1503,7 +1503,7 @@ static void tlsr82_uart_dma_txint(struct uart_dev_s *dev, bool enable)
|
||||
* Instead, we use DMA interrupts that are activated once during boot
|
||||
* sequence. Furthermore we can use up_dma_txcallback() to handle staff at
|
||||
* half DMA transfer or after transfer completion (depending configuration,
|
||||
* see stm32_dmastart(...) ).
|
||||
* see stm32_dmastart(...)).
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
@ -106,7 +106,7 @@ static struct avr_spidev_s g_spidev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spiops
|
||||
.ops = &g_spiops,
|
||||
},
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
};
|
||||
|
@ -138,7 +138,7 @@ static struct pic32mx_dev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.base = PIC32MX_SPI1_K1BASE,
|
||||
#ifdef CONFIG_PIC32MX_SPI_INTERRUPTS
|
||||
@ -177,7 +177,7 @@ static struct pic32mx_dev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.base = PIC32MX_SPI2_K1BASE,
|
||||
#ifdef CONFIG_PIC32MX_SPI_INTERRUPTS
|
||||
@ -216,7 +216,7 @@ static struct pic32mx_dev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
.base = PIC32MX_SPI3_K1BASE,
|
||||
#ifdef CONFIG_PIC32MX_SPI_INTERRUPTS
|
||||
@ -255,7 +255,7 @@ static struct pic32mx_dev_s g_spi4dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi4ops
|
||||
.ops = &g_spi4ops,
|
||||
},
|
||||
.base = PIC32MX_SPI4_K1BASE,
|
||||
#ifdef CONFIG_PIC32MX_SPI_INTERRUPTS
|
||||
|
@ -281,7 +281,7 @@ static struct pic32mz_dev_s g_spi1dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi1ops
|
||||
.ops = &g_spi1ops,
|
||||
},
|
||||
.config = &g_spi1config,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
@ -334,7 +334,7 @@ static struct pic32mz_dev_s g_spi2dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi2ops
|
||||
.ops = &g_spi2ops,
|
||||
},
|
||||
.config = &g_spi2config,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
@ -387,7 +387,7 @@ static struct pic32mz_dev_s g_spi3dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi3ops
|
||||
.ops = &g_spi3ops,
|
||||
},
|
||||
.config = &g_spi3config,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
@ -440,7 +440,7 @@ static struct pic32mz_dev_s g_spi4dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi4ops
|
||||
.ops = &g_spi4ops,
|
||||
},
|
||||
.config = &g_spi4config,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
@ -493,7 +493,7 @@ static struct pic32mz_dev_s g_spi5dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi5ops
|
||||
.ops = &g_spi5ops,
|
||||
},
|
||||
.config = &g_spi5config,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
@ -546,7 +546,7 @@ static struct pic32mz_dev_s g_spi6dev =
|
||||
{
|
||||
.spidev =
|
||||
{
|
||||
&g_spi6ops
|
||||
.ops = &g_spi6ops,
|
||||
},
|
||||
.config = &g_spi6config,
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
@ -1752,7 +1752,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
||||
|
||||
priv->result = -EBUSY;
|
||||
|
||||
ret = pic32mz_dma_start(priv->rxdma, spi_dmarxcallback, (void *)priv);
|
||||
ret = pic32mz_dma_start(priv->rxdma, spi_dmarxcallback, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
spierr("ERROR: RX DMA start failed: %d\n", ret);
|
||||
@ -1761,7 +1761,7 @@ static void spi_exchange(struct spi_dev_s *dev, const void *txbuffer,
|
||||
|
||||
spi_rxdma_sample(priv, DMA_AFTER_START);
|
||||
|
||||
ret = pic32mz_dma_start(priv->txdma, spi_dmatxcallback, (void *)priv);
|
||||
ret = pic32mz_dma_start(priv->txdma, spi_dmatxcallback, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
spierr("ERROR: TX DMA start failed: %d\n", ret);
|
||||
|
@ -1941,17 +1941,17 @@ static uint8_t rx65n_riic_read_data(FAR struct rx65n_i2c_priv_s *priv)
|
||||
|
||||
if (0 == priv->bus)
|
||||
{
|
||||
regval = (uint8_t *) (RX65N_RIIC0_ICDRR);
|
||||
regval = (uint8_t *)(RX65N_RIIC0_ICDRR);
|
||||
}
|
||||
|
||||
else if (1 == priv->bus)
|
||||
{
|
||||
regval = (uint8_t *) (RX65N_RIIC1_ICDRR);
|
||||
regval = (uint8_t *)(RX65N_RIIC1_ICDRR);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
regval = (uint8_t *) (RX65N_RIIC2_ICDRR);
|
||||
regval = (uint8_t *)(RX65N_RIIC2_ICDRR);
|
||||
}
|
||||
|
||||
return *regval;
|
||||
|
@ -296,7 +296,7 @@ static struct rx65n_rspidev_s g_rspi0dev =
|
||||
{
|
||||
.rspidev =
|
||||
{
|
||||
&g_rspi0ops
|
||||
.ops = &g_rspi0ops,
|
||||
},
|
||||
.rspibase = RX65N_RSPI0_BASE,
|
||||
.rspiclock = RX65N_PCLK_FREQUENCY,
|
||||
@ -362,7 +362,7 @@ static struct rx65n_rspidev_s g_rspi1dev =
|
||||
{
|
||||
.rspidev =
|
||||
{
|
||||
&g_rspi1ops
|
||||
.ops = &g_rspi1ops,
|
||||
},
|
||||
.rspibase = RX65N_RSPI1_BASE,
|
||||
.rspiclock = RX65N_PCLK_FREQUENCY,
|
||||
@ -428,7 +428,7 @@ static struct rx65n_rspidev_s g_rspi2dev =
|
||||
{
|
||||
.rspidev =
|
||||
{
|
||||
&g_rspi2ops
|
||||
.ops = &g_rspi2ops,
|
||||
},
|
||||
.rspibase = RX65N_RSPI2_BASE,
|
||||
.rspiclock = RX65N_PCLK_FREQUENCY,
|
||||
@ -1018,8 +1018,8 @@ static void rspi_startxfr(struct rx65n_rspidev_s *priv)
|
||||
|
||||
#ifdef CONFIG_RX65N_RSPI_DTC_DT_MODE
|
||||
static dtc_err_t rspi_dtctxsetup(FAR struct rx65n_rspidev_s *priv,
|
||||
FAR const void *txbuffer, FAR const void *txdummy,
|
||||
size_t nwords)
|
||||
FAR const void *txbuffer,
|
||||
FAR const void *txdummy, size_t nwords)
|
||||
{
|
||||
dtc_err_t ret = DTC_SUCCESS;
|
||||
dtc_dynamic_transfer_data_cfg_t dcfg;
|
||||
@ -2166,7 +2166,7 @@ void rspi_interrupt_init(FAR struct rx65n_rspidev_s *priv, uint8_t bus)
|
||||
* Return Value : none
|
||||
****************************************************************************/
|
||||
|
||||
static void rspi_power_on_off (uint8_t channel, uint8_t on_or_off)
|
||||
static void rspi_power_on_off(uint8_t channel, uint8_t on_or_off)
|
||||
{
|
||||
SYSTEM.PRCR.WORD = 0xa50bu;
|
||||
|
||||
@ -2192,7 +2192,7 @@ static void rspi_power_on_off (uint8_t channel, uint8_t on_or_off)
|
||||
* Return Value : none
|
||||
****************************************************************************/
|
||||
|
||||
static void rspi_reg_protect (uint8_t enable)
|
||||
static void rspi_reg_protect(uint8_t enable)
|
||||
{
|
||||
SYSTEM.PRCR.WORD = 0xa50b;
|
||||
MPC.PWPR.BIT.B0WI = 0;
|
||||
|
@ -279,7 +279,7 @@ static struct rx65n_rspidev_s g_rspi0dev =
|
||||
{
|
||||
.rspidev =
|
||||
{
|
||||
&g_rspi0ops
|
||||
.ops = &g_rspi0ops,
|
||||
},
|
||||
.rspibase = RX65N_RSPI0_BASE,
|
||||
.rspiclock = RX65N_PCLK_FREQUENCY,
|
||||
@ -333,7 +333,7 @@ static struct rx65n_rspidev_s g_rspi1dev =
|
||||
{
|
||||
.rspidev =
|
||||
{
|
||||
&g_rspi1ops
|
||||
.ops = &g_rspi1ops,
|
||||
},
|
||||
.rspibase = RX65N_RSPI1_BASE,
|
||||
.rspiclock = RX65N_PCLK_FREQUENCY,
|
||||
@ -387,7 +387,7 @@ static struct rx65n_rspidev_s g_rspi2dev =
|
||||
{
|
||||
.rspidev =
|
||||
{
|
||||
&g_rspi2ops
|
||||
.ops = &g_rspi2ops,
|
||||
},
|
||||
.rspibase = RX65N_RSPI2_BASE,
|
||||
.rspiclock = RX65N_PCLK_FREQUENCY,
|
||||
@ -1796,7 +1796,7 @@ void rspi_interrupt_init(FAR struct rx65n_rspidev_s *priv, uint8_t bus)
|
||||
* Return Value : none
|
||||
****************************************************************************/
|
||||
|
||||
static void rspi_power_on_off (uint8_t channel, uint8_t on_or_off)
|
||||
static void rspi_power_on_off(uint8_t channel, uint8_t on_or_off)
|
||||
{
|
||||
SYSTEM.PRCR.WORD = 0xa50bu;
|
||||
|
||||
@ -1822,7 +1822,7 @@ static void rspi_power_on_off (uint8_t channel, uint8_t on_or_off)
|
||||
* Return Value : none
|
||||
****************************************************************************/
|
||||
|
||||
static void rspi_reg_protect (uint8_t enable)
|
||||
static void rspi_reg_protect(uint8_t enable)
|
||||
{
|
||||
SYSTEM.PRCR.WORD = 0xa50b;
|
||||
MPC.PWPR.BIT.B0WI = 0;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -115,7 +115,7 @@ struct bl602_i2c_priv_s
|
||||
****************************************************************************/
|
||||
|
||||
static int bl602_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s * msgs,
|
||||
struct i2c_msg_s *msgs,
|
||||
int count);
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
@ -658,7 +658,7 @@ static void bl602_i2c_set_freq(int freq)
|
||||
****************************************************************************/
|
||||
|
||||
static int bl602_i2c_transfer(struct i2c_master_s *dev,
|
||||
struct i2c_msg_s * msgs,
|
||||
struct i2c_msg_s *msgs,
|
||||
int count)
|
||||
{
|
||||
int i;
|
||||
@ -943,7 +943,7 @@ static int bl602_i2c_irq(int cpuint, void *context, void *arg)
|
||||
|
||||
struct i2c_master_s *bl602_i2cbus_initialize(int port)
|
||||
{
|
||||
struct bl602_i2c_priv_s * priv;
|
||||
struct bl602_i2c_priv_s *priv;
|
||||
const struct bl602_i2c_config_s *config;
|
||||
|
||||
switch (port)
|
||||
|
@ -184,7 +184,7 @@ struct rx_pending_item_s
|
||||
{
|
||||
struct list_node node;
|
||||
struct bl602_net_driver_s *priv; /* Which interface should to deliver */
|
||||
uint8_t * data;
|
||||
uint8_t *data;
|
||||
int len;
|
||||
};
|
||||
|
||||
@ -1174,7 +1174,7 @@ static void scan_complete_indicate(void *data, void *param)
|
||||
{
|
||||
int i;
|
||||
struct scan_parse_param_s *para;
|
||||
wifi_mgmr_scan_item_t * scan;
|
||||
wifi_mgmr_scan_item_t *scan;
|
||||
|
||||
para = (struct scan_parse_param_s *)data;
|
||||
DEBUGASSERT(para != NULL);
|
||||
@ -1506,7 +1506,7 @@ bl602_net_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||
case SIOCSIWSCAN:
|
||||
do
|
||||
{
|
||||
struct iwreq * req = (struct iwreq *)arg;
|
||||
struct iwreq *req = (struct iwreq *)arg;
|
||||
struct scan_parse_param_s *para = NULL;
|
||||
|
||||
para = kmm_malloc(sizeof(struct scan_parse_param_s));
|
||||
@ -1603,9 +1603,9 @@ bl602_net_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||
case SIOCSIWENCODEEXT: /* Set psk */
|
||||
do
|
||||
{
|
||||
struct iwreq * req = (struct iwreq *)arg;
|
||||
struct iwreq *req = (struct iwreq *)arg;
|
||||
struct iw_encode_ext *ext = req->u.encoding.pointer;
|
||||
char * passphrase = kmm_malloc(ext->key_len + 1);
|
||||
char *passphrase = kmm_malloc(ext->key_len + 1);
|
||||
if (passphrase == NULL)
|
||||
{
|
||||
return -ENOMEM;
|
||||
@ -1673,7 +1673,7 @@ bl602_net_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
priv->wlan = wifi_mgmr_sta_enable((void *)priv);
|
||||
priv->wlan = wifi_mgmr_sta_enable(priv);
|
||||
|
||||
memcpy(priv->wlan->mac,
|
||||
priv->net_dev.d_mac.ether.ether_addr_octet,
|
||||
@ -1694,7 +1694,7 @@ bl602_net_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||
}
|
||||
#endif
|
||||
|
||||
priv->wlan = wifi_mgmr_ap_enable((void *)priv);
|
||||
priv->wlan = wifi_mgmr_ap_enable(priv);
|
||||
memcpy(priv->wlan->mac,
|
||||
priv->net_dev.d_mac.ether.ether_addr_octet,
|
||||
6);
|
||||
@ -1847,9 +1847,9 @@ bl602_net_ioctl(struct net_driver_s *dev, int cmd, unsigned long arg)
|
||||
case SIOCGIWENCODEEXT: /* Get encoding token mode */
|
||||
do
|
||||
{
|
||||
struct iwreq * req = (struct iwreq *)arg;
|
||||
struct iwreq *req = (struct iwreq *)arg;
|
||||
struct iw_encode_ext *ext;
|
||||
wifi_mgmr_t * mgmr = bl602_netdev_get_wifi_mgmr(priv);
|
||||
wifi_mgmr_t *mgmr = bl602_netdev_get_wifi_mgmr(priv);
|
||||
int length;
|
||||
|
||||
DEBUGASSERT(mgmr != NULL);
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <nuttx/irq.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/mutex.h>
|
||||
#include <nuttx/semaphore.h>
|
||||
#include <nuttx/signal.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
@ -1480,7 +1481,7 @@ void bl602_spi_dma_init(struct spi_dev_s *dev)
|
||||
/* Request a DMA channel for SPI peripheral */
|
||||
|
||||
priv->dma_rxchan = bl602_dma_channel_request(bl602_dma_rx_callback,
|
||||
(void *)priv);
|
||||
priv);
|
||||
if (priv->dma_rxchan < 0)
|
||||
{
|
||||
spierr("Failed to allocate GDMA channel\n");
|
||||
@ -1490,7 +1491,7 @@ void bl602_spi_dma_init(struct spi_dev_s *dev)
|
||||
}
|
||||
|
||||
priv->dma_txchan = bl602_dma_channel_request(bl602_dma_tx_callback,
|
||||
(void *)priv);
|
||||
priv);
|
||||
if (priv->dma_txchan < 0)
|
||||
{
|
||||
spierr("Failed to allocate GDMA channel\n");
|
||||
|
@ -411,7 +411,7 @@ static struct esp32_i2s_s esp32_i2s0_priv =
|
||||
{
|
||||
.dev =
|
||||
{
|
||||
.ops = &g_i2sops
|
||||
.ops = &g_i2sops,
|
||||
},
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
.config = &esp32_i2s0_config,
|
||||
@ -472,7 +472,7 @@ static struct esp32_i2s_s esp32_i2s1_priv =
|
||||
{
|
||||
.dev =
|
||||
{
|
||||
.ops = &g_i2sops
|
||||
.ops = &g_i2sops,
|
||||
},
|
||||
.lock = NXMUTEX_INITIALIZER,
|
||||
.config = &esp32_i2s1_config,
|
||||
@ -614,8 +614,6 @@ static void i2s_buf_free(struct esp32_i2s_s *priv,
|
||||
|
||||
static int i2s_buf_initialize(struct esp32_i2s_s *priv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
priv->tx.carry.bytes = 0;
|
||||
priv->tx.carry.value = 0;
|
||||
|
||||
@ -1786,7 +1784,6 @@ static int esp32_i2s_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb,
|
||||
bfcontainer->result = -EBUSY;
|
||||
|
||||
ret = i2s_txdma_setup(priv, bfcontainer);
|
||||
|
||||
if (ret != OK)
|
||||
{
|
||||
goto errout_with_buf;
|
||||
@ -1797,7 +1794,6 @@ static int esp32_i2s_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb,
|
||||
apb->nbytes - apb->curbyte);
|
||||
|
||||
nxmutex_unlock(&priv->lock);
|
||||
|
||||
return OK;
|
||||
|
||||
errout_with_buf:
|
||||
|
@ -244,7 +244,7 @@ struct esp32_config_s
|
||||
#endif
|
||||
#ifdef CONFIG_SERIAL_TXDMA
|
||||
uint8_t dma_chan; /* DMA instance 0-1 */
|
||||
sem_t * dma_sem; /* DMA semaphore */
|
||||
sem_t *dma_sem; /* DMA semaphore */
|
||||
#endif
|
||||
#ifdef HAVE_RS485
|
||||
uint8_t rs485_dir_gpio; /* UART RS-485 DIR GPIO pin cfg */
|
||||
|
@ -92,7 +92,7 @@ static int ez80_i2c_transfer(FAR struct i2c_master_s *dev,
|
||||
static bool g_initialized; /* true:I2C has been initialized */
|
||||
static mutex_t g_i2clock = NXMUTEX_INITIALIZER; /* Serialize I2C transfers */
|
||||
|
||||
const struct i2c_ops_s g_ops =
|
||||
static const struct i2c_ops_s g_ops =
|
||||
{
|
||||
ez80_i2c_transfer
|
||||
};
|
||||
|
@ -586,7 +586,7 @@ static int z8_i2c_transfer(FAR struct i2c_master_s *dev,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_I2C_RESET
|
||||
static int z8_i2c_reset(FAR struct i2c_master_s * dev)
|
||||
static int z8_i2c_reset(FAR struct i2c_master_s *dev)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ int imageproc_convert_rgb2yuv(uint8_t *ibuf,
|
||||
void imageproc_convert_yuv2gray(uint8_t * ibuf, uint8_t * obuf, size_t hsize,
|
||||
size_t vsize)
|
||||
{
|
||||
uint16_t *p_src = (uint16_t *) ibuf;
|
||||
uint16_t *p_src = (uint16_t *)ibuf;
|
||||
size_t ix;
|
||||
size_t iy;
|
||||
|
||||
|
@ -747,7 +747,7 @@ static void tc_worker(void *arg)
|
||||
* the on-board transistor drive logic to energize the touch panel.
|
||||
*/
|
||||
|
||||
*((uint32_t *) LCD_TP_PORT_SETRESET) = LCD_SAMPY_BITS;
|
||||
*((uint32_t *)LCD_TP_PORT_SETRESET) = LCD_SAMPY_BITS;
|
||||
|
||||
/* Allow time for the Y DRIVE to settle */
|
||||
|
||||
@ -813,7 +813,7 @@ static void tc_worker(void *arg)
|
||||
* the on-board transistor drive logic to energize the touch panel.
|
||||
*/
|
||||
|
||||
*((uint32_t *) LCD_TP_PORT_SETRESET) = LCD_SAMPY_BITS;
|
||||
*((uint32_t *)LCD_TP_PORT_SETRESET) = LCD_SAMPY_BITS;
|
||||
|
||||
/* Allow time for the Y DRIVE to settle */
|
||||
|
||||
@ -881,7 +881,7 @@ static void tc_worker(void *arg)
|
||||
* touch panel.
|
||||
*/
|
||||
|
||||
*((uint32_t *) LCD_TP_PORT_SETRESET) = LCD_SAMPX_BITS;
|
||||
*((uint32_t *)LCD_TP_PORT_SETRESET) = LCD_SAMPX_BITS;
|
||||
|
||||
/* Allow time for the X sampling */
|
||||
|
||||
@ -1347,8 +1347,7 @@ static int tc_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
* Name: tc_poll
|
||||
****************************************************************************/
|
||||
|
||||
static int tc_poll(struct file *filep, struct pollfd *fds,
|
||||
bool setup)
|
||||
static int tc_poll(struct file *filep, struct pollfd *fds, bool setup)
|
||||
{
|
||||
struct inode *inode;
|
||||
struct tc_dev_s *priv;
|
||||
|
@ -1224,8 +1224,7 @@ static int tc_ioctl(struct file *filep, int cmd, unsigned long arg)
|
||||
* Name: tc_poll
|
||||
****************************************************************************/
|
||||
|
||||
static int tc_poll(struct file *filep, struct pollfd *fds,
|
||||
bool setup)
|
||||
static int tc_poll(struct file *filep, struct pollfd *fds, bool setup)
|
||||
{
|
||||
struct inode *inode;
|
||||
struct tc_dev_s *priv;
|
||||
|
@ -45,8 +45,8 @@
|
||||
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define ROTL_32(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
|
||||
#define ROTR_32(x,n) ( ((x) >> (n)) | ((x) << (32-(n))) )
|
||||
#define ROTL_32(x,n) (((x) << (n)) | ((x) >> (32 - (n))))
|
||||
#define ROTR_32(x,n) (((x) >> (n)) | ((x) << (32 - (n))))
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
|
@ -284,7 +284,7 @@ static inline int usbhost_tdfree(FAR struct usbhost_state_s *priv);
|
||||
|
||||
/* struct usbhost_registry_s methods */
|
||||
|
||||
static struct usbhost_class_s *usbhost_create(
|
||||
static FAR struct usbhost_class_s *usbhost_create(
|
||||
FAR struct usbhost_hubport_s *hport,
|
||||
FAR const struct usbhost_id_s *id);
|
||||
|
||||
@ -355,7 +355,7 @@ static uint32_t g_devinuse;
|
||||
|
||||
static mutex_t g_lock = NXMUTEX_INITIALIZER;
|
||||
static sem_t g_syncsem = SEM_INITIALIZER(0);
|
||||
static struct usbhost_state_s *g_priv; /* Data passed to thread */
|
||||
static FAR struct usbhost_state_s *g_priv;
|
||||
|
||||
/* The following tables map keyboard scan codes to printable ASIC
|
||||
* characters. There is no support here for function keys or cursor
|
||||
@ -1833,7 +1833,7 @@ static int usbhost_tdfree(FAR struct usbhost_state_s *priv)
|
||||
****************************************************************************/
|
||||
|
||||
static FAR struct usbhost_class_s *
|
||||
usbhost_create(FAR struct usbhost_hubport_s *hport,
|
||||
usbhost_create(FAR struct usbhost_hubport_s *hport,
|
||||
FAR const struct usbhost_id_s *id)
|
||||
{
|
||||
FAR struct usbhost_state_s *priv;
|
||||
@ -1978,7 +1978,7 @@ static int usbhost_connect(FAR struct usbhost_class_s *usbclass,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int usbhost_disconnected(struct usbhost_class_s *usbclass)
|
||||
static int usbhost_disconnected(FAR struct usbhost_class_s *usbclass)
|
||||
{
|
||||
FAR struct usbhost_state_s *priv = (FAR struct usbhost_state_s *)usbclass;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user