mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Cosmetic changes to comments and README
This commit is contained in:
@@ -204,6 +204,7 @@ static inline uint8_t tiva_gpioport(int port)
|
||||
|
||||
int tiva_dumpgpio(uint32_t pinset, const char *msg)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG
|
||||
irqstate_t flags;
|
||||
unsigned int port = (pinset & GPIO_PORT_MASK) >> GPIO_PORT_SHIFT;
|
||||
uintptr_t base;
|
||||
@@ -242,6 +243,9 @@ int tiva_dumpgpio(uint32_t pinset, const char *msg)
|
||||
getreg32(base + TIVA_GPIO_PUR_OFFSET), getreg32(base + TIVA_GPIO_PDR_OFFSET),
|
||||
getreg32(base + TIVA_GPIO_SLR_OFFSET));
|
||||
}
|
||||
|
||||
irqrestore(flags);
|
||||
#endif /* CONFIG_DEBUG */
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -834,6 +834,7 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer,
|
||||
ssi_getreg(priv, TIVA_SSI_SR_OFFSET));
|
||||
|
||||
ntxd = ssi_performtx(priv);
|
||||
UNUSED(ntxd);
|
||||
|
||||
/* For the case where nwords < Tx FIFO size, ssi_performrx will
|
||||
* configure interrupts correctly for the final phase of the
|
||||
@@ -873,6 +874,7 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer,
|
||||
/* Handle outgoing Tx FIFO transfers */
|
||||
|
||||
ntxd = ssi_performtx(priv);
|
||||
UNUSED(ntxd);
|
||||
|
||||
/* Handle incoming Rx FIFO transfers */
|
||||
|
||||
@@ -886,6 +888,7 @@ static int ssi_transfer(struct tiva_ssidev_s *priv, const void *txbuffer,
|
||||
}
|
||||
while (priv->nrxwords < priv->nwords);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -996,6 +999,7 @@ static int ssi_interrupt(int irq, void *context)
|
||||
ssidbg("Transfer complete\n");
|
||||
ssi_semgive(&priv->xfrsem);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
@@ -1043,6 +1047,7 @@ static int ssi_lock(FAR struct spi_dev_s *dev, bool lock)
|
||||
{
|
||||
(void)sem_post(&priv->exclsem);
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
@@ -1160,8 +1165,10 @@ static uint32_t ssi_setfrequencyinternal(struct tiva_ssidev_s *priv,
|
||||
priv->frequency = frequency;
|
||||
priv->actual = actual;
|
||||
}
|
||||
|
||||
return priv->actual;
|
||||
#else
|
||||
|
||||
return actual;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ Serial Console
|
||||
UART1_CTS - PF.1 or PC.5
|
||||
|
||||
NOTE: board.h currently selects PB.0, PB.1, PF.0 and PF.1 for UART1, but
|
||||
that can be changed by editting board.h
|
||||
that can be changed by editing board.h
|
||||
|
||||
UART2-5, 7 are also available, UART2 is not recommended because it shares
|
||||
some pin usage with USB device mode. UART6 is not available because its
|
||||
|
||||
@@ -1035,6 +1035,7 @@ static int mmcsd_xmitblock(FAR struct mmcsd_slot_s *slot, const uint8_t *buffer,
|
||||
fdbg("Bad data response: %02x\n", response);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif /* CONFIG_FS_WRITABLE && !CONFIG_MMCSD_READONLY */
|
||||
@@ -1089,7 +1090,7 @@ static int mmcsd_open(FAR struct inode *inode)
|
||||
|
||||
if (slot->type == MMCSD_CARDTYPE_UNKNOWN)
|
||||
{
|
||||
/* Ininitialize for the media in the slot */
|
||||
/* Initialize for the media in the slot */
|
||||
|
||||
ret = mmcsd_mediainitialize(slot);
|
||||
if (ret < 0)
|
||||
@@ -1188,6 +1189,8 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
/* Convert sector and nsectors to nbytes and byte offset */
|
||||
|
||||
nbytes = nsectors * SECTORSIZE(slot);
|
||||
UNUSED(nbytes);
|
||||
|
||||
if (IS_BLOCK(slot->type))
|
||||
{
|
||||
offset = start_sector;
|
||||
@@ -1402,7 +1405,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
|
||||
}
|
||||
|
||||
/* Send CMD25: Continuously write blocks of data until the
|
||||
* tranmission is stopped.
|
||||
* transmission is stopped.
|
||||
*/
|
||||
|
||||
response = mmcsd_sendcmd(slot, &g_cmd25, offset);
|
||||
@@ -1850,6 +1853,7 @@ static void mmcsd_mediachanged(void *arg)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
spi = slot->spi;
|
||||
|
||||
/* Save the current slot state and reassess the new state */
|
||||
@@ -1957,7 +1961,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi)
|
||||
mmcsd_semtake(slot);
|
||||
mmcsd_spiinit(slot);
|
||||
|
||||
/* Ininitialize for the media in the slot (if any) */
|
||||
/* Initialize for the media in the slot (if any) */
|
||||
|
||||
ret = mmcsd_mediainitialize(slot);
|
||||
mmcsd_semgive(slot);
|
||||
|
||||
Reference in New Issue
Block a user