mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Fix a search/replace typo
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
struct stm32l4can__s
|
||||
struct stm32l4_can_s
|
||||
{
|
||||
uint8_t port; /* CAN port number (1 or 2) */
|
||||
uint8_t canrx0; /* CAN RX FIFO 0 IRQ number */
|
||||
@@ -107,20 +107,20 @@ struct stm32l4can__s
|
||||
|
||||
/* CAN Register access */
|
||||
|
||||
static uint32_t stm32l4can_getreg(FAR struct stm32l4can__s *priv,
|
||||
static uint32_t stm32l4can_getreg(FAR struct stm32l4_can_s *priv,
|
||||
int offset);
|
||||
static uint32_t stm32l4can_getfreg(FAR struct stm32l4can__s *priv,
|
||||
static uint32_t stm32l4can_getfreg(FAR struct stm32l4_can_s *priv,
|
||||
int offset);
|
||||
static void stm32l4can_putreg(FAR struct stm32l4can__s *priv, int offset,
|
||||
static void stm32l4can_putreg(FAR struct stm32l4_can_s *priv, int offset,
|
||||
uint32_t value);
|
||||
static void stm32l4can_putfreg(FAR struct stm32l4can__s *priv, int offset,
|
||||
static void stm32l4can_putfreg(FAR struct stm32l4_can_s *priv, int offset,
|
||||
uint32_t value);
|
||||
#ifdef CONFIG_STM32L4_CAN_REGDEBUG
|
||||
static void stm32l4can_dumpctrlregs(FAR struct stm32l4can__s *priv,
|
||||
static void stm32l4can_dumpctrlregs(FAR struct stm32l4_can_s *priv,
|
||||
FAR const char *msg);
|
||||
static void stm32l4can_dumpmbregs(FAR struct stm32l4can__s *priv,
|
||||
static void stm32l4can_dumpmbregs(FAR struct stm32l4_can_s *priv,
|
||||
FAR const char *msg);
|
||||
static void stm32l4can_dumpfiltregs(FAR struct stm32l4can__s *priv,
|
||||
static void stm32l4can_dumpfiltregs(FAR struct stm32l4_can_s *priv,
|
||||
FAR const char *msg);
|
||||
#else
|
||||
# define stm32l4can_dumpctrlregs(priv,msg)
|
||||
@@ -151,21 +151,21 @@ static int stm32l4can_txinterrupt(int irq, FAR void *context);
|
||||
|
||||
/* Initialization */
|
||||
|
||||
static int stm32l4can_enterinitmode(FAR struct stm32l4can__s *priv);
|
||||
static int stm32l4can_exitinitmode(FAR struct stm32l4can__s *priv);
|
||||
static int stm32l4can_bittiming(FAR struct stm32l4can__s *priv);
|
||||
static int stm32l4can_cellinit(FAR struct stm32l4can__s *priv);
|
||||
static int stm32l4can_filterinit(FAR struct stm32l4can__s *priv);
|
||||
static int stm32l4can_enterinitmode(FAR struct stm32l4_can_s *priv);
|
||||
static int stm32l4can_exitinitmode(FAR struct stm32l4_can_s *priv);
|
||||
static int stm32l4can_bittiming(FAR struct stm32l4_can_s *priv);
|
||||
static int stm32l4can_cellinit(FAR struct stm32l4_can_s *priv);
|
||||
static int stm32l4can_filterinit(FAR struct stm32l4_can_s *priv);
|
||||
|
||||
/* Filtering (todo) */
|
||||
|
||||
static int stm32l4can_addextfilter(FAR struct stm32l4can__s *priv,
|
||||
static int stm32l4can_addextfilter(FAR struct stm32l4_can_s *priv,
|
||||
FAR struct canioc_extfilter_s *arg);
|
||||
static int stm32l4can_delextfilter(FAR struct stm32l4can__s *priv,
|
||||
static int stm32l4can_delextfilter(FAR struct stm32l4_can_s *priv,
|
||||
int arg);
|
||||
static int stm32l4can_addstdfilter(FAR struct stm32l4can__s *priv,
|
||||
static int stm32l4can_addstdfilter(FAR struct stm32l4_can_s *priv,
|
||||
FAR struct canioc_stdfilter_s *arg);
|
||||
static int stm32l4can_delstdfilter(FAR struct stm32l4can__s *priv,
|
||||
static int stm32l4can_delstdfilter(FAR struct stm32l4_can_s *priv,
|
||||
int arg);
|
||||
|
||||
/****************************************************************************
|
||||
@@ -187,7 +187,7 @@ static const struct can_ops_s g_canops =
|
||||
};
|
||||
|
||||
#ifdef CONFIG_STM32L4_CAN1
|
||||
static struct stm32l4can__s g_can1priv =
|
||||
static struct stm32l4_can_s g_can1priv =
|
||||
{
|
||||
.port = 1,
|
||||
.canrx0 = STM32L4_IRQ_CAN1RX0,
|
||||
@@ -278,23 +278,23 @@ static uint32_t stm32l4can_vgetreg(uint32_t addr)
|
||||
return val;
|
||||
}
|
||||
|
||||
static uint32_t stm32l4can_getreg(FAR struct stm32l4can__s *priv, int offset)
|
||||
static uint32_t stm32l4can_getreg(FAR struct stm32l4_can_s *priv, int offset)
|
||||
{
|
||||
return stm32l4can_vgetreg(priv->base + offset);
|
||||
}
|
||||
|
||||
static uint32_t stm32l4can_getfreg(FAR struct stm32l4can__s *priv, int offset)
|
||||
static uint32_t stm32l4can_getfreg(FAR struct stm32l4_can_s *priv, int offset)
|
||||
{
|
||||
return stm32l4can_vgetreg(priv->fbase + offset);
|
||||
}
|
||||
|
||||
#else
|
||||
static uint32_t stm32l4can_getreg(FAR struct stm32l4can__s *priv, int offset)
|
||||
static uint32_t stm32l4can_getreg(FAR struct stm32l4_can_s *priv, int offset)
|
||||
{
|
||||
return getreg32(priv->base + offset);
|
||||
}
|
||||
|
||||
static uint32_t stm32l4can_getfreg(FAR struct stm32l4can__s *priv, int offset)
|
||||
static uint32_t stm32l4can_getfreg(FAR struct stm32l4_can_s *priv, int offset)
|
||||
{
|
||||
return getreg32(priv->fbase + offset);
|
||||
}
|
||||
@@ -330,26 +330,26 @@ static void stm32l4can_vputreg(uint32_t addr, uint32_t value)
|
||||
putreg32(value, addr);
|
||||
}
|
||||
|
||||
static void stm32l4can_putreg(FAR struct stm32l4can__s *priv, int offset,
|
||||
static void stm32l4can_putreg(FAR struct stm32l4_can_s *priv, int offset,
|
||||
uint32_t value)
|
||||
{
|
||||
stm32l4can_vputreg(priv->base + offset, value);
|
||||
}
|
||||
|
||||
static void stm32l4can_putfreg(FAR struct stm32l4can__s *priv, int offset,
|
||||
static void stm32l4can_putfreg(FAR struct stm32l4_can_s *priv, int offset,
|
||||
uint32_t value)
|
||||
{
|
||||
stm32l4can_vputreg(priv->fbase + offset, value);
|
||||
}
|
||||
|
||||
#else
|
||||
static void stm32l4can_putreg(FAR struct stm32l4can__s *priv, int offset,
|
||||
static void stm32l4can_putreg(FAR struct stm32l4_can_s *priv, int offset,
|
||||
uint32_t value)
|
||||
{
|
||||
putreg32(value, priv->base + offset);
|
||||
}
|
||||
|
||||
static void stm32l4can_putfreg(FAR struct stm32l4can__s *priv, int offset,
|
||||
static void stm32l4can_putfreg(FAR struct stm32l4_can_s *priv, int offset,
|
||||
uint32_t value)
|
||||
{
|
||||
putreg32(value, priv->fbase + offset);
|
||||
@@ -371,7 +371,7 @@ static void stm32l4can_putfreg(FAR struct stm32l4can__s *priv, int offset,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32L4_CAN_REGDEBUG
|
||||
static void stm32l4can_dumpctrlregs(FAR struct stm32l4can__s *priv,
|
||||
static void stm32l4can_dumpctrlregs(FAR struct stm32l4_can_s *priv,
|
||||
FAR const char *msg)
|
||||
{
|
||||
if (msg)
|
||||
@@ -416,7 +416,7 @@ static void stm32l4can_dumpctrlregs(FAR struct stm32l4can__s *priv,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32L4_CAN_REGDEBUG
|
||||
static void stm32l4can_dumpmbregs(FAR struct stm32l4can__s *priv,
|
||||
static void stm32l4can_dumpmbregs(FAR struct stm32l4_can_s *priv,
|
||||
FAR const char *msg)
|
||||
{
|
||||
if (msg)
|
||||
@@ -477,7 +477,7 @@ static void stm32l4can_dumpmbregs(FAR struct stm32l4can__s *priv,
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_STM32L4_CAN_REGDEBUG
|
||||
static void stm32l4can_dumpfiltregs(FAR struct stm32l4can__s *priv,
|
||||
static void stm32l4can_dumpfiltregs(FAR struct stm32l4_can_s *priv,
|
||||
FAR const char *msg)
|
||||
{
|
||||
int i;
|
||||
@@ -524,7 +524,7 @@ static void stm32l4can_dumpfiltregs(FAR struct stm32l4can__s *priv,
|
||||
|
||||
static void stm32l4can_reset(FAR struct can_dev_s *dev)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv = dev->cd_priv;
|
||||
FAR struct stm32l4_can_s *priv = dev->cd_priv;
|
||||
uint32_t regval;
|
||||
uint32_t regbit = 0;
|
||||
irqstate_t flags;
|
||||
@@ -581,7 +581,7 @@ static void stm32l4can_reset(FAR struct can_dev_s *dev)
|
||||
|
||||
static int stm32l4can_setup(FAR struct can_dev_s *dev)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv = dev->cd_priv;
|
||||
FAR struct stm32l4_can_s *priv = dev->cd_priv;
|
||||
int ret;
|
||||
|
||||
caninfo("CAN%d RX0 irq: %d TX irq: %d\n",
|
||||
@@ -659,7 +659,7 @@ static int stm32l4can_setup(FAR struct can_dev_s *dev)
|
||||
|
||||
static void stm32l4can_shutdown(FAR struct can_dev_s *dev)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv = dev->cd_priv;
|
||||
FAR struct stm32l4_can_s *priv = dev->cd_priv;
|
||||
|
||||
caninfo("CAN%d\n", priv->port);
|
||||
|
||||
@@ -694,7 +694,7 @@ static void stm32l4can_shutdown(FAR struct can_dev_s *dev)
|
||||
|
||||
static void stm32l4can_rxint(FAR struct can_dev_s *dev, bool enable)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv = dev->cd_priv;
|
||||
FAR struct stm32l4_can_s *priv = dev->cd_priv;
|
||||
uint32_t regval;
|
||||
|
||||
caninfo("CAN%d enable: %d\n", priv->port, enable);
|
||||
@@ -730,7 +730,7 @@ static void stm32l4can_rxint(FAR struct can_dev_s *dev, bool enable)
|
||||
|
||||
static void stm32l4can_txint(FAR struct can_dev_s *dev, bool enable)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv = dev->cd_priv;
|
||||
FAR struct stm32l4_can_s *priv = dev->cd_priv;
|
||||
uint32_t regval;
|
||||
|
||||
caninfo("CAN%d enable: %d\n", priv->port, enable);
|
||||
@@ -762,7 +762,7 @@ static void stm32l4can_txint(FAR struct can_dev_s *dev, bool enable)
|
||||
static int stm32l4can_ioctl(FAR struct can_dev_s *dev, int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv;
|
||||
FAR struct stm32l4_can_s *priv;
|
||||
int ret = -ENOTTY;
|
||||
|
||||
caninfo("cmd=%04x arg=%lu\n", cmd, arg);
|
||||
@@ -1099,7 +1099,7 @@ static int stm32l4can_remoterequest(FAR struct can_dev_s *dev, uint16_t id)
|
||||
static int stm32l4can_send(FAR struct can_dev_s *dev,
|
||||
FAR struct can_msg_s *msg)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv = dev->cd_priv;
|
||||
FAR struct stm32l4_can_s *priv = dev->cd_priv;
|
||||
FAR uint8_t *ptr;
|
||||
uint32_t regval;
|
||||
uint32_t tmp;
|
||||
@@ -1255,7 +1255,7 @@ static int stm32l4can_send(FAR struct can_dev_s *dev,
|
||||
|
||||
static bool stm32l4can_txready(FAR struct can_dev_s *dev)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv = dev->cd_priv;
|
||||
FAR struct stm32l4_can_s *priv = dev->cd_priv;
|
||||
uint32_t regval;
|
||||
|
||||
/* Return true if any mailbox is available */
|
||||
@@ -1291,7 +1291,7 @@ static bool stm32l4can_txready(FAR struct can_dev_s *dev)
|
||||
|
||||
static bool stm32l4can_txempty(FAR struct can_dev_s *dev)
|
||||
{
|
||||
FAR struct stm32l4can__s *priv = dev->cd_priv;
|
||||
FAR struct stm32l4_can_s *priv = dev->cd_priv;
|
||||
uint32_t regval;
|
||||
|
||||
/* Return true if all mailboxes are available */
|
||||
@@ -1325,7 +1325,7 @@ static bool stm32l4can_txempty(FAR struct can_dev_s *dev)
|
||||
static int stm32l4can_rx0interrupt(int irq, FAR void *context)
|
||||
{
|
||||
FAR struct can_dev_s *dev = NULL;
|
||||
FAR struct stm32l4can__s *priv;
|
||||
FAR struct stm32l4_can_s *priv;
|
||||
struct can_hdr_s hdr;
|
||||
uint8_t data[CAN_MAXDATALEN];
|
||||
uint32_t regval;
|
||||
@@ -1436,7 +1436,7 @@ errout:
|
||||
static int stm32l4can_txinterrupt(int irq, FAR void *context)
|
||||
{
|
||||
FAR struct can_dev_s *dev = NULL;
|
||||
FAR struct stm32l4can__s *priv;
|
||||
FAR struct stm32l4_can_s *priv;
|
||||
uint32_t regval;
|
||||
|
||||
dev = &g_can1dev;
|
||||
@@ -1566,7 +1566,7 @@ static int stm32l4can_txinterrupt(int irq, FAR void *context)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_bittiming(FAR struct stm32l4can__s *priv)
|
||||
static int stm32l4can_bittiming(FAR struct stm32l4_can_s *priv)
|
||||
{
|
||||
uint32_t tmp;
|
||||
uint32_t brp;
|
||||
@@ -1666,7 +1666,7 @@ static int stm32l4can_bittiming(FAR struct stm32l4can__s *priv)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_enterinitmode(FAR struct stm32l4can__s *priv)
|
||||
static int stm32l4can_enterinitmode(FAR struct stm32l4_can_s *priv)
|
||||
{
|
||||
uint32_t regval;
|
||||
volatile uint32_t timeout;
|
||||
@@ -1717,7 +1717,7 @@ static int stm32l4can_enterinitmode(FAR struct stm32l4can__s *priv)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_exitinitmode(FAR struct stm32l4can__s *priv)
|
||||
static int stm32l4can_exitinitmode(FAR struct stm32l4_can_s *priv)
|
||||
{
|
||||
uint32_t regval;
|
||||
volatile uint32_t timeout;
|
||||
@@ -1766,7 +1766,7 @@ static int stm32l4can_exitinitmode(FAR struct stm32l4can__s *priv)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_cellinit(FAR struct stm32l4can__s *priv)
|
||||
static int stm32l4can_cellinit(FAR struct stm32l4_can_s *priv)
|
||||
{
|
||||
uint32_t regval;
|
||||
int ret;
|
||||
@@ -1849,7 +1849,7 @@ static int stm32l4can_cellinit(FAR struct stm32l4can__s *priv)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_filterinit(FAR struct stm32l4can__s *priv)
|
||||
static int stm32l4can_filterinit(FAR struct stm32l4_can_s *priv)
|
||||
{
|
||||
uint32_t regval;
|
||||
uint32_t bitmask;
|
||||
@@ -1928,7 +1928,7 @@ static int stm32l4can_filterinit(FAR struct stm32l4can__s *priv)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_addextfilter(FAR struct stm32l4can__s *priv,
|
||||
static int stm32l4can_addextfilter(FAR struct stm32l4_can_s *priv,
|
||||
FAR struct canioc_extfilter_s *arg)
|
||||
{
|
||||
return -ENOTTY;
|
||||
@@ -1952,7 +1952,7 @@ static int stm32l4can_addextfilter(FAR struct stm32l4can__s *priv,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_delextfilter(FAR struct stm32l4can__s *priv, int arg)
|
||||
static int stm32l4can_delextfilter(FAR struct stm32l4_can_s *priv, int arg)
|
||||
{
|
||||
return -ENOTTY;
|
||||
}
|
||||
@@ -1974,7 +1974,7 @@ static int stm32l4can_delextfilter(FAR struct stm32l4can__s *priv, int arg)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_addstdfilter(FAR struct stm32l4can__s *priv,
|
||||
static int stm32l4can_addstdfilter(FAR struct stm32l4_can_s *priv,
|
||||
FAR struct canioc_stdfilter_s *arg)
|
||||
{
|
||||
return -ENOTTY;
|
||||
@@ -1998,7 +1998,7 @@ static int stm32l4can_addstdfilter(FAR struct stm32l4can__s *priv,
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int stm32l4can_delstdfilter(FAR struct stm32l4can__s *priv, int arg)
|
||||
static int stm32l4can_delstdfilter(FAR struct stm32l4_can_s *priv, int arg)
|
||||
{
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user