mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
LPC2378/LPC214x: Convert *err() to either *info() or add ERROR:, depending on if an error is reported
This commit is contained in:
@@ -549,7 +549,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
_err("Unexpected IIR: %02x\n", status);
|
||||
_err("ERROR: Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ struct lpc214x_usbdev_s
|
||||
|
||||
/* Register operations ********************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC214X_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC214X_USBDEV_REGDEBUG
|
||||
static uint32_t lpc214x_getreg(uint32_t addr);
|
||||
static void lpc214x_putreg(uint32_t val, uint32_t addr);
|
||||
#else
|
||||
@@ -518,7 +518,7 @@ static const struct usbdev_ops_s g_devops =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC214X_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC214X_USBDEV_REGDEBUG
|
||||
static uint32_t lpc214x_getreg(uint32_t addr)
|
||||
{
|
||||
static uint32_t prevaddr = 0;
|
||||
@@ -539,7 +539,7 @@ static uint32_t lpc214x_getreg(uint32_t addr)
|
||||
{
|
||||
if (count == 4)
|
||||
{
|
||||
_llerr("...\n");
|
||||
ullinfo("...\n");
|
||||
}
|
||||
|
||||
return val;
|
||||
@@ -556,7 +556,7 @@ static uint32_t lpc214x_getreg(uint32_t addr)
|
||||
{
|
||||
/* Yes.. then show how many times the value repeated */
|
||||
|
||||
_llerr("[repeats %d more times]\n", count-3);
|
||||
ullinfo("[repeats %d more times]\n", count-3);
|
||||
}
|
||||
|
||||
/* Save the new address, value, and count */
|
||||
@@ -568,7 +568,7 @@ static uint32_t lpc214x_getreg(uint32_t addr)
|
||||
|
||||
/* Show the register value read */
|
||||
|
||||
_llerr("%08x->%08x\n", addr, val);
|
||||
ullinfo("%08x->%08x\n", addr, val);
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
@@ -581,12 +581,12 @@ static uint32_t lpc214x_getreg(uint32_t addr)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_LPC214X_USBDEV_REGDEBUG) && defined(CONFIG_DEBUG_FEATURES)
|
||||
#ifdef CONFIG_LPC214X_USBDEV_REGDEBUG
|
||||
static void lpc214x_putreg(uint32_t val, uint32_t addr)
|
||||
{
|
||||
/* Show the register value being written */
|
||||
|
||||
_llerr("%08x<-%08x\n", addr, val);
|
||||
ullinfo("%08x<-%08x\n", addr, val);
|
||||
|
||||
/* Write the value */
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ struct i2c_master_s *lpc2378_i2cbus_initialize(int port)
|
||||
|
||||
if (port > 1)
|
||||
{
|
||||
_err("lpc I2C Only support 0,1\n");
|
||||
l2cerr("ERROR: lpc I2C Only support 0,1\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -667,7 +667,7 @@ static int up_interrupt(int irq, void *context)
|
||||
|
||||
default:
|
||||
{
|
||||
_err("Unexpected IIR: %02x\n", status);
|
||||
_err("ERROR: Unexpected IIR: %02x\n", status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +274,7 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
|
||||
priv->frequency = frequency;
|
||||
priv->actual = actual;
|
||||
|
||||
spierr("Frequency %d->%d\n", frequency, actual);
|
||||
spiinfo("Frequency %d->%d\n", frequency, actual);
|
||||
return actual;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size
|
||||
FAR uint8_t *ptr = (FAR uint8_t *)buffer;
|
||||
uint8_t data;
|
||||
|
||||
spierr("nwords: %d\n", nwords);
|
||||
spiinfo("nwords: %d\n", nwords);
|
||||
while (nwords)
|
||||
{
|
||||
/* Write the data to transmitted to the SPI Data Register */
|
||||
@@ -483,7 +483,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nw
|
||||
{
|
||||
FAR uint8_t *ptr = (FAR uint8_t *)buffer;
|
||||
|
||||
spierr("nwords: %d\n", nwords);
|
||||
spiinfo("nwords: %d\n", nwords);
|
||||
while (nwords)
|
||||
{
|
||||
/* Write some dummy data to the SPI Data Register in order to clock the
|
||||
|
||||
Reference in New Issue
Block a user