mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
Replace all occurrences of vdbg with vinfo
This commit is contained in:
@@ -233,7 +233,7 @@ static ssize_t adc_read(FAR struct file *filep, FAR char *buffer, size_t buflen)
|
||||
int ret = 0;
|
||||
int msglen;
|
||||
|
||||
avdbg("buflen: %d\n", (int)buflen);
|
||||
ainfo("buflen: %d\n", (int)buflen);
|
||||
|
||||
if (buflen % 5 == 0)
|
||||
msglen = 5;
|
||||
@@ -351,7 +351,7 @@ return_with_irqdisabled:
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
||||
avdbg("Returning: %d\n", ret);
|
||||
ainfo("Returning: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+23
-23
@@ -112,13 +112,13 @@
|
||||
#ifdef CONFIG_DEBUG_SPI
|
||||
# define spidbg dbg
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define spivdbg dbg
|
||||
# define spiinfo dbg
|
||||
# else
|
||||
# define spivdbg(x...)
|
||||
# define spiinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define spidbg(x...)
|
||||
# define spivdbg(x...)
|
||||
# define spiinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
static void pga11x_configure(FAR struct spi_dev_s *spi)
|
||||
{
|
||||
spivdbg("MODE: %d BITS: 8 Frequency: %d\n",
|
||||
spiinfo("MODE: %d BITS: 8 Frequency: %d\n",
|
||||
CONFIG_PGA11X_SPIMODE, CONFIG_PGA11X_SPIFREQUENCY);
|
||||
|
||||
/* Call the setfrequency, setbits, and setmode methods to make sure that
|
||||
@@ -164,7 +164,7 @@ static void pga11x_configure(FAR struct spi_dev_s *spi)
|
||||
|
||||
static void pga11x_lock(FAR struct spi_dev_s *spi)
|
||||
{
|
||||
spivdbg("Locking\n");
|
||||
spiinfo("Locking\n");
|
||||
|
||||
/* On SPI busses where there are multiple devices, it will be necessary to
|
||||
* lock SPI to have exclusive access to the busses for a sequence of
|
||||
@@ -198,7 +198,7 @@ static void pga11x_lock(FAR struct spi_dev_s *spi)
|
||||
|
||||
static inline void pga11x_unlock(FAR struct spi_dev_s *spi)
|
||||
{
|
||||
spivdbg("Unlocking\n");
|
||||
spiinfo("Unlocking\n");
|
||||
|
||||
SPI_LOCK(spi, false);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ static inline void pga11x_unlock(FAR struct spi_dev_s *spi)
|
||||
|
||||
static void pga11x_send16(FAR struct spi_dev_s *spi, uint16_t word)
|
||||
{
|
||||
spivdbg("Send %04x\n", word);
|
||||
spiinfo("Send %04x\n", word);
|
||||
|
||||
/* The logical interface is 16-bits wide. However, this driver uses a
|
||||
* 8-bit configuration for greaer portability.
|
||||
@@ -265,7 +265,7 @@ static uint16_t pga11x_recv16(FAR struct spi_dev_s *spi)
|
||||
|
||||
msb = SPI_SEND(spi, SPI_DUMMY);
|
||||
lsb = SPI_SEND(spi, SPI_DUMMY);
|
||||
spivdbg("Received %02x %02x\n", msb, lsb);
|
||||
spiinfo("Received %02x %02x\n", msb, lsb);
|
||||
|
||||
return ((uint16_t)msb << 8) | (uint16_t)lsb;
|
||||
}
|
||||
@@ -293,7 +293,7 @@ static uint16_t pga11x_recv16(FAR struct spi_dev_s *spi)
|
||||
#ifndef CONFIG_PGA11X_DAISYCHAIN
|
||||
static void pga11x_write(FAR struct spi_dev_s *spi, uint16_t cmd)
|
||||
{
|
||||
spivdbg("cmd %04x\n", cmd);
|
||||
spiinfo("cmd %04x\n", cmd);
|
||||
|
||||
/* Lock, select, send the 16-bit command, de-select, and un-lock. */
|
||||
|
||||
@@ -306,7 +306,7 @@ static void pga11x_write(FAR struct spi_dev_s *spi, uint16_t cmd)
|
||||
#else
|
||||
static void pga11x_write(FAR struct spi_dev_s *spi, uint16_t u1cmd, uint16_t u2cmd)
|
||||
{
|
||||
spivdbg("U1 cmd: %04x U2 cmd: %04x\n", u1cmd, u2cmd);
|
||||
spiinfo("U1 cmd: %04x U2 cmd: %04x\n", u1cmd, u2cmd);
|
||||
|
||||
/* Lock, select, send the U2 16-bit command, the U1 16-bit command, de-select,
|
||||
* and un-lock.
|
||||
@@ -343,7 +343,7 @@ static void pga11x_write(FAR struct spi_dev_s *spi, uint16_t u1cmd, uint16_t u2c
|
||||
|
||||
PGA11X_HANDLE pga11x_initialize(FAR struct spi_dev_s *spi)
|
||||
{
|
||||
spivdbg("Entry\n");
|
||||
spiinfo("Entry\n");
|
||||
|
||||
/* No Special state is required, just return the SPI driver instance as
|
||||
* the handle. This gives us a place to extend functionality in the
|
||||
@@ -380,7 +380,7 @@ int pga11x_select(PGA11X_HANDLE handle,
|
||||
uint16_t cmd;
|
||||
|
||||
DEBUGASSERT(handle && settings);
|
||||
spivdbg("channel: %d gain: %d\n", settings->channel, settings->gain);
|
||||
spiinfo("channel: %d gain: %d\n", settings->channel, settings->gain);
|
||||
|
||||
/* Format the command */
|
||||
|
||||
@@ -398,8 +398,8 @@ int pga11x_select(PGA11X_HANDLE handle,
|
||||
uint16_t u2cmd;
|
||||
|
||||
DEBUGASSERT(handle && settings);
|
||||
spivdbg("U1 channel: %d gain: %d\n", settings->u1.channel, settings->u1.gain);
|
||||
spivdbg("U1 channel: %d gain: %d\n", settings->u1.channel, settings->u1.gain);
|
||||
spiinfo("U1 channel: %d gain: %d\n", settings->u1.channel, settings->u1.gain);
|
||||
spiinfo("U1 channel: %d gain: %d\n", settings->u1.channel, settings->u1.gain);
|
||||
|
||||
/* Format the commands */
|
||||
|
||||
@@ -445,7 +445,7 @@ int pga11x_uselect(PGA11X_HANDLE handle, int pos,
|
||||
uint16_t u1cmd;
|
||||
uint16_t u2cmd;
|
||||
|
||||
spivdbg("channel: %d gain: %d\n", settings->channel, settings->gain);
|
||||
spiinfo("channel: %d gain: %d\n", settings->channel, settings->gain);
|
||||
DEBUGASSERT(handle);
|
||||
|
||||
/* Format the commands */
|
||||
@@ -498,7 +498,7 @@ int pga11x_read(PGA11X_HANDLE handle, FAR struct pga11x_settings_s *settings)
|
||||
uint16_t u1value;
|
||||
uint16_t u2value;
|
||||
|
||||
spivdbg("Entry\n");
|
||||
spiinfo("Entry\n");
|
||||
DEBUGASSERT(handle && settings);
|
||||
|
||||
/* Lock the bus and read the configuration */
|
||||
@@ -526,7 +526,7 @@ int pga11x_read(PGA11X_HANDLE handle, FAR struct pga11x_settings_s *settings)
|
||||
|
||||
/* Decode the returned value */
|
||||
|
||||
spivdbg("Returning %04x %04x\n", u2value, u1value);
|
||||
spiinfo("Returning %04x %04x\n", u2value, u1value);
|
||||
settings->u1.channel = (uint8_t)((u1value & PGA11X_CHAN_MASK) >> PGA11X_CHAN_SHIFT);
|
||||
settings->u1.gain = (uint8_t)((u1value & PGA11X_GAIN_MASK) >> PGA11X_GAIN_SHIFT);
|
||||
settings->u2.channel = (uint8_t)((u2value & PGA11X_CHAN_MASK) >> PGA11X_CHAN_SHIFT);
|
||||
@@ -536,7 +536,7 @@ int pga11x_read(PGA11X_HANDLE handle, FAR struct pga11x_settings_s *settings)
|
||||
FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle;
|
||||
uint16_t value;
|
||||
|
||||
spivdbg("Entry\n");
|
||||
spiinfo("Entry\n");
|
||||
DEBUGASSERT(handle);
|
||||
|
||||
/* Lock the bus and read the configuration */
|
||||
@@ -561,7 +561,7 @@ int pga11x_read(PGA11X_HANDLE handle, FAR struct pga11x_settings_s *settings)
|
||||
|
||||
/* Decode the returned value */
|
||||
|
||||
spivdbg("Returning: %04x\n", value);
|
||||
spiinfo("Returning: %04x\n", value);
|
||||
settings->channel = (uint8_t)((value & PGA11X_CHAN_MASK) >> PGA11X_CHAN_SHIFT);
|
||||
settings->gain = (uint8_t)((value & PGA11X_GAIN_MASK) >> PGA11X_GAIN_SHIFT);
|
||||
return OK;
|
||||
@@ -633,7 +633,7 @@ int pga11x_shutdown(PGA11X_HANDLE handle)
|
||||
{
|
||||
FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle;
|
||||
|
||||
spivdbg("Entry\n");
|
||||
spiinfo("Entry\n");
|
||||
DEBUGASSERT(handle);
|
||||
|
||||
/* Enter shutdown mode by issuing an SDN_EN command */
|
||||
@@ -669,7 +669,7 @@ int pga11x_ushutdown(PGA11X_HANDLE handle, int pos)
|
||||
{
|
||||
FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle;
|
||||
|
||||
spivdbg("Entry\n");
|
||||
spiinfo("Entry\n");
|
||||
DEBUGASSERT(handle);
|
||||
|
||||
/* Enter shutdown mode by issuing an SDN_EN command */
|
||||
@@ -709,7 +709,7 @@ int pga11x_enable(PGA11X_HANDLE handle)
|
||||
{
|
||||
FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle;
|
||||
|
||||
spivdbg("Entry\n");
|
||||
spiinfo("Entry\n");
|
||||
DEBUGASSERT(handle);
|
||||
|
||||
/* Lock the bus and send the shutdown disable command. Shutdown mode is
|
||||
@@ -748,7 +748,7 @@ int pga11x_uenable(PGA11X_HANDLE handle, int pos)
|
||||
{
|
||||
FAR struct spi_dev_s *spi = (FAR struct spi_dev_s *)handle;
|
||||
|
||||
spivdbg("Entry\n");
|
||||
spiinfo("Entry\n");
|
||||
DEBUGASSERT(handle);
|
||||
|
||||
/* Enter shutdown mode by issuing an SDN_EN command */
|
||||
|
||||
+32
-32
@@ -178,7 +178,7 @@ static const struct audio_ops_s g_audioops =
|
||||
static int null_getcaps(FAR struct audio_lowerhalf_s *dev, int type,
|
||||
FAR struct audio_caps_s *caps)
|
||||
{
|
||||
audvdbg("type=%d\n", type);
|
||||
audinfo("type=%d\n", type);
|
||||
|
||||
/* Validate the structure */
|
||||
|
||||
@@ -324,7 +324,7 @@ static int null_getcaps(FAR struct audio_lowerhalf_s *dev, int type,
|
||||
* proper Audio device type.
|
||||
*/
|
||||
|
||||
audvdbg("Return %d\n", caps->ac_len);
|
||||
audinfo("Return %d\n", caps->ac_len);
|
||||
return caps->ac_len;
|
||||
}
|
||||
|
||||
@@ -345,14 +345,14 @@ static int null_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
FAR const struct audio_caps_s *caps)
|
||||
#endif
|
||||
{
|
||||
audvdbg("ac_type: %d\n", caps->ac_type);
|
||||
audinfo("ac_type: %d\n", caps->ac_type);
|
||||
|
||||
/* Process the configure operation */
|
||||
|
||||
switch (caps->ac_type)
|
||||
{
|
||||
case AUDIO_TYPE_FEATURE:
|
||||
audvdbg(" AUDIO_TYPE_FEATURE\n");
|
||||
audinfo(" AUDIO_TYPE_FEATURE\n");
|
||||
|
||||
/* Process based on Feature Unit */
|
||||
|
||||
@@ -360,17 +360,17 @@ static int null_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
{
|
||||
#ifndef CONFIG_AUDIO_EXCLUDE_VOLUME
|
||||
case AUDIO_FU_VOLUME:
|
||||
audvdbg(" Volume: %d\n", caps->ac_controls.hw[0]);
|
||||
audinfo(" Volume: %d\n", caps->ac_controls.hw[0]);
|
||||
break;
|
||||
#endif /* CONFIG_AUDIO_EXCLUDE_VOLUME */
|
||||
|
||||
#ifndef CONFIG_AUDIO_EXCLUDE_TONE
|
||||
case AUDIO_FU_BASS:
|
||||
audvdbg(" Bass: %d\n", caps->ac_controls.b[0]);
|
||||
audinfo(" Bass: %d\n", caps->ac_controls.b[0]);
|
||||
break;
|
||||
|
||||
case AUDIO_FU_TREBLE:
|
||||
audvdbg(" Treble: %d\n", caps->ac_controls.b[0]);
|
||||
audinfo(" Treble: %d\n", caps->ac_controls.b[0]);
|
||||
break;
|
||||
#endif /* CONFIG_AUDIO_EXCLUDE_TONE */
|
||||
|
||||
@@ -381,18 +381,18 @@ static int null_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
break;
|
||||
|
||||
case AUDIO_TYPE_OUTPUT:
|
||||
audvdbg(" AUDIO_TYPE_OUTPUT:\n");
|
||||
audvdbg(" Number of channels: %u\n", caps->ac_channels);
|
||||
audvdbg(" Sample rate: %u\n", caps->ac_controls.hw[0]);
|
||||
audvdbg(" Sample width: %u\n", caps->ac_controls.b[2]);
|
||||
audinfo(" AUDIO_TYPE_OUTPUT:\n");
|
||||
audinfo(" Number of channels: %u\n", caps->ac_channels);
|
||||
audinfo(" Sample rate: %u\n", caps->ac_controls.hw[0]);
|
||||
audinfo(" Sample width: %u\n", caps->ac_controls.b[2]);
|
||||
break;
|
||||
|
||||
case AUDIO_TYPE_PROCESSING:
|
||||
audvdbg(" AUDIO_TYPE_PROCESSING:\n");
|
||||
audinfo(" AUDIO_TYPE_PROCESSING:\n");
|
||||
break;
|
||||
}
|
||||
|
||||
audvdbg("Return OK\n");
|
||||
audinfo("Return OK\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -406,7 +406,7 @@ static int null_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
|
||||
static int null_shutdown(FAR struct audio_lowerhalf_s *dev)
|
||||
{
|
||||
audvdbg("Return OK\n");
|
||||
audinfo("Return OK\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ static void *null_workerthread(pthread_addr_t pvarg)
|
||||
int msglen;
|
||||
int prio;
|
||||
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
|
||||
/* Loop as long as we are supposed to be running */
|
||||
|
||||
@@ -486,7 +486,7 @@ static void *null_workerthread(pthread_addr_t pvarg)
|
||||
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK);
|
||||
#endif
|
||||
|
||||
audvdbg("Exit\n");
|
||||
audinfo("Exit\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ static int null_start(FAR struct audio_lowerhalf_s *dev)
|
||||
FAR void *value;
|
||||
int ret;
|
||||
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
|
||||
/* Create a message queue for the worker thread */
|
||||
|
||||
@@ -535,7 +535,7 @@ static int null_start(FAR struct audio_lowerhalf_s *dev)
|
||||
|
||||
if (priv->threadid != 0)
|
||||
{
|
||||
audvdbg("Joining old thread\n");
|
||||
audinfo("Joining old thread\n");
|
||||
pthread_join(priv->threadid, &value);
|
||||
}
|
||||
|
||||
@@ -546,7 +546,7 @@ static int null_start(FAR struct audio_lowerhalf_s *dev)
|
||||
(void)pthread_attr_setschedparam(&tattr, &sparam);
|
||||
(void)pthread_attr_setstacksize(&tattr, CONFIG_AUDIO_NULL_WORKER_STACKSIZE);
|
||||
|
||||
audvdbg("Starting worker thread\n");
|
||||
audinfo("Starting worker thread\n");
|
||||
ret = pthread_create(&priv->threadid, &tattr, null_workerthread,
|
||||
(pthread_addr_t)priv);
|
||||
if (ret != OK)
|
||||
@@ -556,10 +556,10 @@ static int null_start(FAR struct audio_lowerhalf_s *dev)
|
||||
else
|
||||
{
|
||||
pthread_setname_np(priv->threadid, "null audio");
|
||||
audvdbg("Created worker thread\n");
|
||||
audinfo("Created worker thread\n");
|
||||
}
|
||||
|
||||
audvdbg("Return %d\n", ret);
|
||||
audinfo("Return %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -597,7 +597,7 @@ static int null_stop(FAR struct audio_lowerhalf_s *dev)
|
||||
pthread_join(priv->threadid, &value);
|
||||
priv->threadid = 0;
|
||||
|
||||
audvdbg("Return OK\n");
|
||||
audinfo("Return OK\n");
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
@@ -616,7 +616,7 @@ static int null_pause(FAR struct audio_lowerhalf_s *dev, FAR void *session)
|
||||
static int null_pause(FAR struct audio_lowerhalf_s *dev)
|
||||
#endif
|
||||
{
|
||||
audvdbg("Return OK\n");
|
||||
audinfo("Return OK\n");
|
||||
return OK;
|
||||
}
|
||||
#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */
|
||||
@@ -635,7 +635,7 @@ static int null_resume(FAR struct audio_lowerhalf_s *dev, FAR void *session)
|
||||
static int null_resume(FAR struct audio_lowerhalf_s *dev)
|
||||
#endif
|
||||
{
|
||||
audvdbg("Return OK\n");
|
||||
audinfo("Return OK\n");
|
||||
return OK;
|
||||
}
|
||||
#endif /* CONFIG_AUDIO_EXCLUDE_PAUSE_RESUME */
|
||||
@@ -653,7 +653,7 @@ static int null_enqueuebuffer(FAR struct audio_lowerhalf_s *dev,
|
||||
FAR struct null_dev_s *priv = (FAR struct null_dev_s *)dev;
|
||||
bool done;
|
||||
|
||||
audvdbg("apb=%p curbyte=%d nbytes=%d\n", apb, apb->curbyte, apb->nbytes);
|
||||
audinfo("apb=%p curbyte=%d nbytes=%d\n", apb, apb->curbyte, apb->nbytes);
|
||||
|
||||
/* Say that we consumed all of the data */
|
||||
|
||||
@@ -688,7 +688,7 @@ static int null_enqueuebuffer(FAR struct audio_lowerhalf_s *dev,
|
||||
#endif
|
||||
}
|
||||
|
||||
audvdbg("Return OK\n");
|
||||
audinfo("Return OK\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ static int null_enqueuebuffer(FAR struct audio_lowerhalf_s *dev,
|
||||
static int null_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
|
||||
FAR struct ap_buffer_s *apb)
|
||||
{
|
||||
audvdbg("apb=%p curbyte=%d nbytes=%d, return OK\n",
|
||||
audinfo("apb=%p curbyte=%d nbytes=%d, return OK\n",
|
||||
apb, apb->curbyte, apb->nbytes);
|
||||
|
||||
return OK;
|
||||
@@ -722,7 +722,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||
FAR struct ap_buffer_info_s *bufinfo;
|
||||
#endif
|
||||
|
||||
audvdbg("cmd=%d arg=%ld\n");
|
||||
audinfo("cmd=%d arg=%ld\n");
|
||||
|
||||
/* Deal with ioctls passed from the upper-half driver */
|
||||
|
||||
@@ -734,7 +734,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||
|
||||
case AUDIOIOC_HWRESET:
|
||||
{
|
||||
audvdbg("AUDIOIOC_HWRESET:\n");
|
||||
audinfo("AUDIOIOC_HWRESET:\n");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -743,7 +743,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
||||
case AUDIOIOC_GETBUFFERINFO:
|
||||
{
|
||||
audvdbg("AUDIOIOC_GETBUFFERINFO:\n");
|
||||
audinfo("AUDIOIOC_GETBUFFERINFO:\n");
|
||||
bufinfo = (FAR struct ap_buffer_info_s *) arg;
|
||||
bufinfo->buffer_size = CONFIG_AUDIO_NULL_BUFFER_SIZE;
|
||||
bufinfo->nbuffers = CONFIG_AUDIO_NULL_NUM_BUFFERS;
|
||||
@@ -755,7 +755,7 @@ static int null_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||
break;
|
||||
}
|
||||
|
||||
audvdbg("Return OK\n");
|
||||
audinfo("Return OK\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -773,7 +773,7 @@ static int null_reserve(FAR struct audio_lowerhalf_s *dev,
|
||||
static int null_reserve(FAR struct audio_lowerhalf_s *dev)
|
||||
#endif
|
||||
{
|
||||
audvdbg("Return OK\n");
|
||||
audinfo("Return OK\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -89,16 +89,16 @@
|
||||
# define i2sdbg dbg
|
||||
# define i2slldbg lldbg
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define i2svdbg dbg
|
||||
# define i2sllvdbg lldbg
|
||||
# define i2sinfo dbg
|
||||
# define i2sllinfo lldbg
|
||||
# else
|
||||
# define i2svdbg(x...)
|
||||
# define i2sinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define i2sdbg(x...)
|
||||
# define i2slldbg(x...)
|
||||
# define i2svdbg(x...)
|
||||
# define i2sllvdbg(x...)
|
||||
# define i2sinfo(x...)
|
||||
# define i2sllinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -174,7 +174,7 @@ static void i2schar_rxcallback(FAR struct i2s_dev_s *dev,
|
||||
FAR struct i2schar_dev_s *priv = (FAR struct i2schar_dev_s *)arg;
|
||||
|
||||
DEBUGASSERT(priv && apb);
|
||||
i2svdbg("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result);
|
||||
i2sinfo("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result);
|
||||
|
||||
/* REVISIT: If you want this to actually do something other than
|
||||
* test I2S data transfer, then this is the point where you would
|
||||
@@ -185,7 +185,7 @@ static void i2schar_rxcallback(FAR struct i2s_dev_s *dev,
|
||||
* now.
|
||||
*/
|
||||
|
||||
i2svdbg("Freeing apb=%p crefs=%d\n", apb, apb->crefs);
|
||||
i2sinfo("Freeing apb=%p crefs=%d\n", apb, apb->crefs);
|
||||
apb_free(apb);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ static void i2schar_txcallback(FAR struct i2s_dev_s *dev,
|
||||
FAR struct i2schar_dev_s *priv = (FAR struct i2schar_dev_s *)arg;
|
||||
|
||||
DEBUGASSERT(priv && apb);
|
||||
i2svdbg("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result);
|
||||
i2sinfo("apb=%p nbytes=%d result=%d\n", apb, apb->nbytes, result);
|
||||
|
||||
/* REVISIT: If you want this to actually do something other than
|
||||
* test I2S data transfer, then this is the point where you would
|
||||
@@ -220,7 +220,7 @@ static void i2schar_txcallback(FAR struct i2s_dev_s *dev,
|
||||
* now.
|
||||
*/
|
||||
|
||||
i2svdbg("Freeing apb=%p crefs=%d\n", apb, apb->crefs);
|
||||
i2sinfo("Freeing apb=%p crefs=%d\n", apb, apb->crefs);
|
||||
apb_free(apb);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ static ssize_t i2schar_read(FAR struct file *filep, FAR char *buffer,
|
||||
size_t nbytes;
|
||||
int ret;
|
||||
|
||||
i2svdbg("buffer=%p buflen=%d\n", buffer, (int)buflen);
|
||||
i2sinfo("buffer=%p buflen=%d\n", buffer, (int)buflen);
|
||||
|
||||
/* Get our private data structure */
|
||||
|
||||
@@ -316,7 +316,7 @@ static ssize_t i2schar_write(FAR struct file *filep, FAR const char *buffer,
|
||||
size_t nbytes;
|
||||
int ret;
|
||||
|
||||
i2svdbg("buffer=%p buflen=%d\n", buffer, (int)buflen);
|
||||
i2sinfo("buffer=%p buflen=%d\n", buffer, (int)buflen);
|
||||
|
||||
/* Get our private data structure */
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@ static void vs1053_writereg(FAR struct vs1053_struct_s *dev, uint8_t reg, uint16
|
||||
|
||||
/* Select the AUDIO_CTRL device on the SPI bus */
|
||||
|
||||
audvdbg("Write Reg %d = 0x%0X\n", reg, val);
|
||||
audinfo("Write Reg %d = 0x%0X\n", reg, val);
|
||||
|
||||
SPI_SELECT(spi, SPIDEV_AUDIO_CTRL, true);
|
||||
|
||||
@@ -365,7 +365,7 @@ static int vs1053_setfrequency(FAR struct vs1053_struct_s *dev, uint32_t freq)
|
||||
uint16_t reg;
|
||||
uint8_t timeout;
|
||||
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
|
||||
/* Calculate the clock divisor based on the input frequency */
|
||||
|
||||
@@ -375,7 +375,7 @@ static int vs1053_setfrequency(FAR struct vs1053_struct_s *dev, uint32_t freq)
|
||||
|
||||
if (factor > 50.0)
|
||||
{
|
||||
audvdbg("Frequency too high! Limiting to XTALI * 5\n");
|
||||
audinfo("Frequency too high! Limiting to XTALI * 5\n");
|
||||
factor = 50.0;
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -566,7 +566,7 @@ static void vs1053_setbass(FAR struct vs1053_struct_s *dev)
|
||||
static int vs1053_getcaps(FAR struct audio_lowerhalf_s *lower, int type,
|
||||
FAR struct audio_caps_s *pCaps)
|
||||
{
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
|
||||
/* Validate the structure */
|
||||
|
||||
@@ -769,7 +769,7 @@ static int vs1053_configure(FAR struct audio_lowerhalf_s *lower,
|
||||
FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower;
|
||||
#endif
|
||||
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
|
||||
/* Process the configure operation */
|
||||
|
||||
@@ -924,7 +924,7 @@ static int vs1053_shutdown(FAR struct audio_lowerhalf_s *lower)
|
||||
FAR struct vs1053_struct_s *dev = (struct vs1053_struct_s *) lower;
|
||||
FAR struct spi_dev_s *spi = dev->spi;
|
||||
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
vs1053_spi_lock(spi, dev->spi_freq); /* Lock the device */
|
||||
vs1053_setfrequency(dev, CONFIG_VS1053_XTALI); /* Reduce speed to minimum */
|
||||
vs1053_writereg(dev, VS1053_SCI_VOL, 0xFEFE); /* Power down the DAC outputs */
|
||||
@@ -1630,7 +1630,7 @@ static int vs1053_enqueuebuffer(FAR struct audio_lowerhalf_s *lower,
|
||||
struct audio_msg_s term_msg;
|
||||
int ret;
|
||||
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
|
||||
/* Lock access to the apbq */
|
||||
|
||||
|
||||
+40
-40
@@ -304,11 +304,11 @@ uint16_t wm8904_readreg(FAR struct wm8904_dev_s *priv, uint8_t regaddr)
|
||||
*/
|
||||
|
||||
regval = ((uint16_t)data[0] << 8) | (uint16_t)data[1];
|
||||
audvdbg("Read: %02x -> %04x\n", regaddr, regval);
|
||||
audinfo("Read: %02x -> %04x\n", regaddr, regval);
|
||||
return regval;
|
||||
}
|
||||
|
||||
audvdbg("retries=%d regaddr=%02x\n", retries, regaddr);
|
||||
audinfo("retries=%d regaddr=%02x\n", retries, regaddr);
|
||||
}
|
||||
|
||||
/* No error indication is returned on a failure... just return zero */
|
||||
@@ -377,11 +377,11 @@ static void wm8904_writereg(FAR struct wm8904_dev_s *priv, uint8_t regaddr,
|
||||
* return the value read.
|
||||
*/
|
||||
|
||||
audvdbg("Write: %02x <- %04x\n", regaddr, regval);
|
||||
audinfo("Write: %02x <- %04x\n", regaddr, regval);
|
||||
return;
|
||||
}
|
||||
|
||||
audvdbg("retries=%d regaddr=%02x\n", retries, regaddr);
|
||||
audinfo("retries=%d regaddr=%02x\n", retries, regaddr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ static void wm8904_setvolume(FAR struct wm8904_dev_s *priv, uint16_t volume,
|
||||
uint32_t rightlevel;
|
||||
uint16_t regval;
|
||||
|
||||
audvdbg("volume=%u mute=%u\n", volume, mute);
|
||||
audinfo("volume=%u mute=%u\n", volume, mute);
|
||||
|
||||
#ifndef CONFIG_AUDIO_EXCLUDE_BALANCE
|
||||
/* Calculate the left channel volume level {0..1000} */
|
||||
@@ -514,7 +514,7 @@ static void wm8904_setvolume(FAR struct wm8904_dev_s *priv, uint16_t volume,
|
||||
#ifndef CONFIG_AUDIO_EXCLUDE_TONE
|
||||
static void wm8904_setbass(FAR struct wm8904_dev_s *priv, uint8_t bass)
|
||||
{
|
||||
audvdbg("bass=%u\n", bass);
|
||||
audinfo("bass=%u\n", bass);
|
||||
#warning Missing logic
|
||||
}
|
||||
#endif /* CONFIG_AUDIO_EXCLUDE_TONE */
|
||||
@@ -532,7 +532,7 @@ static void wm8904_setbass(FAR struct wm8904_dev_s *priv, uint8_t bass)
|
||||
#ifndef CONFIG_AUDIO_EXCLUDE_TONE
|
||||
static void wm8904_settreble(FAR struct wm8904_dev_s *priv, uint8_t treble)
|
||||
{
|
||||
audvdbg("treble=%u\n", treble);
|
||||
audinfo("treble=%u\n", treble);
|
||||
#warning Missing logic
|
||||
}
|
||||
#endif /* CONFIG_AUDIO_EXCLUDE_TONE */
|
||||
@@ -658,7 +658,7 @@ static void wm8904_setbitrate(FAR struct wm8904_dev_s *priv)
|
||||
regval = WM8904_LRCLK_DIR | WM8904_LRCLK_RATE(framelen << 1);
|
||||
wm8904_writereg(priv, WM8904_AIF3, regval);
|
||||
|
||||
audvdbg("sample rate=%u nchannels=%u bpsamp=%u framelen=%d fout=%lu\n",
|
||||
audinfo("sample rate=%u nchannels=%u bpsamp=%u framelen=%d fout=%lu\n",
|
||||
priv->samprate, priv->nchannels, priv->bpsamp, framelen,
|
||||
(unsigned long)fout);
|
||||
|
||||
@@ -815,10 +815,10 @@ static void wm8904_setbitrate(FAR struct wm8904_dev_s *priv)
|
||||
tmp64 = ((uint64_t)fvco << 16) / (g_fllratio[fllndx] * fref);
|
||||
nk = (b16_t)tmp64;
|
||||
|
||||
audvdbg("mclk=%lu fref=%lu fvco=%lu fout=%lu divndx=%u\n",
|
||||
audinfo("mclk=%lu fref=%lu fvco=%lu fout=%lu divndx=%u\n",
|
||||
(unsigned long)priv->lower->mclk, (unsigned long)fref,
|
||||
(unsigned long)fvco, (unsigned long)fout, divndx);
|
||||
audvdbg("N.K=%08lx outdiv=%u fllratio=%u\n",
|
||||
audinfo("N.K=%08lx outdiv=%u fllratio=%u\n",
|
||||
(unsigned long)nk, outdiv, g_fllratio[fllndx]);
|
||||
|
||||
/* Save the actual bit rate that we are using. This will be used by the
|
||||
@@ -961,7 +961,7 @@ static int wm8904_getcaps(FAR struct audio_lowerhalf_s *dev, int type,
|
||||
/* Validate the structure */
|
||||
|
||||
DEBUGASSERT(caps && caps->ac_len >= sizeof(struct audio_caps_s));
|
||||
audvdbg("type=%d ac_type=%d\n", type, caps->ac_type);
|
||||
audinfo("type=%d ac_type=%d\n", type, caps->ac_type);
|
||||
|
||||
/* Fill in the caller's structure based on requested info */
|
||||
|
||||
@@ -1129,14 +1129,14 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
int ret = OK;
|
||||
|
||||
DEBUGASSERT(priv && caps);
|
||||
audvdbg("ac_type: %d\n", caps->ac_type);
|
||||
audinfo("ac_type: %d\n", caps->ac_type);
|
||||
|
||||
/* Process the configure operation */
|
||||
|
||||
switch (caps->ac_type)
|
||||
{
|
||||
case AUDIO_TYPE_FEATURE:
|
||||
audvdbg(" AUDIO_TYPE_FEATURE\n");
|
||||
audinfo(" AUDIO_TYPE_FEATURE\n");
|
||||
|
||||
/* Process based on Feature Unit */
|
||||
|
||||
@@ -1148,7 +1148,7 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
/* Set the volume */
|
||||
|
||||
uint16_t volume = caps->ac_controls.hw[0];
|
||||
audvdbg(" Volume: %d\n", volume);
|
||||
audinfo(" Volume: %d\n", volume);
|
||||
|
||||
if (volume >= 0 && volume <= 1000)
|
||||
{
|
||||
@@ -1172,7 +1172,7 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
*/
|
||||
|
||||
uint8_t bass = caps->ac_controls.b[0];
|
||||
audvdbg(" Bass: %d\n", bass);
|
||||
audinfo(" Bass: %d\n", bass);
|
||||
|
||||
if (bass <= 100)
|
||||
{
|
||||
@@ -1192,7 +1192,7 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
*/
|
||||
|
||||
uint8_t treble = caps->ac_controls.b[0];
|
||||
audvdbg(" Treble: %d\n", treble);
|
||||
audinfo(" Treble: %d\n", treble);
|
||||
|
||||
if (treble <= 100)
|
||||
{
|
||||
@@ -1215,10 +1215,10 @@ static int wm8904_configure(FAR struct audio_lowerhalf_s *dev,
|
||||
|
||||
case AUDIO_TYPE_OUTPUT:
|
||||
{
|
||||
audvdbg(" AUDIO_TYPE_OUTPUT:\n");
|
||||
audvdbg(" Number of channels: %u\n", caps->ac_channels);
|
||||
audvdbg(" Sample rate: %u\n", caps->ac_controls.hw[0]);
|
||||
audvdbg(" Sample width: %u\n", caps->ac_controls.b[2]);
|
||||
audinfo(" AUDIO_TYPE_OUTPUT:\n");
|
||||
audinfo(" Number of channels: %u\n", caps->ac_channels);
|
||||
audinfo(" Sample rate: %u\n", caps->ac_controls.hw[0]);
|
||||
audinfo(" Sample width: %u\n", caps->ac_controls.b[2]);
|
||||
|
||||
/* Verify that all of the requested values are supported */
|
||||
|
||||
@@ -1308,7 +1308,7 @@ static void wm8904_senddone(FAR struct i2s_dev_s *i2s,
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(i2s && priv && priv->running && apb);
|
||||
audvdbg("apb=%p inflight=%d result=%d\n", apb, priv->inflight, result);
|
||||
audinfo("apb=%p inflight=%d result=%d\n", apb, priv->inflight, result);
|
||||
|
||||
/* We do not place any restriction on the context in which this function
|
||||
* is called. It may be called from an interrupt handler. Therefore, the
|
||||
@@ -1377,7 +1377,7 @@ static void wm8904_returnbuffers(FAR struct wm8904_dev_s *priv)
|
||||
apb = (FAR struct ap_buffer_s *)dq_remfirst(&priv->doneq);
|
||||
leave_critical_section(flags);
|
||||
|
||||
audvdbg("Returning: apb=%p curbyte=%d nbytes=%d flags=%04x\n",
|
||||
audinfo("Returning: apb=%p curbyte=%d nbytes=%d flags=%04x\n",
|
||||
apb, apb->curbyte, apb->nbytes, apb->flags);
|
||||
|
||||
/* Are we returning the final buffer in the stream? */
|
||||
@@ -1395,7 +1395,7 @@ static void wm8904_returnbuffers(FAR struct wm8904_dev_s *priv)
|
||||
* worker thread to exit (if it is not already terminating).
|
||||
*/
|
||||
|
||||
audvdbg("Terminating\n");
|
||||
audinfo("Terminating\n");
|
||||
priv->terminating = true;
|
||||
}
|
||||
|
||||
@@ -1454,7 +1454,7 @@ static int wm8904_sendbuffer(FAR struct wm8904_dev_s *priv)
|
||||
/* Take next buffer from the queue of pending transfers */
|
||||
|
||||
apb = (FAR struct ap_buffer_s *)dq_remfirst(&priv->pendq);
|
||||
audvdbg("Sending apb=%p, size=%d inflight=%d\n",
|
||||
audinfo("Sending apb=%p, size=%d inflight=%d\n",
|
||||
apb, apb->nbytes, priv->inflight);
|
||||
|
||||
/* Increment the number of buffers in-flight before sending in order
|
||||
@@ -1526,7 +1526,7 @@ static int wm8904_start(FAR struct audio_lowerhalf_s *dev)
|
||||
FAR void *value;
|
||||
int ret;
|
||||
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
|
||||
/* Exit reduced power modes of operation */
|
||||
/* REVISIT */
|
||||
@@ -1553,7 +1553,7 @@ static int wm8904_start(FAR struct audio_lowerhalf_s *dev)
|
||||
|
||||
if (priv->threadid != 0)
|
||||
{
|
||||
audvdbg("Joining old thread\n");
|
||||
audinfo("Joining old thread\n");
|
||||
pthread_join(priv->threadid, &value);
|
||||
}
|
||||
|
||||
@@ -1564,7 +1564,7 @@ static int wm8904_start(FAR struct audio_lowerhalf_s *dev)
|
||||
(void)pthread_attr_setschedparam(&tattr, &sparam);
|
||||
(void)pthread_attr_setstacksize(&tattr, CONFIG_WM8904_WORKER_STACKSIZE);
|
||||
|
||||
audvdbg("Starting worker thread\n");
|
||||
audinfo("Starting worker thread\n");
|
||||
ret = pthread_create(&priv->threadid, &tattr, wm8904_workerthread,
|
||||
(pthread_addr_t)priv);
|
||||
if (ret != OK)
|
||||
@@ -1574,7 +1574,7 @@ static int wm8904_start(FAR struct audio_lowerhalf_s *dev)
|
||||
else
|
||||
{
|
||||
pthread_setname_np(priv->threadid, "wm8904");
|
||||
audvdbg("Created worker thread\n");
|
||||
audinfo("Created worker thread\n");
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -1694,7 +1694,7 @@ static int wm8904_enqueuebuffer(FAR struct audio_lowerhalf_s *dev,
|
||||
struct audio_msg_s term_msg;
|
||||
int ret;
|
||||
|
||||
audvdbg("Enqueueing: apb=%p curbyte=%d nbytes=%d flags=%04x\n",
|
||||
audinfo("Enqueueing: apb=%p curbyte=%d nbytes=%d flags=%04x\n",
|
||||
apb, apb->curbyte, apb->nbytes, apb->flags);
|
||||
|
||||
/* Take a reference on the new audio buffer */
|
||||
@@ -1744,7 +1744,7 @@ static int wm8904_enqueuebuffer(FAR struct audio_lowerhalf_s *dev,
|
||||
static int wm8904_cancelbuffer(FAR struct audio_lowerhalf_s *dev,
|
||||
FAR struct ap_buffer_s *apb)
|
||||
{
|
||||
audvdbg("apb=%p\n", apb);
|
||||
audinfo("apb=%p\n", apb);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1777,7 +1777,7 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||
* registers back in their default state.
|
||||
*/
|
||||
|
||||
audvdbg("AUDIOIOC_HWRESET:\n");
|
||||
audinfo("AUDIOIOC_HWRESET:\n");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1786,7 +1786,7 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||
#ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS
|
||||
case AUDIOIOC_GETBUFFERINFO:
|
||||
{
|
||||
audvdbg("AUDIOIOC_GETBUFFERINFO:\n");
|
||||
audinfo("AUDIOIOC_GETBUFFERINFO:\n");
|
||||
bufinfo = (FAR struct ap_buffer_info_s *) arg;
|
||||
bufinfo->buffer_size = CONFIG_WM8904_BUFFER_SIZE;
|
||||
bufinfo->nbuffers = CONFIG_WM8904_NUM_BUFFERS;
|
||||
@@ -1795,7 +1795,7 @@ static int wm8904_ioctl(FAR struct audio_lowerhalf_s *dev, int cmd,
|
||||
#endif
|
||||
|
||||
default:
|
||||
audvdbg("Ignored\n");
|
||||
audinfo("Ignored\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1908,7 +1908,7 @@ static void wm8904_interrupt_work(FAR void *arg)
|
||||
/* Sample the interrupt status */
|
||||
|
||||
regval = wm8904_readreg(priv, WM8904_INT_STATUS);
|
||||
audvdbg("INT_STATUS: %04x\n", regval);
|
||||
audinfo("INT_STATUS: %04x\n", regval);
|
||||
|
||||
/* Check for the FLL lock interrupt. We are sloppy here since at
|
||||
* present, only the FLL lock interrupt is used.
|
||||
@@ -1994,7 +1994,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg)
|
||||
int msglen;
|
||||
int prio;
|
||||
|
||||
audvdbg("Entry\n");
|
||||
audinfo("Entry\n");
|
||||
|
||||
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
|
||||
priv->terminating = false;
|
||||
@@ -2055,7 +2055,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg)
|
||||
*/
|
||||
|
||||
case AUDIO_MSG_DATA_REQUEST:
|
||||
audvdbg("AUDIO_MSG_DATA_REQUEST\n");
|
||||
audinfo("AUDIO_MSG_DATA_REQUEST\n");
|
||||
break;
|
||||
|
||||
/* Stop the playback */
|
||||
@@ -2064,7 +2064,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg)
|
||||
case AUDIO_MSG_STOP:
|
||||
/* Indicate that we are terminating */
|
||||
|
||||
audvdbg("AUDIO_MSG_STOP: Terminating\n");
|
||||
audinfo("AUDIO_MSG_STOP: Terminating\n");
|
||||
priv->terminating = true;
|
||||
break;
|
||||
#endif
|
||||
@@ -2074,13 +2074,13 @@ static void *wm8904_workerthread(pthread_addr_t pvarg)
|
||||
*/
|
||||
|
||||
case AUDIO_MSG_ENQUEUE:
|
||||
audvdbg("AUDIO_MSG_ENQUEUE\n");
|
||||
audinfo("AUDIO_MSG_ENQUEUE\n");
|
||||
break;
|
||||
|
||||
/* We will wake up from the I2S callback with this message */
|
||||
|
||||
case AUDIO_MSG_COMPLETE:
|
||||
audvdbg("AUDIO_MSG_COMPLETE\n");
|
||||
audinfo("AUDIO_MSG_COMPLETE\n");
|
||||
wm8904_returnbuffers(priv);
|
||||
break;
|
||||
|
||||
@@ -2132,7 +2132,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg)
|
||||
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK);
|
||||
#endif
|
||||
|
||||
audvdbg("Exit\n");
|
||||
audinfo("Exit\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
+15
-15
@@ -101,14 +101,14 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_CAN
|
||||
# define candbg dbg
|
||||
# define canvdbg vdbg
|
||||
# define caninfo info
|
||||
# define canlldbg lldbg
|
||||
# define canllvdbg llvdbg
|
||||
# define canllinfo llinfo
|
||||
#else
|
||||
# define candbg(x...)
|
||||
# define canvdbg(x...)
|
||||
# define caninfo(x...)
|
||||
# define canlldbg(x...)
|
||||
# define canllvdbg(x...)
|
||||
# define canllinfo(x...)
|
||||
#endif
|
||||
|
||||
/* Timing Definitions *******************************************************/
|
||||
@@ -296,7 +296,7 @@ static void can_txready_work(FAR void *arg)
|
||||
irqstate_t flags;
|
||||
int ret;
|
||||
|
||||
canllvdbg("xmit head: %d queue: %d tail: %d\n",
|
||||
canllinfo("xmit head: %d queue: %d tail: %d\n",
|
||||
dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue,
|
||||
dev->cd_xmit.tx_tail);
|
||||
|
||||
@@ -348,7 +348,7 @@ static int can_open(FAR struct file *filep)
|
||||
uint8_t tmp;
|
||||
int ret = OK;
|
||||
|
||||
canvdbg("ocount: %d\n", dev->cd_ocount);
|
||||
caninfo("ocount: %d\n", dev->cd_ocount);
|
||||
|
||||
/* If the port is the middle of closing, wait until the close is finished */
|
||||
|
||||
@@ -431,7 +431,7 @@ static int can_close(FAR struct file *filep)
|
||||
irqstate_t flags;
|
||||
int ret = OK;
|
||||
|
||||
canvdbg("ocount: %d\n", dev->cd_ocount);
|
||||
caninfo("ocount: %d\n", dev->cd_ocount);
|
||||
|
||||
if (sem_wait(&dev->cd_closesem) != OK)
|
||||
{
|
||||
@@ -510,7 +510,7 @@ static ssize_t can_read(FAR struct file *filep, FAR char *buffer,
|
||||
irqstate_t flags;
|
||||
int ret = 0;
|
||||
|
||||
canvdbg("buflen: %d\n", buflen);
|
||||
caninfo("buflen: %d\n", buflen);
|
||||
|
||||
/* The caller must provide enough memory to catch the smallest possible
|
||||
* message. This is not a system error condition, but we won't permit
|
||||
@@ -649,7 +649,7 @@ static int can_xmit(FAR struct can_dev_s *dev)
|
||||
int tmpndx;
|
||||
int ret = -EBUSY;
|
||||
|
||||
canllvdbg("xmit head: %d queue: %d tail: %d\n",
|
||||
canllinfo("xmit head: %d queue: %d tail: %d\n",
|
||||
dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail);
|
||||
|
||||
/* If there is nothing to send, then just disable interrupts and return */
|
||||
@@ -732,7 +732,7 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer,
|
||||
int msglen;
|
||||
int ret = 0;
|
||||
|
||||
canvdbg("buflen: %d\n", buflen);
|
||||
caninfo("buflen: %d\n", buflen);
|
||||
|
||||
/* Interrupts must disabled throughout the following */
|
||||
|
||||
@@ -915,7 +915,7 @@ static int can_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct can_dev_s *dev = inode->i_private;
|
||||
int ret = OK;
|
||||
|
||||
canvdbg("cmd: %d arg: %ld\n", cmd, arg);
|
||||
caninfo("cmd: %d arg: %ld\n", cmd, arg);
|
||||
|
||||
/* Handle built-in ioctl commands */
|
||||
|
||||
@@ -986,7 +986,7 @@ int can_register(FAR const char *path, FAR struct can_dev_s *dev)
|
||||
|
||||
/* Register the CAN device */
|
||||
|
||||
canvdbg("Registering %s\n", path);
|
||||
caninfo("Registering %s\n", path);
|
||||
return register_driver(path, &g_canops, 0666, dev);
|
||||
}
|
||||
|
||||
@@ -1018,7 +1018,7 @@ int can_receive(FAR struct can_dev_s *dev, FAR struct can_hdr_s *hdr,
|
||||
int err = -ENOMEM;
|
||||
int i;
|
||||
|
||||
canllvdbg("ID: %d DLC: %d\n", hdr->ch_id, hdr->ch_dlc);
|
||||
canllinfo("ID: %d DLC: %d\n", hdr->ch_id, hdr->ch_dlc);
|
||||
|
||||
/* Check if adding this new message would over-run the drivers ability to
|
||||
* enqueue read data.
|
||||
@@ -1203,7 +1203,7 @@ int can_txdone(FAR struct can_dev_s *dev)
|
||||
{
|
||||
int ret = -ENOENT;
|
||||
|
||||
canllvdbg("xmit head: %d queue: %d tail: %d\n",
|
||||
canllinfo("xmit head: %d queue: %d tail: %d\n",
|
||||
dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail);
|
||||
|
||||
/* Verify that the xmit FIFO is not empty */
|
||||
@@ -1307,7 +1307,7 @@ int can_txready(FAR struct can_dev_s *dev)
|
||||
{
|
||||
int ret = -ENOENT;
|
||||
|
||||
canllvdbg("xmit head: %d queue: %d tail: %d waiters: %d\n",
|
||||
canllinfo("xmit head: %d queue: %d tail: %d waiters: %d\n",
|
||||
dev->cd_xmit.tx_head, dev->cd_xmit.tx_queue, dev->cd_xmit.tx_tail,
|
||||
dev->cd_ntxwaiters);
|
||||
|
||||
|
||||
@@ -388,7 +388,7 @@ static void ee25xx_waitwritecomplete(struct ee25xx_dev_s *priv)
|
||||
}
|
||||
while ((status & EE25XX_SR_WIP) != 0);
|
||||
|
||||
fvdbg("Complete\n");
|
||||
finfo("Complete\n");
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -67,10 +67,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_I2C
|
||||
# define i2cdbg dbg
|
||||
# define i2cvdbg vdbg
|
||||
# define i2cinfo info
|
||||
#else
|
||||
# define i2cdbg(x...)
|
||||
# define i2cvdbg(x...)
|
||||
# define i2cinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -254,7 +254,7 @@ static int i2cdrvr_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct i2c_transfer_s *transfer;
|
||||
int ret;
|
||||
|
||||
i2cvdbg("cmd=%d arg=%lu\n", cmd, arg);
|
||||
i2cinfo("cmd=%d arg=%lu\n", cmd, arg);
|
||||
|
||||
/* Get our private data structure */
|
||||
|
||||
|
||||
+19
-19
@@ -279,7 +279,7 @@ static uint16_t ads7843e_sendcmd(FAR struct ads7843e_dev_s *priv, uint8_t cmd)
|
||||
result = ((uint16_t)buffer[0] << 8) | (uint16_t)buffer[1];
|
||||
result = result >> 4;
|
||||
|
||||
ivdbg("cmd:%02x response:%04x\n", cmd, result);
|
||||
iinfo("cmd:%02x response:%04x\n", cmd, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ static void ads7843e_notify(FAR struct ads7843e_dev_s *priv)
|
||||
if (fds)
|
||||
{
|
||||
fds->revents |= POLLIN;
|
||||
ivdbg("Report events: %02x\n", fds->revents);
|
||||
iinfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
@@ -416,7 +416,7 @@ static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv,
|
||||
{
|
||||
/* Wait for a change in the ADS7843E state */
|
||||
|
||||
ivdbg("Waiting..\n");
|
||||
iinfo("Waiting..\n");
|
||||
priv->nwaiters++;
|
||||
ret = sem_wait(&priv->waitsem);
|
||||
priv->nwaiters--;
|
||||
@@ -434,7 +434,7 @@ static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv,
|
||||
}
|
||||
}
|
||||
|
||||
ivdbg("Sampled\n");
|
||||
iinfo("Sampled\n");
|
||||
|
||||
/* Re-acquire the semaphore that manages mutually exclusive access to
|
||||
* the device structure. We may have to wait here. But we have our sample.
|
||||
@@ -749,7 +749,7 @@ static int ads7843e_open(FAR struct file *filep)
|
||||
uint8_t tmp;
|
||||
int ret;
|
||||
|
||||
ivdbg("Opening\n");
|
||||
iinfo("Opening\n");
|
||||
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
@@ -791,7 +791,7 @@ errout_with_sem:
|
||||
sem_post(&priv->devsem);
|
||||
return ret;
|
||||
#else
|
||||
ivdbg("Opening\n");
|
||||
iinfo("Opening\n");
|
||||
return OK;
|
||||
#endif
|
||||
}
|
||||
@@ -807,7 +807,7 @@ static int ads7843e_close(FAR struct file *filep)
|
||||
FAR struct ads7843e_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
ivdbg("Closing\n");
|
||||
iinfo("Closing\n");
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -837,7 +837,7 @@ static int ads7843e_close(FAR struct file *filep)
|
||||
|
||||
sem_post(&priv->devsem);
|
||||
#endif
|
||||
ivdbg("Closing\n");
|
||||
iinfo("Closing\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -853,7 +853,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le
|
||||
struct ads7843e_sample_s sample;
|
||||
int ret;
|
||||
|
||||
ivdbg("buffer:%p len:%d\n", buffer, len);
|
||||
iinfo("buffer:%p len:%d\n", buffer, len);
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -896,7 +896,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le
|
||||
* option, then just return an error.
|
||||
*/
|
||||
|
||||
ivdbg("Sample data is not available\n");
|
||||
iinfo("Sample data is not available\n");
|
||||
if (filep->f_oflags & O_NONBLOCK)
|
||||
{
|
||||
ret = -EAGAIN;
|
||||
@@ -957,16 +957,16 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le
|
||||
report->point[0].flags = TOUCH_MOVE | TOUCH_ID_VALID | TOUCH_POS_VALID;
|
||||
}
|
||||
|
||||
ivdbg(" id: %d\n", report->point[0].id);
|
||||
ivdbg(" flags: %02x\n", report->point[0].flags);
|
||||
ivdbg(" x: %d\n", report->point[0].x);
|
||||
ivdbg(" y: %d\n", report->point[0].y);
|
||||
iinfo(" id: %d\n", report->point[0].id);
|
||||
iinfo(" flags: %02x\n", report->point[0].flags);
|
||||
iinfo(" x: %d\n", report->point[0].x);
|
||||
iinfo(" y: %d\n", report->point[0].y);
|
||||
|
||||
ret = SIZEOF_TOUCH_SAMPLE_S(1);
|
||||
|
||||
errout:
|
||||
sem_post(&priv->devsem);
|
||||
ivdbg("Returning: %d\n", ret);
|
||||
iinfo("Returning: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -980,7 +980,7 @@ static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct ads7843e_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
ivdbg("cmd: %d arg: %ld\n", cmd, arg);
|
||||
iinfo("cmd: %d arg: %ld\n", cmd, arg);
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -1040,7 +1040,7 @@ static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
ivdbg("setup: %d\n", (int)setup);
|
||||
iinfo("setup: %d\n", (int)setup);
|
||||
DEBUGASSERT(filep && fds);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -1156,7 +1156,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi,
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
ivdbg("spi: %p minor: %d\n", spi, minor);
|
||||
iinfo("spi: %p minor: %d\n", spi, minor);
|
||||
|
||||
/* Debug-only sanity checks */
|
||||
|
||||
@@ -1219,7 +1219,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi,
|
||||
/* Register the device as an input device */
|
||||
|
||||
(void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
ivdbg("Registering %s\n", devname);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &ads7843e_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
|
||||
+14
-14
@@ -352,7 +352,7 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv)
|
||||
fds->revents |= (fds->events & POLLIN);
|
||||
if (fds->revents != 0)
|
||||
{
|
||||
ivdbg("Report events: %02x\n", fds->revents);
|
||||
iinfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
@@ -414,7 +414,7 @@ static int ajoy_open(FAR struct file *filep)
|
||||
ret = ajoy_takesem(&priv->au_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ static int ajoy_open(FAR struct file *filep)
|
||||
opriv = (FAR struct ajoy_open_s *)kmm_zalloc(sizeof(struct ajoy_open_s));
|
||||
if (!opriv)
|
||||
{
|
||||
ivdbg("ERROR: Failled to allocate open structure\n");
|
||||
iinfo("ERROR: Failled to allocate open structure\n");
|
||||
ret = -ENOMEM;
|
||||
goto errout_with_sem;
|
||||
}
|
||||
@@ -502,7 +502,7 @@ static int ajoy_close(FAR struct file *filep)
|
||||
ret = ajoy_takesem(&priv->au_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ static int ajoy_close(FAR struct file *filep)
|
||||
DEBUGASSERT(curr);
|
||||
if (!curr)
|
||||
{
|
||||
ivdbg("ERROR: Failed to find open entry\n");
|
||||
iinfo("ERROR: Failed to find open entry\n");
|
||||
ret = -ENOENT;
|
||||
goto errout_with_exclsem;
|
||||
}
|
||||
@@ -570,7 +570,7 @@ static ssize_t ajoy_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
if (len < sizeof(struct ajoy_sample_s))
|
||||
{
|
||||
ivdbg("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||
iinfo("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ static ssize_t ajoy_read(FAR struct file *filep, FAR char *buffer,
|
||||
ret = ajoy_takesem(&priv->au_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -620,7 +620,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
ret = ajoy_takesem(&priv->au_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
#endif
|
||||
|
||||
default:
|
||||
ivdbg("ERROR: Unrecognized command: %ld\n", cmd);
|
||||
iinfo("ERROR: Unrecognized command: %ld\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
@@ -754,7 +754,7 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
ret = ajoy_takesem(&priv->au_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: ajoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -782,7 +782,7 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
|
||||
if (i >= CONFIG_AJOYSTICK_NPOLLWAITERS)
|
||||
{
|
||||
ivdbg("ERROR: Too man poll waiters\n");
|
||||
iinfo("ERROR: Too man poll waiters\n");
|
||||
fds->priv = NULL;
|
||||
ret = -EBUSY;
|
||||
goto errout_with_dusem;
|
||||
@@ -797,7 +797,7 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!slot)
|
||||
{
|
||||
ivdbg("ERROR: Poll slot not found\n");
|
||||
iinfo("ERROR: Poll slot not found\n");
|
||||
ret = -EIO;
|
||||
goto errout_with_dusem;
|
||||
}
|
||||
@@ -856,7 +856,7 @@ int ajoy_register(FAR const char *devname,
|
||||
|
||||
if (!priv)
|
||||
{
|
||||
ivdbg("ERROR: Failed to allocate device structure\n");
|
||||
iinfo("ERROR: Failed to allocate device structure\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -878,7 +878,7 @@ int ajoy_register(FAR const char *devname,
|
||||
ret = register_driver(devname, &ajoy_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: register_driver failed: %d\n", ret);
|
||||
iinfo("ERROR: register_driver failed: %d\n", ret);
|
||||
goto errout_with_priv;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ static FAR void *g_btnarg;
|
||||
|
||||
static btn_buttonset_t btn_supported(FAR const struct btn_lowerhalf_s *lower)
|
||||
{
|
||||
ivdbg("NUM_BUTTONS: %02x\n", NUM_BUTTONS);
|
||||
iinfo("NUM_BUTTONS: %02x\n", NUM_BUTTONS);
|
||||
return (btn_buttonset_t)((1 << NUM_BUTTONS) - 1);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ static void btn_enable(FAR const struct btn_lowerhalf_s *lower,
|
||||
flags = enter_critical_section();
|
||||
btn_disable();
|
||||
|
||||
illvdbg("press: %02x release: %02x handler: %p arg: %p\n",
|
||||
illinfo("press: %02x release: %02x handler: %p arg: %p\n",
|
||||
press, release, handler, arg);
|
||||
|
||||
/* If no events are indicated or if no handler is provided, then this
|
||||
|
||||
@@ -348,7 +348,7 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv)
|
||||
fds->revents |= (fds->events & POLLIN);
|
||||
if (fds->revents != 0)
|
||||
{
|
||||
ivdbg("Report events: %02x\n", fds->revents);
|
||||
iinfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
@@ -410,7 +410,7 @@ static int btn_open(FAR struct file *filep)
|
||||
ret = btn_takesem(&priv->bu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: btn_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: btn_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -419,7 +419,7 @@ static int btn_open(FAR struct file *filep)
|
||||
opriv = (FAR struct btn_open_s *)kmm_zalloc(sizeof(struct btn_open_s));
|
||||
if (!opriv)
|
||||
{
|
||||
ivdbg("ERROR: Failled to allocate open structure\n");
|
||||
iinfo("ERROR: Failled to allocate open structure\n");
|
||||
ret = -ENOMEM;
|
||||
goto errout_with_sem;
|
||||
}
|
||||
@@ -498,7 +498,7 @@ static int btn_close(FAR struct file *filep)
|
||||
ret = btn_takesem(&priv->bu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: btn_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: btn_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@ static int btn_close(FAR struct file *filep)
|
||||
DEBUGASSERT(curr);
|
||||
if (!curr)
|
||||
{
|
||||
ivdbg("ERROR: Failed to find open entry\n");
|
||||
iinfo("ERROR: Failed to find open entry\n");
|
||||
ret = -ENOENT;
|
||||
goto errout_with_exclsem;
|
||||
}
|
||||
@@ -566,7 +566,7 @@ static ssize_t btn_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
if (len < sizeof(btn_buttonset_t))
|
||||
{
|
||||
ivdbg("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||
iinfo("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ static ssize_t btn_read(FAR struct file *filep, FAR char *buffer,
|
||||
ret = btn_takesem(&priv->bu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: btn_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: btn_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -612,7 +612,7 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
ret = btn_takesem(&priv->bu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: btn_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: btn_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -712,7 +712,7 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
#endif
|
||||
|
||||
default:
|
||||
ivdbg("ERROR: Unrecognized command: %ld\n", cmd);
|
||||
iinfo("ERROR: Unrecognized command: %ld\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
@@ -746,7 +746,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
ret = btn_takesem(&priv->bu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: btn_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: btn_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -774,7 +774,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
|
||||
if (i >= CONFIG_BUTTONS_NPOLLWAITERS)
|
||||
{
|
||||
ivdbg("ERROR: Too man poll waiters\n");
|
||||
iinfo("ERROR: Too man poll waiters\n");
|
||||
fds->priv = NULL;
|
||||
ret = -EBUSY;
|
||||
goto errout_with_dusem;
|
||||
@@ -789,7 +789,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!slot)
|
||||
{
|
||||
ivdbg("ERROR: Poll slot not found\n");
|
||||
iinfo("ERROR: Poll slot not found\n");
|
||||
ret = -EIO;
|
||||
goto errout_with_dusem;
|
||||
}
|
||||
@@ -847,7 +847,7 @@ int btn_register(FAR const char *devname,
|
||||
|
||||
if (!priv)
|
||||
{
|
||||
ivdbg("ERROR: Failed to allocate device structure\n");
|
||||
iinfo("ERROR: Failed to allocate device structure\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -869,7 +869,7 @@ int btn_register(FAR const char *devname,
|
||||
ret = register_driver(devname, &btn_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: register_driver failed: %d\n", ret);
|
||||
iinfo("ERROR: register_driver failed: %d\n", ret);
|
||||
goto errout_with_priv;
|
||||
}
|
||||
|
||||
|
||||
+14
-14
@@ -352,7 +352,7 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)
|
||||
fds->revents |= (fds->events & POLLIN);
|
||||
if (fds->revents != 0)
|
||||
{
|
||||
illvdbg("Report events: %02x\n", fds->revents);
|
||||
illinfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
@@ -414,7 +414,7 @@ static int djoy_open(FAR struct file *filep)
|
||||
ret = djoy_takesem(&priv->du_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ static int djoy_open(FAR struct file *filep)
|
||||
opriv = (FAR struct djoy_open_s *)kmm_zalloc(sizeof(struct djoy_open_s));
|
||||
if (!opriv)
|
||||
{
|
||||
ivdbg("ERROR: Failled to allocate open structure\n");
|
||||
iinfo("ERROR: Failled to allocate open structure\n");
|
||||
ret = -ENOMEM;
|
||||
goto errout_with_sem;
|
||||
}
|
||||
@@ -502,7 +502,7 @@ static int djoy_close(FAR struct file *filep)
|
||||
ret = djoy_takesem(&priv->du_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -515,7 +515,7 @@ static int djoy_close(FAR struct file *filep)
|
||||
DEBUGASSERT(curr);
|
||||
if (!curr)
|
||||
{
|
||||
ivdbg("ERROR: Failed to find open entry\n");
|
||||
iinfo("ERROR: Failed to find open entry\n");
|
||||
ret = -ENOENT;
|
||||
goto errout_with_exclsem;
|
||||
}
|
||||
@@ -568,7 +568,7 @@ static ssize_t djoy_read(FAR struct file *filep, FAR char *buffer,
|
||||
|
||||
if (len < sizeof(djoy_buttonset_t))
|
||||
{
|
||||
ivdbg("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||
iinfo("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -577,7 +577,7 @@ static ssize_t djoy_read(FAR struct file *filep, FAR char *buffer,
|
||||
ret = djoy_takesem(&priv->du_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
ret = djoy_takesem(&priv->du_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -716,7 +716,7 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
#endif
|
||||
|
||||
default:
|
||||
ivdbg("ERROR: Unrecognized command: %ld\n", cmd);
|
||||
iinfo("ERROR: Unrecognized command: %ld\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
@@ -750,7 +750,7 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
ret = djoy_takesem(&priv->du_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
iinfo("ERROR: djoy_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -778,7 +778,7 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
|
||||
if (i >= CONFIG_DJOYSTICK_NPOLLWAITERS)
|
||||
{
|
||||
ivdbg("ERROR: Too man poll waiters\n");
|
||||
iinfo("ERROR: Too man poll waiters\n");
|
||||
fds->priv = NULL;
|
||||
ret = -EBUSY;
|
||||
goto errout_with_dusem;
|
||||
@@ -793,7 +793,7 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!slot)
|
||||
{
|
||||
ivdbg("ERROR: Poll slot not found\n");
|
||||
iinfo("ERROR: Poll slot not found\n");
|
||||
ret = -EIO;
|
||||
goto errout_with_dusem;
|
||||
}
|
||||
@@ -852,7 +852,7 @@ int djoy_register(FAR const char *devname,
|
||||
|
||||
if (!priv)
|
||||
{
|
||||
ivdbg("ERROR: Failed to allocate device structure\n");
|
||||
iinfo("ERROR: Failed to allocate device structure\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -874,7 +874,7 @@ int djoy_register(FAR const char *devname,
|
||||
ret = register_driver(devname, &djoy_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
ivdbg("ERROR: register_driver failed: %d\n", ret);
|
||||
iinfo("ERROR: register_driver failed: %d\n", ret);
|
||||
sem_destroy(&priv->du_exclsem);
|
||||
kmm_free(priv);
|
||||
}
|
||||
|
||||
+24
-24
@@ -244,7 +244,7 @@ static uint16_t max11802_sendcmd(FAR struct max11802_dev_s *priv,
|
||||
*tags = result & 0xF;
|
||||
result >>= 4; /* Get rid of tags */
|
||||
|
||||
ivdbg("cmd:%02x response:%04x\n", cmd, result);
|
||||
iinfo("cmd:%02x response:%04x\n", cmd, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -284,7 +284,7 @@ static void max11802_notify(FAR struct max11802_dev_s *priv)
|
||||
if (fds)
|
||||
{
|
||||
fds->revents |= POLLIN;
|
||||
ivdbg("Report events: %02x\n", fds->revents);
|
||||
iinfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
@@ -381,7 +381,7 @@ static int max11802_waitsample(FAR struct max11802_dev_s *priv,
|
||||
{
|
||||
/* Wait for a change in the MAX11802 state */
|
||||
|
||||
ivdbg("Waiting..\n");
|
||||
iinfo("Waiting..\n");
|
||||
priv->nwaiters++;
|
||||
ret = sem_wait(&priv->waitsem);
|
||||
priv->nwaiters--;
|
||||
@@ -399,7 +399,7 @@ static int max11802_waitsample(FAR struct max11802_dev_s *priv,
|
||||
}
|
||||
}
|
||||
|
||||
ivdbg("Sampled\n");
|
||||
iinfo("Sampled\n");
|
||||
|
||||
/* Re-acquire the semaphore that manages mutually exclusive access to
|
||||
* the device structure. We may have to wait here. But we have our
|
||||
@@ -540,11 +540,11 @@ static void max11802_worker(FAR void *arg)
|
||||
|
||||
if (pendown)
|
||||
{
|
||||
ivdbg("\nPD\n");
|
||||
iinfo("\nPD\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
ivdbg("\nPU\n");
|
||||
iinfo("\nPU\n");
|
||||
}
|
||||
|
||||
if (!pendown)
|
||||
@@ -559,7 +559,7 @@ static void max11802_worker(FAR void *arg)
|
||||
* reported).
|
||||
*/
|
||||
|
||||
ivdbg("\nPC%d\n", priv->sample.contact);
|
||||
iinfo("\nPC%d\n", priv->sample.contact);
|
||||
|
||||
if (priv->sample.contact == CONTACT_NONE ||
|
||||
priv->sample.contact == CONTACT_UP)
|
||||
@@ -589,7 +589,7 @@ static void max11802_worker(FAR void *arg)
|
||||
* again later.
|
||||
*/
|
||||
|
||||
ivdbg("Previous pen up event still in buffer\n");
|
||||
iinfo("Previous pen up event still in buffer\n");
|
||||
max11802_notify(priv);
|
||||
wd_start(priv->wdog, MAX11802_WDOG_DELAY, max11802_wdog, 1,
|
||||
(uint32_t)priv);
|
||||
@@ -636,7 +636,7 @@ static void max11802_worker(FAR void *arg)
|
||||
|
||||
if ((tags & 0x03) != 0)
|
||||
{
|
||||
ivdbg("Touch ended before measurement\n");
|
||||
iinfo("Touch ended before measurement\n");
|
||||
goto ignored;
|
||||
}
|
||||
|
||||
@@ -755,7 +755,7 @@ static int max11802_open(FAR struct file *filep)
|
||||
uint8_t tmp;
|
||||
int ret;
|
||||
|
||||
ivdbg("Opening\n");
|
||||
iinfo("Opening\n");
|
||||
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
@@ -797,7 +797,7 @@ errout_with_sem:
|
||||
sem_post(&priv->devsem);
|
||||
return ret;
|
||||
#else
|
||||
ivdbg("Opening\n");
|
||||
iinfo("Opening\n");
|
||||
return OK;
|
||||
#endif
|
||||
}
|
||||
@@ -813,7 +813,7 @@ static int max11802_close(FAR struct file *filep)
|
||||
FAR struct max11802_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
ivdbg("Closing\n");
|
||||
iinfo("Closing\n");
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -843,7 +843,7 @@ static int max11802_close(FAR struct file *filep)
|
||||
|
||||
sem_post(&priv->devsem);
|
||||
#endif
|
||||
ivdbg("Closing\n");
|
||||
iinfo("Closing\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -860,7 +860,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer,
|
||||
struct max11802_sample_s sample;
|
||||
int ret;
|
||||
|
||||
ivdbg("buffer:%p len:%d\n", buffer, len);
|
||||
iinfo("buffer:%p len:%d\n", buffer, len);
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -903,7 +903,7 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer,
|
||||
* option, then just return an error.
|
||||
*/
|
||||
|
||||
ivdbg("Sample data is not available\n");
|
||||
iinfo("Sample data is not available\n");
|
||||
if (filep->f_oflags & O_NONBLOCK)
|
||||
{
|
||||
ret = -EAGAIN;
|
||||
@@ -964,16 +964,16 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer,
|
||||
report->point[0].flags = TOUCH_MOVE | TOUCH_ID_VALID | TOUCH_POS_VALID;
|
||||
}
|
||||
|
||||
ivdbg(" id: %d\n", report->point[0].id);
|
||||
ivdbg(" flags: %02x\n", report->point[0].flags);
|
||||
ivdbg(" x: %d\n", report->point[0].x);
|
||||
ivdbg(" y: %d\n", report->point[0].y);
|
||||
iinfo(" id: %d\n", report->point[0].id);
|
||||
iinfo(" flags: %02x\n", report->point[0].flags);
|
||||
iinfo(" x: %d\n", report->point[0].x);
|
||||
iinfo(" y: %d\n", report->point[0].y);
|
||||
|
||||
ret = SIZEOF_TOUCH_SAMPLE_S(1);
|
||||
|
||||
errout:
|
||||
sem_post(&priv->devsem);
|
||||
ivdbg("Returning: %d\n", ret);
|
||||
iinfo("Returning: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -987,7 +987,7 @@ static int max11802_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct max11802_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
ivdbg("cmd: %d arg: %ld\n", cmd, arg);
|
||||
iinfo("cmd: %d arg: %ld\n", cmd, arg);
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -1047,7 +1047,7 @@ static int max11802_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
ivdbg("setup: %d\n", (int)setup);
|
||||
iinfo("setup: %d\n", (int)setup);
|
||||
DEBUGASSERT(filep && fds);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -1159,7 +1159,7 @@ int max11802_register(FAR struct spi_dev_s *spi,
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
ivdbg("spi: %p minor: %d\n", spi, minor);
|
||||
iinfo("spi: %p minor: %d\n", spi, minor);
|
||||
|
||||
/* Debug-only sanity checks */
|
||||
|
||||
@@ -1253,7 +1253,7 @@ int max11802_register(FAR struct spi_dev_s *spi,
|
||||
/* Register the device as an input device */
|
||||
|
||||
(void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
ivdbg("Registering %s\n", devname);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &max11802_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
|
||||
+13
-13
@@ -312,7 +312,7 @@ static int mxt_getreg(FAR struct mxt_dev_s *priv, uint16_t regaddr,
|
||||
|
||||
for (retries = 1; retries <= 3; retries++)
|
||||
{
|
||||
ivdbg("retries=%d regaddr=%04x buflen=%d\n", retries, regaddr, buflen);
|
||||
iinfo("retries=%d regaddr=%04x buflen=%d\n", retries, regaddr, buflen);
|
||||
|
||||
/* Set up to write the address */
|
||||
|
||||
@@ -386,7 +386,7 @@ static int mxt_putreg(FAR struct mxt_dev_s *priv, uint16_t regaddr,
|
||||
|
||||
for (retries = 1; retries <= 3; retries++)
|
||||
{
|
||||
ivdbg("retries=%d regaddr=%04x buflen=%d\n", retries, regaddr, buflen);
|
||||
iinfo("retries=%d regaddr=%04x buflen=%d\n", retries, regaddr, buflen);
|
||||
|
||||
/* Set up to write the address */
|
||||
|
||||
@@ -611,7 +611,7 @@ static void mxt_notify(FAR struct mxt_dev_s *priv)
|
||||
if (fds)
|
||||
{
|
||||
fds->revents |= POLLIN;
|
||||
ivdbg("Report events: %02x\n", fds->revents);
|
||||
iinfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
@@ -796,7 +796,7 @@ static void mxt_touch_event(FAR struct mxt_dev_s *priv,
|
||||
pressure = msg->body[5];
|
||||
|
||||
status = msg->body[0];
|
||||
ivdbg("ndx=%u status=%02x pos(%u,%u) area=%u pressure=%u\n",
|
||||
iinfo("ndx=%u status=%02x pos(%u,%u) area=%u pressure=%u\n",
|
||||
ndx, status, x, y, area, pressure);
|
||||
|
||||
/* The normal sequence that we would see for a touch would be something
|
||||
@@ -1017,7 +1017,7 @@ static void mxt_worker(FAR void *arg)
|
||||
((uint32_t)msg.body[2] << 8) |
|
||||
((uint32_t)msg.body[3] << 16);
|
||||
|
||||
ivdbg("T6: status: %02x checksum: %06lx\n",
|
||||
iinfo("T6: status: %02x checksum: %06lx\n",
|
||||
status, (unsigned long)chksum);
|
||||
|
||||
retries = 0;
|
||||
@@ -1049,7 +1049,7 @@ static void mxt_worker(FAR void *arg)
|
||||
|
||||
else if (msg.id != 0xff)
|
||||
{
|
||||
ivdbg("Ignored: id=%u message={%02x %02x %02x %02x %02x %02x %02x}\n",
|
||||
iinfo("Ignored: id=%u message={%02x %02x %02x %02x %02x %02x %02x}\n",
|
||||
msg.id, msg.body[0], msg.body[1], msg.body[2], msg.body[3],
|
||||
msg.body[4], msg.body[5], msg.body[6]);
|
||||
|
||||
@@ -1490,7 +1490,7 @@ static int mxt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct mxt_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
ivdbg("cmd: %d arg: %ld\n", cmd, arg);
|
||||
iinfo("cmd: %d arg: %ld\n", cmd, arg);
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -1551,7 +1551,7 @@ static int mxt_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
ivdbg("setup: %d\n", (int)setup);
|
||||
iinfo("setup: %d\n", (int)setup);
|
||||
DEBUGASSERT(filep && fds);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -1697,7 +1697,7 @@ static int mxt_getobjtab(FAR struct mxt_dev_s *priv)
|
||||
idmax = 0;
|
||||
}
|
||||
|
||||
ivdbg("%2d. type %2d addr %04x size: %d instances: %d IDs: %u-%u\n",
|
||||
iinfo("%2d. type %2d addr %04x size: %d instances: %d IDs: %u-%u\n",
|
||||
i, object->type, MXT_GETUINT16(object->addr), object->size + 1,
|
||||
object->ninstances + 1, idmin, idmax);
|
||||
|
||||
@@ -1799,10 +1799,10 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv)
|
||||
|
||||
info->ysize = regval;
|
||||
|
||||
ivdbg("Family: %u variant: %u version: %u.%u.%02x\n",
|
||||
iinfo("Family: %u variant: %u version: %u.%u.%02x\n",
|
||||
info->family, info->variant, info->version >> 4, info->version & 0x0f,
|
||||
info->build);
|
||||
ivdbg("Matrix size: (%u,%u) objects: %u\n",
|
||||
iinfo("Matrix size: (%u,%u) objects: %u\n",
|
||||
info->xsize, info->ysize, info->nobjects);
|
||||
|
||||
/* How many multi touch "slots" */
|
||||
@@ -1863,7 +1863,7 @@ int mxt_register(FAR struct i2c_master_s *i2c,
|
||||
char devname[DEV_NAMELEN];
|
||||
int ret;
|
||||
|
||||
ivdbg("i2c: %p minor: %d\n", i2c, minor);
|
||||
iinfo("i2c: %p minor: %d\n", i2c, minor);
|
||||
|
||||
/* Debug-only sanity checks */
|
||||
|
||||
@@ -1913,7 +1913,7 @@ int mxt_register(FAR struct i2c_master_s *i2c,
|
||||
/* Register the device as an input device */
|
||||
|
||||
(void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
ivdbg("Registering %s\n", devname);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &mxt_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
|
||||
@@ -226,7 +226,7 @@ static int stmpe811_checkid(FAR struct stmpe811_dev_s *priv)
|
||||
devid = stmpe811_getreg8(priv, STMPE811_CHIP_ID);
|
||||
devid = (uint32_t)(devid << 8);
|
||||
devid |= (uint32_t)stmpe811_getreg8(priv, STMPE811_CHIP_ID+1);
|
||||
ivdbg("devid: %04x\n", devid);
|
||||
iinfo("devid: %04x\n", devid);
|
||||
|
||||
if (devid != (uint16_t)CHIP_ID)
|
||||
{
|
||||
|
||||
@@ -196,7 +196,7 @@ static void stmpe811_notify(FAR struct stmpe811_dev_s *priv)
|
||||
if (fds)
|
||||
{
|
||||
fds->revents |= POLLIN;
|
||||
ivdbg("Report events: %02x\n", fds->revents);
|
||||
iinfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
@@ -464,7 +464,7 @@ static ssize_t stmpe811_read(FAR struct file *filep, FAR char *buffer, size_t le
|
||||
struct stmpe811_sample_s sample;
|
||||
int ret;
|
||||
|
||||
ivdbg("len=%d\n", len);
|
||||
iinfo("len=%d\n", len);
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -589,7 +589,7 @@ static int stmpe811_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct stmpe811_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
ivdbg("cmd: %d arg: %ld\n", cmd, arg);
|
||||
iinfo("cmd: %d arg: %ld\n", cmd, arg);
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -653,7 +653,7 @@ static int stmpe811_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
ivdbg("setup: %d\n", (int)setup);
|
||||
iinfo("setup: %d\n", (int)setup);
|
||||
DEBUGASSERT(filep && fds);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -805,7 +805,7 @@ static inline void stmpe811_tscinitialize(FAR struct stmpe811_dev_s *priv)
|
||||
{
|
||||
uint8_t regval;
|
||||
|
||||
ivdbg("Initializing touchscreen controller\n");
|
||||
iinfo("Initializing touchscreen controller\n");
|
||||
|
||||
/* Enable TSC and ADC functions */
|
||||
|
||||
@@ -898,7 +898,7 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor)
|
||||
char devname[DEV_NAMELEN];
|
||||
int ret;
|
||||
|
||||
ivdbg("handle=%p minor=%d\n", handle, minor);
|
||||
iinfo("handle=%p minor=%d\n", handle, minor);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the device structure */
|
||||
|
||||
@@ -278,7 +278,7 @@ static void tsc2007_notify(FAR struct tsc2007_dev_s *priv)
|
||||
if (fds)
|
||||
{
|
||||
fds->revents |= POLLIN;
|
||||
ivdbg("Report events: %02x\n", fds->revents);
|
||||
iinfo("Report events: %02x\n", fds->revents);
|
||||
sem_post(fds->sem);
|
||||
}
|
||||
}
|
||||
@@ -550,7 +550,7 @@ static int tsc2007_transfer(FAR struct tsc2007_dev_s *priv, uint8_t cmd)
|
||||
*/
|
||||
|
||||
ret = (unsigned int)data12[0] << 4 | (unsigned int)data12[1] >> 4;
|
||||
ivdbg("data: 0x%04x\n", ret);
|
||||
iinfo("data: 0x%04x\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ static void tsc2007_worker(FAR void *arg)
|
||||
pressure = (x * config->rxplate * (z2 - z1)) / z1;
|
||||
pressure = (pressure + 2048) >> 12;
|
||||
|
||||
ivdbg("Position: (%d,%4d) pressure: %u z1/2: (%d,%d)\n",
|
||||
iinfo("Position: (%d,%4d) pressure: %u z1/2: (%d,%d)\n",
|
||||
x, y, pressure, z1, z2);
|
||||
|
||||
/* Ignore out of range caculcations */
|
||||
@@ -1031,7 +1031,7 @@ static int tsc2007_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct tsc2007_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
ivdbg("cmd: %d arg: %ld\n", cmd, arg);
|
||||
iinfo("cmd: %d arg: %ld\n", cmd, arg);
|
||||
DEBUGASSERT(filep);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -1107,7 +1107,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
ivdbg("setup: %d\n", (int)setup);
|
||||
iinfo("setup: %d\n", (int)setup);
|
||||
DEBUGASSERT(filep && fds);
|
||||
inode = filep->f_inode;
|
||||
|
||||
@@ -1225,7 +1225,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
#endif
|
||||
int ret;
|
||||
|
||||
ivdbg("dev: %p minor: %d\n", dev, minor);
|
||||
iinfo("dev: %p minor: %d\n", dev, minor);
|
||||
|
||||
/* Debug-only sanity checks */
|
||||
|
||||
@@ -1283,7 +1283,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev,
|
||||
/* Register the device as an input device */
|
||||
|
||||
(void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
|
||||
ivdbg("Registering %s\n", devname);
|
||||
iinfo("Registering %s\n", devname);
|
||||
|
||||
ret = register_driver(devname, &tsc2007_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
|
||||
+11
-11
@@ -371,10 +371,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg dbg
|
||||
# define lcdvdbg vdbg
|
||||
# define lcdinfo info
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -791,11 +791,11 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
|
||||
|
||||
/* Reset the lcd display to the default state */
|
||||
|
||||
lcdvdbg("ili9341 LCD driver: Software Reset\n");
|
||||
lcdinfo("ili9341 LCD driver: Software Reset\n");
|
||||
lcd->sendcmd(lcd, ILI9341_SOFTWARE_RESET);
|
||||
up_mdelay(5);
|
||||
|
||||
lcdvdbg("ili9341 LCD driver: set Memory Access Control: %04x\n", dev->orient);
|
||||
lcdinfo("ili9341 LCD driver: set Memory Access Control: %04x\n", dev->orient);
|
||||
lcd->sendcmd(lcd, ILI9341_MEMORY_ACCESS_CONTROL);
|
||||
lcd->sendparam(lcd, dev->orient);
|
||||
|
||||
@@ -809,13 +809,13 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
|
||||
|
||||
/* 16 bit RGB565 */
|
||||
|
||||
lcdvdbg("ili9341 LCD driver: Set Pixel Format: %04x\n",
|
||||
lcdinfo("ili9341 LCD driver: Set Pixel Format: %04x\n",
|
||||
ILI9341_PIXSET_16BITMCU_PARAM1);
|
||||
lcd->sendparam(lcd, ILI9341_PIXSET_16BITMCU_PARAM1);
|
||||
|
||||
/* 18 bit RGB666, add settings here */
|
||||
|
||||
lcdvdbg("ili9341 LCD driver: Set Interface control\n");
|
||||
lcdinfo("ili9341 LCD driver: Set Interface control\n");
|
||||
lcd->sendcmd(lcd, ILI9341_INTERFACE_CONTROL);
|
||||
lcd->sendparam(lcd, ILI9341_IFCTL_PARAM1);
|
||||
lcd->sendparam(lcd, ILI9341_IFCTL_PARAM2);
|
||||
@@ -823,7 +823,7 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
|
||||
|
||||
/* Sleep out */
|
||||
|
||||
lcdvdbg("ili9341 LCD driver: Sleep Out\n");
|
||||
lcdinfo("ili9341 LCD driver: Sleep Out\n");
|
||||
lcd->sendcmd(lcd, ILI9341_SLEEP_OUT);
|
||||
up_mdelay(120);
|
||||
|
||||
@@ -948,7 +948,7 @@ static int ili9341_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
vinfo->yres = ili9341_getyres(priv);
|
||||
vinfo->nplanes = 1;
|
||||
|
||||
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
vinfo->fmt, vinfo->xres, vinfo->yres, vinfo->nplanes);
|
||||
|
||||
return OK;
|
||||
@@ -989,7 +989,7 @@ static int ili9341_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
pinfo->bpp = priv->bpp;
|
||||
pinfo->buffer = (FAR uint8_t *)priv->runbuffer; /* Run scratch buffer */
|
||||
|
||||
lcdvdbg("planeno: %d bpp: %d\n", planeno, pinfo->bpp);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, pinfo->bpp);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -1103,7 +1103,7 @@ static int ili9341_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
|
||||
static int ili9341_getcontrast(struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("Not implemented\n");
|
||||
lcdinfo("Not implemented\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -1125,7 +1125,7 @@ static int ili9341_getcontrast(struct lcd_dev_s *dev)
|
||||
|
||||
static int ili9341_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
lcdvdbg("contrast: %d\n", contrast);
|
||||
lcdinfo("contrast: %d\n", contrast);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
|
||||
@@ -113,10 +113,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -408,7 +408,7 @@ static int memlcd_putrun(fb_coord_t row, fb_coord_t col,
|
||||
int i;
|
||||
|
||||
DEBUGASSERT(buffer);
|
||||
lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
|
||||
#ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
usrmask = MS_BIT;
|
||||
@@ -499,7 +499,7 @@ static int memlcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer,
|
||||
int i;
|
||||
|
||||
DEBUGASSERT(buffer);
|
||||
lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
|
||||
#ifdef CONFIG_NX_PACKEDMSFIRST
|
||||
usrmask = MS_BIT;
|
||||
@@ -557,7 +557,7 @@ static int memlcd_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres,
|
||||
g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
@@ -576,7 +576,7 @@ static int memlcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(pinfo && planeno == 0);
|
||||
lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
|
||||
+11
-11
@@ -241,10 +241,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg dbg
|
||||
# define lcdvdbg vdbg
|
||||
# define lcdinfo info
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
/**************************************************************************************
|
||||
@@ -534,7 +534,7 @@ static int mio283qt2_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *b
|
||||
|
||||
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
||||
|
||||
lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
|
||||
|
||||
/* Select the LCD */
|
||||
@@ -584,7 +584,7 @@ static int mio283qt2_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
|
||||
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
||||
|
||||
lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
|
||||
|
||||
/* Select the LCD */
|
||||
@@ -632,7 +632,7 @@ static int mio283qt2_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n",
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: 1\n",
|
||||
MIO283QT2_COLORFMT, MIO283QT2_XRES, MIO283QT2_XRES);
|
||||
|
||||
vinfo->fmt = MIO283QT2_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */
|
||||
@@ -656,7 +656,7 @@ static int mio283qt2_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planen
|
||||
FAR struct mio283qt2_dev_s *priv = (FAR struct mio283qt2_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
lcdvdbg("planeno: %d bpp: %d\n", planeno, MIO283QT2_BPP);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, MIO283QT2_BPP);
|
||||
|
||||
pinfo->putrun = mio283qt2_putrun; /* Put a run into LCD memory */
|
||||
pinfo->getrun = mio283qt2_getrun; /* Get a run from LCD memory */
|
||||
@@ -676,7 +676,7 @@ static int mio283qt2_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planen
|
||||
|
||||
static int mio283qt2_getpower(FAR struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("power: %d\n", 0);
|
||||
lcdinfo("power: %d\n", 0);
|
||||
return g_lcddev.power;
|
||||
}
|
||||
|
||||
@@ -727,7 +727,7 @@ static int mio283qt2_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
FAR struct mio283qt2_dev_s *priv = (FAR struct mio283qt2_dev_s *)dev;
|
||||
FAR struct mio283qt2_lcd_s *lcd = priv->lcd;
|
||||
|
||||
lcdvdbg("power: %d\n", power);
|
||||
lcdinfo("power: %d\n", power);
|
||||
DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
|
||||
/* Set new power level */
|
||||
@@ -778,7 +778,7 @@ static int mio283qt2_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
|
||||
static int mio283qt2_getcontrast(FAR struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("Not implemented\n");
|
||||
lcdinfo("Not implemented\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -792,7 +792,7 @@ static int mio283qt2_getcontrast(FAR struct lcd_dev_s *dev)
|
||||
|
||||
static int mio283qt2_setcontrast(FAR struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
lcdvdbg("contrast: %d\n", contrast);
|
||||
lcdinfo("contrast: %d\n", contrast);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -955,7 +955,7 @@ FAR struct lcd_dev_s *mio283qt2_lcdinitialize(FAR struct mio283qt2_lcd_s *lcd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lcdvdbg("Initializing\n");
|
||||
lcdinfo("Initializing\n");
|
||||
|
||||
/* If we ccould support multiple MIO283QT2 devices, this is where we would allocate
|
||||
* a new driver data structure... but we can't. Why not? Because of a bad should
|
||||
|
||||
+20
-20
@@ -140,10 +140,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg dbg
|
||||
# define lcdvdbg vdbg
|
||||
# define lcdinfo info
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
/**************************************************************************************
|
||||
@@ -498,7 +498,7 @@ static int mio283qt9a_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer
|
||||
|
||||
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
||||
|
||||
lcdvdbg("mio283qt9a_getrun row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("mio283qt9a_getrun row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
|
||||
|
||||
/* Read the run from GRAM. */
|
||||
@@ -543,7 +543,7 @@ static int mio283qt9a_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n",
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: 1\n",
|
||||
MIO283QT9A_COLORFMT, MIO283QT9A_XRES, MIO283QT9A_YRES);
|
||||
|
||||
vinfo->fmt = MIO283QT9A_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */
|
||||
@@ -567,7 +567,7 @@ static int mio283qt9a_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int plane
|
||||
FAR struct mio283qt9a_dev_s *priv = (FAR struct mio283qt9a_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
lcdvdbg("planeno: %d bpp: %d\n", planeno, MIO283QT9A_BPP);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, MIO283QT9A_BPP);
|
||||
|
||||
pinfo->putrun = mio283qt9a_putrun; /* Put a run into LCD memory */
|
||||
pinfo->getrun = mio283qt9a_getrun; /* Get a run from LCD memory */
|
||||
@@ -588,7 +588,7 @@ static int mio283qt9a_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int plane
|
||||
|
||||
static int mio283qt9a_getpower(FAR struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("getpower: %d\n", 0);
|
||||
lcdinfo("getpower: %d\n", 0);
|
||||
return g_lcddev.power;
|
||||
}
|
||||
|
||||
@@ -604,7 +604,7 @@ static int mio283qt9a_getpower(FAR struct lcd_dev_s *dev)
|
||||
static int mio283qt9a_poweroff(FAR struct mio283qt9a_lcd_s *lcd)
|
||||
{
|
||||
/* Select the LCD */
|
||||
lcdvdbg("mio283qt9a_poweroff\n");
|
||||
lcdinfo("mio283qt9a_poweroff\n");
|
||||
|
||||
lcd->select(lcd);
|
||||
|
||||
@@ -640,7 +640,7 @@ static int mio283qt9a_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
FAR struct mio283qt9a_dev_s *priv = (FAR struct mio283qt9a_dev_s *)dev;
|
||||
FAR struct mio283qt9a_lcd_s *lcd = priv->lcd;
|
||||
|
||||
lcdvdbg("setpower: %d\n", power);
|
||||
lcdinfo("setpower: %d\n", power);
|
||||
DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
|
||||
/* Set new power level */
|
||||
@@ -687,7 +687,7 @@ static int mio283qt9a_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
|
||||
static int mio283qt9a_getcontrast(FAR struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("Not implemented\n");
|
||||
lcdinfo("Not implemented\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -701,7 +701,7 @@ static int mio283qt9a_getcontrast(FAR struct lcd_dev_s *dev)
|
||||
|
||||
static int mio283qt9a_setcontrast(FAR struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
lcdvdbg("contrast: %d\n", contrast);
|
||||
lcdinfo("contrast: %d\n", contrast);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -739,7 +739,7 @@ static inline int mio283qt9a_hwinitialize(FAR struct mio283qt9a_dev_s *priv)
|
||||
id_c = lcd->read(lcd);
|
||||
id_d = lcd->read(lcd);
|
||||
|
||||
lcdvdbg("LCD ID: %04x %04x %04x %04x\n", id_a, id_b, id_c, id_d);
|
||||
lcdinfo("LCD ID: %04x %04x %04x %04x\n", id_a, id_b, id_c, id_d);
|
||||
UNUSED(id_a);
|
||||
UNUSED(id_b);
|
||||
|
||||
@@ -781,38 +781,38 @@ static inline int mio283qt9a_hwinitialize(FAR struct mio283qt9a_dev_s *priv)
|
||||
id_b = lcd->read(lcd);
|
||||
id_c = lcd->read(lcd);
|
||||
id_d = lcd->read(lcd);
|
||||
lcdvdbg("LCD man ID: %02x, version: %02x, driver ID: %02x\n", id_b, id_c, id_d);
|
||||
lcdinfo("LCD man ID: %02x, version: %02x, driver ID: %02x\n", id_b, id_c, id_d);
|
||||
|
||||
id_a = mio283qt9a_readreg(lcd, 0x09); /* Read display status */
|
||||
id_b = lcd->read(lcd);
|
||||
id_c = lcd->read(lcd);
|
||||
id_d = lcd->read(lcd);
|
||||
id_e = lcd->read(lcd);
|
||||
lcdvdbg("Display status %02x, %02x, %02x, %02x, %02x\n", id_a, id_b, id_c, id_d, id_e);
|
||||
lcdinfo("Display status %02x, %02x, %02x, %02x, %02x\n", id_a, id_b, id_c, id_d, id_e);
|
||||
|
||||
id_a = mio283qt9a_readreg(lcd, 0x0a); /* Read power status */
|
||||
id_b = lcd->read(lcd);
|
||||
lcdvdbg("Power status %02x, %02x\n", id_a, id_b);
|
||||
lcdinfo("Power status %02x, %02x\n", id_a, id_b);
|
||||
|
||||
id_a = mio283qt9a_readreg(lcd, 0x0b); /* Read MADCTL */
|
||||
id_b = lcd->read(lcd);
|
||||
lcdvdbg("MADCTL %02x, %02x\n", id_a, id_b);
|
||||
lcdinfo("MADCTL %02x, %02x\n", id_a, id_b);
|
||||
|
||||
id_a = mio283qt9a_readreg(lcd, 0x0c); /* Read pixel format */
|
||||
id_b = lcd->read(lcd);
|
||||
lcdvdbg("Pixel format %02x, %02x\n", id_a, id_b);
|
||||
lcdinfo("Pixel format %02x, %02x\n", id_a, id_b);
|
||||
|
||||
id_a = mio283qt9a_readreg(lcd, 0x0d); /* Read image format */
|
||||
id_b = lcd->read(lcd);
|
||||
lcdvdbg("Image format %02x, %02x\n", id_a, id_b);
|
||||
lcdinfo("Image format %02x, %02x\n", id_a, id_b);
|
||||
|
||||
id_a = mio283qt9a_readreg(lcd, 0x0e); /* read signal mode */
|
||||
id_b = lcd->read(lcd);
|
||||
lcdvdbg("Signal mode %02x, %02x\n", id_a, id_b);
|
||||
lcdinfo("Signal mode %02x, %02x\n", id_a, id_b);
|
||||
|
||||
id_a = mio283qt9a_readreg(lcd, 0x0f); /* read self diag */
|
||||
id_b = lcd->read(lcd);
|
||||
lcdvdbg("Self diag %02x, %02x\n", id_a, id_b);
|
||||
lcdinfo("Self diag %02x, %02x\n", id_a, id_b);
|
||||
#endif
|
||||
ret = OK;
|
||||
}
|
||||
@@ -849,7 +849,7 @@ FAR struct lcd_dev_s *mio283qt9a_lcdinitialize(FAR struct mio283qt9a_lcd_s *lcd)
|
||||
FAR struct mio283qt9a_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
lcdvdbg("Initializing\n");
|
||||
lcdinfo("Initializing\n");
|
||||
|
||||
/* If we could support multiple MIO283QT9A devices, this is where we would allocate
|
||||
* a new driver data structure... but we can't. Why not? Because of a bad should
|
||||
|
||||
+10
-10
@@ -308,7 +308,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LCD_REGDEBUG
|
||||
# define lcddbg(format, ...) llvdbg(format, ##__VA_ARGS__)
|
||||
# define lcddbg(format, ...) llinfo(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
#endif
|
||||
@@ -866,7 +866,7 @@ static int nokia_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffe
|
||||
FAR struct spi_dev_s *spi = priv->spi;
|
||||
uint16_t cmd[3];
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
|
||||
#if NOKIA_XBIAS > 0
|
||||
col += NOKIA_XBIAS;
|
||||
@@ -917,7 +917,7 @@ static int nokia_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffe
|
||||
static int nokia_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
size_t npixels)
|
||||
{
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
|
||||
|
||||
/* At present, this is a write-only LCD driver */
|
||||
@@ -938,7 +938,7 @@ static int nokia_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
return OK;
|
||||
@@ -956,7 +956,7 @@ static int nokia_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@@ -973,7 +973,7 @@ static int nokia_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
static int nokia_getpower(struct lcd_dev_s *dev)
|
||||
{
|
||||
struct nokia_dev_s *priv = (struct nokia_dev_s *)dev;
|
||||
gvdbg("power: %d\n", priv->power);
|
||||
ginfo("power: %d\n", priv->power);
|
||||
return priv->power;
|
||||
}
|
||||
|
||||
@@ -991,7 +991,7 @@ static int nokia_setpower(struct lcd_dev_s *dev, int power)
|
||||
struct nokia_dev_s *priv = (struct nokia_dev_s *)dev;
|
||||
int ret;
|
||||
|
||||
gvdbg("power: %d\n", power);
|
||||
ginfo("power: %d\n", power);
|
||||
DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER);
|
||||
|
||||
/* Set new power level. The backlight power is controlled outside of the LCD
|
||||
@@ -1017,7 +1017,7 @@ static int nokia_setpower(struct lcd_dev_s *dev, int power)
|
||||
static int nokia_getcontrast(struct lcd_dev_s *dev)
|
||||
{
|
||||
struct nokia_dev_s *priv = (struct nokia_dev_s *)dev;
|
||||
gvdbg("contrast: %d\n", priv->contrast);
|
||||
ginfo("contrast: %d\n", priv->contrast);
|
||||
return priv->contrast;
|
||||
}
|
||||
|
||||
@@ -1056,7 +1056,7 @@ static int nokia_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
#endif
|
||||
}
|
||||
|
||||
gvdbg("contrast: %d\n", contrast);
|
||||
ginfo("contrast: %d\n", contrast);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -1169,7 +1169,7 @@ FAR struct lcd_dev_s *nokia_lcdinitialize(FAR struct spi_dev_s *spi, unsigned in
|
||||
{
|
||||
struct nokia_dev_s *priv = &g_lcddev;
|
||||
|
||||
gvdbg("Initializing\n");
|
||||
ginfo("Initializing\n");
|
||||
DEBUGASSERT(devno == 0);
|
||||
|
||||
/* Initialize the driver data structure */
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LCD_RITDEBUG
|
||||
# define ritdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define ritdbg(format, ...) info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define ritdbg(x...)
|
||||
#endif
|
||||
@@ -990,7 +990,7 @@ static int rit_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
return OK;
|
||||
@@ -1008,7 +1008,7 @@ static int rit_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(pinfo && planeno == 0);
|
||||
gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@@ -1027,7 +1027,7 @@ static int rit_getpower(FAR struct lcd_dev_s *dev)
|
||||
FAR struct rit_dev_s *priv = (FAR struct rit_dev_s *)dev;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
gvdbg("power: %s\n", priv->on ? "ON" : "OFF");
|
||||
ginfo("power: %s\n", priv->on ? "ON" : "OFF");
|
||||
return priv->on ? CONFIG_LCD_MAXPOWER : 0;
|
||||
}
|
||||
|
||||
@@ -1045,7 +1045,7 @@ static int rit_setpower(struct lcd_dev_s *dev, int power)
|
||||
struct rit_dev_s *priv = (struct rit_dev_s *)dev;
|
||||
DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER && priv->spi);
|
||||
|
||||
gvdbg("power: %d\n", power);
|
||||
ginfo("power: %d\n", power);
|
||||
|
||||
/* Select the SD1329 controller */
|
||||
|
||||
@@ -1090,7 +1090,7 @@ static int rit_getcontrast(struct lcd_dev_s *dev)
|
||||
{
|
||||
struct rit_dev_s *priv = (struct rit_dev_s *)dev;
|
||||
|
||||
gvdbg("contrast: %d\n", priv->contrast);
|
||||
ginfo("contrast: %d\n", priv->contrast);
|
||||
return priv->contrast;
|
||||
}
|
||||
|
||||
@@ -1107,7 +1107,7 @@ static int rit_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
struct rit_dev_s *priv = (struct rit_dev_s *)dev;
|
||||
uint8_t cmd[3];
|
||||
|
||||
gvdbg("contrast: %d\n", contrast);
|
||||
ginfo("contrast: %d\n", contrast);
|
||||
DEBUGASSERT(contrast <= CONFIG_LCD_MAXCONTRAST);
|
||||
|
||||
/* Select the SD1329 controller */
|
||||
@@ -1156,7 +1156,7 @@ FAR struct lcd_dev_s *rit_initialize(FAR struct spi_dev_s *spi, unsigned int dev
|
||||
FAR struct rit_dev_s *priv = (FAR struct rit_dev_s *)&g_oleddev;
|
||||
DEBUGASSERT(devno == 0 && spi);
|
||||
|
||||
gvdbg("Initializing devno: %d\n", devno);
|
||||
ginfo("Initializing devno: %d\n", devno);
|
||||
|
||||
/* Driver state data */
|
||||
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg dbg
|
||||
# define lcdvdbg vdbg
|
||||
# define lcdinfo info
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
#define MAX_OPENCNT (255) /* Limit of uint8_t */
|
||||
@@ -185,7 +185,7 @@ static void pca8574_write(FAR struct pcf8574_lcd_dev_s *priv, uint8_t data)
|
||||
ret = i2c_write(priv->i2c, &config, &data, 1);
|
||||
if (ret < 0)
|
||||
{
|
||||
lcdvdbg("pca8574_write() failed: %d\n", ret);
|
||||
lcdinfo("pca8574_write() failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ static int pca8574_read(FAR struct pcf8574_lcd_dev_s *priv, uint8_t* data)
|
||||
ret = i2c_read(priv->i2c, &config, data, 1);
|
||||
if (ret < 0)
|
||||
{
|
||||
lcdvdbg("pca8574_read() failed: %d\n", ret);
|
||||
lcdinfo("pca8574_read() failed: %d\n", ret);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -704,7 +704,7 @@ static void lcd_scroll_up(FAR struct pcf8574_lcd_dev_s *priv)
|
||||
data = (uint8_t *)malloc(priv->cfg.cols);
|
||||
if (NULL == data)
|
||||
{
|
||||
lcdvdbg("Failed to allocate buffer in lcd_scroll_up()\n");
|
||||
lcdinfo("Failed to allocate buffer in lcd_scroll_up()\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1428,7 +1428,7 @@ static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd,
|
||||
FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private;
|
||||
FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg);
|
||||
|
||||
lcdvdbg("SLCDIOC_GETATTRIBUTES:\n");
|
||||
lcdinfo("SLCDIOC_GETATTRIBUTES:\n");
|
||||
|
||||
if (!attr)
|
||||
{
|
||||
@@ -1578,13 +1578,13 @@ int pcf8574_lcd_backpack_register(FAR const char *devpath,
|
||||
|
||||
if (cfg->rows < 1 || cfg->rows > 4)
|
||||
{
|
||||
lcdvdbg("Display rows must be 1-4\n");
|
||||
lcdinfo("Display rows must be 1-4\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((cfg->cols < 1 || cfg->cols > 64) || (cfg->rows == 4 && cfg->cols > 32))
|
||||
{
|
||||
lcdvdbg("Display cols must be 1-64, and may not be part of a 4x40 configuration\n");
|
||||
lcdinfo("Display cols must be 1-64, and may not be part of a 4x40 configuration\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1593,7 +1593,7 @@ int pcf8574_lcd_backpack_register(FAR const char *devpath,
|
||||
priv = (FAR struct pcf8574_lcd_dev_s *)kmm_malloc(sizeof(struct pcf8574_lcd_dev_s));
|
||||
if (!priv)
|
||||
{
|
||||
lcdvdbg("Failed to allocate instance\n");
|
||||
lcdinfo("Failed to allocate instance\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -1613,10 +1613,10 @@ int pcf8574_lcd_backpack_register(FAR const char *devpath,
|
||||
ret = register_driver(devpath, &g_pcf8574_lcd_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
lcdvdbg("Failed to register driver: %d\n", ret);
|
||||
lcdinfo("Failed to register driver: %d\n", ret);
|
||||
kmm_free(priv);
|
||||
}
|
||||
|
||||
lcdvdbg("pcf8574_lcd_backpack driver loaded successfully!\n");
|
||||
lcdinfo("pcf8574_lcd_backpack driver loaded successfully!\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
+17
-17
@@ -176,10 +176,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg dbg
|
||||
# define lcdvdbg vdbg
|
||||
# define lcdinfo info
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
/**************************************************************************************
|
||||
@@ -334,7 +334,7 @@ static void ra8875_putreg(FAR struct ra8875_lcd_s *lcd, uint8_t regaddr,
|
||||
{
|
||||
/* Set the index register to the register address and write the register contents */
|
||||
|
||||
lcdvdbg("putreg 0x%02x = 0x%02x\n", regaddr, regval);
|
||||
lcdinfo("putreg 0x%02x = 0x%02x\n", regaddr, regval);
|
||||
|
||||
lcd->write_reg(lcd, regaddr, regval);
|
||||
}
|
||||
@@ -352,7 +352,7 @@ static void ra8875_putreg16(FAR struct ra8875_lcd_s *lcd, uint8_t regaddr,
|
||||
{
|
||||
/* Set the index register to the register address and write the register contents */
|
||||
|
||||
lcdvdbg("putreg 0x%02x = 0x%04x\n", regaddr, regval);
|
||||
lcdinfo("putreg 0x%02x = 0x%04x\n", regaddr, regval);
|
||||
|
||||
lcd->write_reg16(lcd, regaddr, regval);
|
||||
}
|
||||
@@ -373,7 +373,7 @@ static uint8_t ra8875_readreg(FAR struct ra8875_lcd_s *lcd, uint8_t regaddr)
|
||||
|
||||
regval = lcd->read_reg(lcd, regaddr);
|
||||
|
||||
lcdvdbg("readreg 0x%02x = 0x%02x\n", regaddr, regval);
|
||||
lcdinfo("readreg 0x%02x = 0x%02x\n", regaddr, regval);
|
||||
return regval;
|
||||
}
|
||||
#endif
|
||||
@@ -533,13 +533,13 @@ static inline void ra8875_setforeground(FAR struct ra8875_lcd_s *lcd, uint16_t c
|
||||
|
||||
static void ra8875_clearmem(FAR struct ra8875_lcd_s *lcd)
|
||||
{
|
||||
lcdvdbg("clearmem start\n");
|
||||
lcdinfo("clearmem start\n");
|
||||
ra8875_putreg(lcd, RA8875_MCLR, RA8875_MCLR_CLEAR | RA8875_MCLR_FULL);
|
||||
|
||||
/* Wait for operation to finish */
|
||||
|
||||
ra8875_waitreg(lcd, RA8875_MCLR, RA8875_MCLR_CLEAR);
|
||||
lcdvdbg("clearmem done\n");
|
||||
lcdinfo("clearmem done\n");
|
||||
}
|
||||
|
||||
/**************************************************************************************
|
||||
@@ -829,7 +829,7 @@ static int ra8875_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n",
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: 1\n",
|
||||
RA8875_COLORFMT, RA8875_XRES, RA8875_YRES);
|
||||
|
||||
vinfo->fmt = RA8875_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */
|
||||
@@ -853,7 +853,7 @@ static int ra8875_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct ra8875_dev_s *priv = (FAR struct ra8875_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
lcdvdbg("planeno: %d bpp: %d\n", planeno, RA8875_BPP);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, RA8875_BPP);
|
||||
|
||||
pinfo->putrun = ra8875_putrun; /* Put a run into LCD memory */
|
||||
pinfo->getrun = ra8875_getrun; /* Get a run from LCD memory */
|
||||
@@ -873,7 +873,7 @@ static int ra8875_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
|
||||
static int ra8875_getpower(FAR struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("power: %d\n", 0);
|
||||
lcdinfo("power: %d\n", 0);
|
||||
return g_lcddev.power;
|
||||
}
|
||||
|
||||
@@ -917,7 +917,7 @@ static int ra8875_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
FAR struct ra8875_dev_s *priv = (FAR struct ra8875_dev_s *)dev;
|
||||
FAR struct ra8875_lcd_s *lcd = priv->lcd;
|
||||
|
||||
lcdvdbg("power: %d\n", power);
|
||||
lcdinfo("power: %d\n", power);
|
||||
DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
|
||||
/* Set new power level */
|
||||
@@ -960,7 +960,7 @@ static int ra8875_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
|
||||
static int ra8875_getcontrast(FAR struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("Not implemented\n");
|
||||
lcdinfo("Not implemented\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -974,7 +974,7 @@ static int ra8875_getcontrast(FAR struct lcd_dev_s *dev)
|
||||
|
||||
static int ra8875_setcontrast(FAR struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
lcdvdbg("contrast: %d\n", contrast);
|
||||
lcdinfo("contrast: %d\n", contrast);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -993,7 +993,7 @@ static inline int ra8875_hwinitialize(FAR struct ra8875_dev_s *priv)
|
||||
|
||||
/* REVISIT: Maybe some of these values needs to be configurable?? */
|
||||
|
||||
lcdvdbg("hwinitialize\n");
|
||||
lcdinfo("hwinitialize\n");
|
||||
|
||||
/* Reset */
|
||||
|
||||
@@ -1076,7 +1076,7 @@ static inline int ra8875_hwinitialize(FAR struct ra8875_dev_s *priv)
|
||||
priv->shadow_w_curh = 0;
|
||||
priv->shadow_w_curv = 0;
|
||||
|
||||
lcdvdbg("hwinitialize done\n");
|
||||
lcdinfo("hwinitialize done\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1098,7 +1098,7 @@ FAR struct lcd_dev_s *ra8875_lcdinitialize(FAR struct ra8875_lcd_s *lcd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lcdvdbg("Initializing\n");
|
||||
lcdinfo("Initializing\n");
|
||||
|
||||
/* If we could support multiple RA8875 devices, this is where we would allocate
|
||||
* a new driver data structure... but we can't. Why not? Because of a bad should
|
||||
@@ -1130,7 +1130,7 @@ FAR struct lcd_dev_s *ra8875_lcdinitialize(FAR struct ra8875_lcd_s *lcd)
|
||||
|
||||
ra8875_poweroff(lcd);
|
||||
|
||||
lcdvdbg("Initialized\n");
|
||||
lcdinfo("Initialized\n");
|
||||
|
||||
return &g_lcddev.dev;
|
||||
}
|
||||
|
||||
+10
-10
@@ -90,7 +90,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LCD_SKELDEBUG
|
||||
# define skeldbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define skeldbg(format, ...) info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define skeldbg(x...)
|
||||
#endif
|
||||
@@ -230,7 +230,7 @@ static int skel_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer
|
||||
{
|
||||
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
|
||||
|
||||
/* Set up to write the run. */
|
||||
@@ -259,7 +259,7 @@ static int skel_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
{
|
||||
/* Buffer must be provided and aligned to a 16-bit address boundary */
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer && ((uintptr_t)buffer & 1) == 0);
|
||||
|
||||
#warning "Missing logic"
|
||||
@@ -278,7 +278,7 @@ static int skel_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
return OK;
|
||||
@@ -296,7 +296,7 @@ static int skel_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@@ -313,7 +313,7 @@ static int skel_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
static int skel_getpower(struct lcd_dev_s *dev)
|
||||
{
|
||||
struct skel_dev_s *priv = (struct skel_dev_s *)dev;
|
||||
gvdbg("power: %d\n", 0);
|
||||
ginfo("power: %d\n", 0);
|
||||
#warning "Missing logic"
|
||||
return 0;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ static int skel_setpower(struct lcd_dev_s *dev, int power)
|
||||
{
|
||||
struct skel_dev_s *priv = (struct skel_dev_s *)dev;
|
||||
|
||||
gvdbg("power: %d\n", power);
|
||||
ginfo("power: %d\n", power);
|
||||
DEBUGASSERT(power <= CONFIG_LCD_MAXPOWER);
|
||||
|
||||
/* Set new power level */
|
||||
@@ -350,7 +350,7 @@ static int skel_setpower(struct lcd_dev_s *dev, int power)
|
||||
|
||||
static int skel_getcontrast(struct lcd_dev_s *dev)
|
||||
{
|
||||
gvdbg("Not implemented\n");
|
||||
ginfo("Not implemented\n");
|
||||
#warning "Missing logic"
|
||||
return -ENOSYS;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ static int skel_getcontrast(struct lcd_dev_s *dev)
|
||||
|
||||
static int skel_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
gvdbg("contrast: %d\n", contrast);
|
||||
ginfo("contrast: %d\n", contrast);
|
||||
#warning "Missing logic"
|
||||
return -ENOSYS;
|
||||
}
|
||||
@@ -386,7 +386,7 @@ static int skel_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
|
||||
FAR struct lcd_dev_s *up_oledinitialize(FAR struct spi_dev_s *spi)
|
||||
{
|
||||
gvdbg("Initializing\n");
|
||||
ginfo("Initializing\n");
|
||||
|
||||
/* Configure GPIO pins */
|
||||
#warning "Missing logic"
|
||||
|
||||
@@ -230,10 +230,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg dbg
|
||||
# define lcdvdbg vdbg
|
||||
# define lcdinfo info
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
/**************************************************************************************
|
||||
@@ -846,7 +846,7 @@ static int ssd1289_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: 1\n",
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: 1\n",
|
||||
SSD1289_COLORFMT, SSD1289_XRES, SSD1289_YRES);
|
||||
|
||||
vinfo->fmt = SSD1289_COLORFMT; /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */
|
||||
@@ -870,7 +870,7 @@ static int ssd1289_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct ssd1289_dev_s *priv = (FAR struct ssd1289_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
lcdvdbg("planeno: %d bpp: %d\n", planeno, SSD1289_BPP);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, SSD1289_BPP);
|
||||
|
||||
pinfo->putrun = ssd1289_putrun; /* Put a run into LCD memory */
|
||||
pinfo->getrun = ssd1289_getrun; /* Get a run from LCD memory */
|
||||
@@ -890,7 +890,7 @@ static int ssd1289_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
|
||||
static int ssd1289_getpower(FAR struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("power: %d\n", 0);
|
||||
lcdinfo("power: %d\n", 0);
|
||||
return g_lcddev.power;
|
||||
}
|
||||
|
||||
@@ -933,7 +933,7 @@ static int ssd1289_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
FAR struct ssd1289_dev_s *priv = (FAR struct ssd1289_dev_s *)dev;
|
||||
FAR struct ssd1289_lcd_s *lcd = priv->lcd;
|
||||
|
||||
lcdvdbg("power: %d\n", power);
|
||||
lcdinfo("power: %d\n", power);
|
||||
DEBUGASSERT((unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
|
||||
/* Set new power level */
|
||||
@@ -974,7 +974,7 @@ static int ssd1289_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
|
||||
static int ssd1289_getcontrast(FAR struct lcd_dev_s *dev)
|
||||
{
|
||||
lcdvdbg("Not implemented\n");
|
||||
lcdinfo("Not implemented\n");
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -988,7 +988,7 @@ static int ssd1289_getcontrast(FAR struct lcd_dev_s *dev)
|
||||
|
||||
static int ssd1289_setcontrast(FAR struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
lcdvdbg("contrast: %d\n", contrast);
|
||||
lcdinfo("contrast: %d\n", contrast);
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
@@ -1302,7 +1302,7 @@ FAR struct lcd_dev_s *ssd1289_lcdinitialize(FAR struct ssd1289_lcd_s *lcd)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lcdvdbg("Initializing\n");
|
||||
lcdinfo("Initializing\n");
|
||||
|
||||
/* If we ccould support multiple SSD1289 devices, this is where we would allocate
|
||||
* a new driver data structure... but we can't. Why not? Because of a bad should
|
||||
|
||||
@@ -213,10 +213,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
/**************************************************************************************
|
||||
|
||||
@@ -272,7 +272,7 @@ static int ssd1306_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buf
|
||||
int pixlen;
|
||||
uint8_t i;
|
||||
|
||||
lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -480,7 +480,7 @@ static int ssd1306_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
int pixlen;
|
||||
uint8_t i;
|
||||
|
||||
lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -625,7 +625,7 @@ static int ssd1306_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
return OK;
|
||||
@@ -643,7 +643,7 @@ static int ssd1306_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(pinfo && planeno == 0);
|
||||
lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@@ -662,7 +662,7 @@ static int ssd1306_getpower(FAR struct lcd_dev_s *dev)
|
||||
FAR struct ssd1306_dev_s *priv = (FAR struct ssd1306_dev_s *)dev;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
lcdvdbg("power: %s\n", priv->on ? "ON" : "OFF");
|
||||
lcdinfo("power: %s\n", priv->on ? "ON" : "OFF");
|
||||
return priv->on ? CONFIG_LCD_MAXPOWER : 0;
|
||||
}
|
||||
|
||||
@@ -680,7 +680,7 @@ static int ssd1306_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
struct ssd1306_dev_s *priv = (struct ssd1306_dev_s *)dev;
|
||||
DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
|
||||
lcdvdbg("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0);
|
||||
lcdinfo("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0);
|
||||
|
||||
/* Lock and select device */
|
||||
|
||||
@@ -720,7 +720,7 @@ static int ssd1306_getcontrast(struct lcd_dev_s *dev)
|
||||
struct ssd1306_dev_s *priv = (struct ssd1306_dev_s *)dev;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
lcdvdbg("contrast: %d\n", priv->contrast);
|
||||
lcdinfo("contrast: %d\n", priv->contrast);
|
||||
return priv->contrast;
|
||||
}
|
||||
|
||||
@@ -737,7 +737,7 @@ static int ssd1306_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
struct ssd1306_dev_s *priv = (struct ssd1306_dev_s *)dev;
|
||||
unsigned int scaled;
|
||||
|
||||
lcdvdbg("contrast: %d\n", contrast);
|
||||
lcdinfo("contrast: %d\n", contrast);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Verify the contrast value */
|
||||
@@ -812,7 +812,7 @@ FAR struct lcd_dev_s *ssd1306_initialize(FAR struct i2c_master_s *dev, unsigned
|
||||
{
|
||||
FAR struct ssd1306_dev_s *priv = &g_oleddev;
|
||||
|
||||
lcdvdbg("Initializing\n");
|
||||
lcdinfo("Initializing\n");
|
||||
DEBUGASSERT(spi && devno == 0);
|
||||
|
||||
#ifdef CONFIG_LCD_SSD1306_SPI
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
static inline void ssd1306_configspi(FAR struct spi_dev_s *spi)
|
||||
{
|
||||
lcdvdbg("Mode: %d Bits: 8 Frequency: %d\n",
|
||||
lcdinfo("Mode: %d Bits: 8 Frequency: %d\n",
|
||||
CONFIG_SSD1306_SPIMODE, CONFIG_SSD1306_FREQUENCY);
|
||||
|
||||
/* Configure SPI for the SSD1306 */
|
||||
|
||||
@@ -821,7 +821,7 @@ static int ssd1351_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
vinfo->yres = SSD1351_YRES;
|
||||
vinfo->nplanes = 1;
|
||||
|
||||
gvdbg("fmt: %u xres: %u yres: %u nplanes: %u\n",
|
||||
ginfo("fmt: %u xres: %u yres: %u nplanes: %u\n",
|
||||
vinfo->fmt, vinfo->xres, vinfo->yres, vinfo->nplanes);
|
||||
return OK;
|
||||
}
|
||||
@@ -847,7 +847,7 @@ static int ssd1351_getplaneinfo(FAR struct lcd_dev_s *dev,
|
||||
pinfo->buffer = (uint8_t *)priv->runbuffer;
|
||||
pinfo->bpp = SSD1351_BPP;
|
||||
|
||||
gvdbg("planeno: %u bpp: %u\n", planeno, pinfo->bpp);
|
||||
ginfo("planeno: %u bpp: %u\n", planeno, pinfo->bpp);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -868,7 +868,7 @@ static int ssd1351_getpower(FAR struct lcd_dev_s *dev)
|
||||
/* Sanity check */
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
gvdbg("power: %d\n", priv->power);
|
||||
ginfo("power: %d\n", priv->power);
|
||||
|
||||
return priv->power;
|
||||
}
|
||||
@@ -890,7 +890,7 @@ static int ssd1351_setpower(FAR struct lcd_dev_s *dev, int power)
|
||||
/* Sanity check */
|
||||
|
||||
DEBUGASSERT(priv != NULL && (unsigned int)power <= LCD_FULL_ON);
|
||||
gvdbg("power: %d\n", power);
|
||||
ginfo("power: %d\n", power);
|
||||
|
||||
/* Select and lock the device */
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LCD_ST7565DEBUG
|
||||
# define st7565dbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define st7565dbg(format, ...) info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define st7565dbg(x...)
|
||||
#endif
|
||||
@@ -475,7 +475,7 @@ static int st7565_putrun(fb_coord_t row, fb_coord_t col,
|
||||
uint8_t i;
|
||||
int pixlen;
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -627,7 +627,7 @@ static int st7565_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer,
|
||||
uint8_t i;
|
||||
int pixlen;
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -736,7 +736,7 @@ static int st7565_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres,
|
||||
g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
@@ -755,7 +755,7 @@ static int st7565_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@@ -773,7 +773,7 @@ static int st7565_getpower(struct lcd_dev_s *dev)
|
||||
{
|
||||
struct st7565_dev_s *priv = (struct st7565_dev_s *)dev;
|
||||
DEBUGASSERT(priv);
|
||||
gvdbg("powered: %s\n", priv->power_level);
|
||||
ginfo("powered: %s\n", priv->power_level);
|
||||
return priv->power_level;
|
||||
}
|
||||
|
||||
@@ -791,7 +791,7 @@ static int st7565_setpower(struct lcd_dev_s *dev, int power)
|
||||
struct st7565_dev_s *priv = (struct st7565_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
gvdbg("power: %s powered: %s\n", power, priv->power_level);
|
||||
ginfo("power: %s powered: %s\n", power, priv->power_level);
|
||||
|
||||
/* Select and lock the device */
|
||||
|
||||
@@ -859,7 +859,7 @@ static int st7565_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
struct st7565_dev_s *priv = (struct st7565_dev_s *)dev;
|
||||
|
||||
gvdbg("contrast: %d\n", contrast);
|
||||
ginfo("contrast: %d\n", contrast);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
if (contrast > 255)
|
||||
@@ -974,7 +974,7 @@ FAR struct lcd_dev_s *st7565_initialize(FAR struct st7565_lcd_s *lcd,
|
||||
|
||||
FAR struct st7565_dev_s *priv = &g_st7565dev;
|
||||
|
||||
gvdbg("Initializing\n");
|
||||
ginfo("Initializing\n");
|
||||
DEBUGASSERT(lcd && devno == 0);
|
||||
|
||||
/* Save the reference to the SPI device */
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LCD_ST7567DEBUG
|
||||
# define st7567dbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define st7567dbg(format, ...) info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define st7567dbg(x...)
|
||||
#endif
|
||||
@@ -439,7 +439,7 @@ static int st7567_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buff
|
||||
uint8_t i;
|
||||
int pixlen;
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -587,7 +587,7 @@ static int st7567_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
uint8_t i;
|
||||
int pixlen;
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -698,7 +698,7 @@ static int st7567_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
return OK;
|
||||
@@ -716,7 +716,7 @@ static int st7567_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@@ -734,7 +734,7 @@ static int st7567_getpower(struct lcd_dev_s *dev)
|
||||
{
|
||||
struct st7567_dev_s *priv = (struct st7567_dev_s *)dev;
|
||||
DEBUGASSERT(priv);
|
||||
gvdbg("powered: %s\n", st7567_powerstring(priv->powered));
|
||||
ginfo("powered: %s\n", st7567_powerstring(priv->powered));
|
||||
return priv->powered;
|
||||
}
|
||||
|
||||
@@ -752,7 +752,7 @@ static int st7567_setpower(struct lcd_dev_s *dev, int power)
|
||||
struct st7567_dev_s *priv = (struct st7567_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
gvdbg("power: %s powered: %s\n",
|
||||
ginfo("power: %s powered: %s\n",
|
||||
st7567_powerstring(power), st7567_powerstring(priv->powered));
|
||||
|
||||
/* Select and lock the device */
|
||||
@@ -806,7 +806,7 @@ static int st7567_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
struct st7567_dev_s *priv = (struct st7567_dev_s *)dev;
|
||||
|
||||
gvdbg("contrast: %d\n", contrast);
|
||||
ginfo("contrast: %d\n", contrast);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
if (contrast > 255)
|
||||
@@ -915,7 +915,7 @@ FAR struct lcd_dev_s *st7567_initialize(FAR struct spi_dev_s *spi, unsigned int
|
||||
|
||||
FAR struct st7567_dev_s *priv = &g_st7567dev;
|
||||
|
||||
gvdbg("Initializing\n");
|
||||
ginfo("Initializing\n");
|
||||
DEBUGASSERT(spi && devno == 0);
|
||||
|
||||
/* Save the reference to the SPI device */
|
||||
|
||||
@@ -264,10 +264,10 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, ...) dbg(format, ##__VA_ARGS__)
|
||||
# define lcdvdbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define lcdinfo(format, ...) info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
# define lcdvdbg(x...)
|
||||
# define lcdinfo(x...)
|
||||
#endif
|
||||
|
||||
/**************************************************************************************
|
||||
@@ -487,7 +487,7 @@ static int ug2864ambag01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_
|
||||
int pixlen;
|
||||
uint8_t i;
|
||||
|
||||
lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -697,7 +697,7 @@ static int ug2864ambag01_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buf
|
||||
int pixlen;
|
||||
uint8_t i;
|
||||
|
||||
lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
lcdinfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -842,7 +842,7 @@ static int ug2864ambag01_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
lcdinfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
return OK;
|
||||
@@ -860,7 +860,7 @@ static int ug2864ambag01_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int pl
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(pinfo && planeno == 0);
|
||||
lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
lcdinfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@@ -879,7 +879,7 @@ static int ug2864ambag01_getpower(FAR struct lcd_dev_s *dev)
|
||||
FAR struct ug2864ambag01_dev_s *priv = (FAR struct ug2864ambag01_dev_s *)dev;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
lcdvdbg("power: %s\n", priv->on ? "ON" : "OFF");
|
||||
lcdinfo("power: %s\n", priv->on ? "ON" : "OFF");
|
||||
return priv->on ? CONFIG_LCD_MAXPOWER : 0;
|
||||
}
|
||||
|
||||
@@ -897,7 +897,7 @@ static int ug2864ambag01_setpower(struct lcd_dev_s *dev, int power)
|
||||
struct ug2864ambag01_dev_s *priv = (struct ug2864ambag01_dev_s *)dev;
|
||||
DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER && priv->spi);
|
||||
|
||||
lcdvdbg("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0);
|
||||
lcdinfo("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0);
|
||||
|
||||
/* Lock and select device */
|
||||
|
||||
@@ -939,7 +939,7 @@ static int ug2864ambag01_getcontrast(struct lcd_dev_s *dev)
|
||||
struct ug2864ambag01_dev_s *priv = (struct ug2864ambag01_dev_s *)dev;
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
lcdvdbg("contrast: %d\n", priv->contrast);
|
||||
lcdinfo("contrast: %d\n", priv->contrast);
|
||||
return priv->contrast;
|
||||
}
|
||||
|
||||
@@ -956,7 +956,7 @@ static int ug2864ambag01_setcontrast(struct lcd_dev_s *dev, unsigned int contras
|
||||
struct ug2864ambag01_dev_s *priv = (struct ug2864ambag01_dev_s *)dev;
|
||||
unsigned int scaled;
|
||||
|
||||
lcdvdbg("contrast: %d\n", contrast);
|
||||
lcdinfo("contrast: %d\n", contrast);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Verify the contrast value */
|
||||
@@ -1029,7 +1029,7 @@ FAR struct lcd_dev_s *ug2864ambag01_initialize(FAR struct spi_dev_s *spi, unsign
|
||||
{
|
||||
FAR struct ug2864ambag01_dev_s *priv = &g_oleddev;
|
||||
|
||||
lcdvdbg("Initializing\n");
|
||||
lcdinfo("Initializing\n");
|
||||
DEBUGASSERT(spi && devno == 0);
|
||||
|
||||
/* Save the reference to the SPI device */
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
# define lcddbg(format, ...) vdbg(format, ##__VA_ARGS__)
|
||||
# define lcddbg(format, ...) info(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define lcddbg(x...)
|
||||
#endif
|
||||
@@ -484,7 +484,7 @@ static int ug_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
|
||||
uint8_t i;
|
||||
int pixlen;
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -681,7 +681,7 @@ static int ug_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
|
||||
uint8_t i;
|
||||
int pixlen;
|
||||
|
||||
gvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
ginfo("row: %d col: %d npixels: %d\n", row, col, npixels);
|
||||
DEBUGASSERT(buffer);
|
||||
|
||||
/* Clip the run to the display */
|
||||
@@ -824,7 +824,7 @@ static int ug_getvideoinfo(FAR struct lcd_dev_s *dev,
|
||||
FAR struct fb_videoinfo_s *vinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && vinfo);
|
||||
gvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
ginfo("fmt: %d xres: %d yres: %d nplanes: %d\n",
|
||||
g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
|
||||
memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
|
||||
return OK;
|
||||
@@ -842,7 +842,7 @@ static int ug_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
|
||||
FAR struct lcd_planeinfo_s *pinfo)
|
||||
{
|
||||
DEBUGASSERT(dev && pinfo && planeno == 0);
|
||||
gvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
ginfo("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
|
||||
memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
|
||||
return OK;
|
||||
}
|
||||
@@ -860,7 +860,7 @@ static int ug_getpower(struct lcd_dev_s *dev)
|
||||
{
|
||||
struct ug_dev_s *priv = (struct ug_dev_s *)dev;
|
||||
DEBUGASSERT(priv);
|
||||
gvdbg("powered: %s\n", ug_powerstring(priv->powered));
|
||||
ginfo("powered: %s\n", ug_powerstring(priv->powered));
|
||||
return priv->powered;
|
||||
}
|
||||
|
||||
@@ -878,7 +878,7 @@ static int ug_setpower(struct lcd_dev_s *dev, int power)
|
||||
struct ug_dev_s *priv = (struct ug_dev_s *)dev;
|
||||
|
||||
DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER);
|
||||
gvdbg("power: %s powered: %s\n",
|
||||
ginfo("power: %s powered: %s\n",
|
||||
ug_powerstring(power), ug_powerstring(priv->powered));
|
||||
|
||||
/* Select and lock the device */
|
||||
@@ -947,7 +947,7 @@ static int ug_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
|
||||
{
|
||||
struct ug_dev_s *priv = (struct ug_dev_s *)dev;
|
||||
|
||||
gvdbg("contrast: %d\n", contrast);
|
||||
ginfo("contrast: %d\n", contrast);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
if (contrast > 255)
|
||||
@@ -1056,7 +1056,7 @@ FAR struct lcd_dev_s *ug_initialize(FAR struct spi_dev_s *spi, unsigned int devn
|
||||
|
||||
FAR struct ug_dev_s *priv = &g_ugdev;
|
||||
|
||||
gvdbg("Initializing\n");
|
||||
ginfo("Initializing\n");
|
||||
DEBUGASSERT(spi && devno == 0);
|
||||
|
||||
/* Save the reference to the SPI device */
|
||||
|
||||
@@ -74,14 +74,14 @@
|
||||
|
||||
#ifdef CONFIG_DEBUG_RGBLED
|
||||
# define pwmdbg dbg
|
||||
# define pwmvdbg vdbg
|
||||
# define pwminfo info
|
||||
# define pwmlldbg lldbg
|
||||
# define pwmllvdbg llvdbg
|
||||
# define pwmllinfo llinfo
|
||||
#else
|
||||
# define pwmdbg(x...)
|
||||
# define pwmvdbg(x...)
|
||||
# define pwminfo(x...)
|
||||
# define pwmlldbg(x...)
|
||||
# define pwmllvdbg(x...)
|
||||
# define pwmllinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -150,7 +150,7 @@ static int rgbled_open(FAR struct file *filep)
|
||||
uint8_t tmp;
|
||||
int ret;
|
||||
|
||||
pwmvdbg("crefs: %d\n", upper->crefs);
|
||||
pwminfo("crefs: %d\n", upper->crefs);
|
||||
|
||||
/* Get exclusive access to the device structures */
|
||||
|
||||
@@ -201,7 +201,7 @@ static int rgbled_close(FAR struct file *filep)
|
||||
FAR struct rgbled_upperhalf_s *upper = inode->i_private;
|
||||
int ret;
|
||||
|
||||
pwmvdbg("crefs: %d\n", upper->crefs);
|
||||
pwminfo("crefs: %d\n", upper->crefs);
|
||||
|
||||
/* Get exclusive access to the device structures */
|
||||
|
||||
@@ -410,7 +410,7 @@ int rgbled_register(FAR const char *path, FAR struct pwm_lowerhalf_s *ledr,
|
||||
|
||||
/* Register the PWM device */
|
||||
|
||||
pwmvdbg("Registering %s\n", path);
|
||||
pwminfo("Registering %s\n", path);
|
||||
return register_driver(path, &g_rgbledops, 0666, upper);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ static const struct userled_lowerhalf_s g_userled_lower =
|
||||
|
||||
static userled_set_t userled_supported(FAR const struct userled_lowerhalf_s *lower)
|
||||
{
|
||||
ivdbg("BOARD_NLEDS: %02x\n", BOARD_NLEDS);
|
||||
iinfo("BOARD_NLEDS: %02x\n", BOARD_NLEDS);
|
||||
return (userled_set_t)((1 << BOARD_NLEDS) - 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,13 +69,13 @@
|
||||
#ifdef CONFIG_DEBUG_LEDS
|
||||
# define ddbg lldbg
|
||||
# ifdef CONFIG_DEBUG_INFO
|
||||
# define dvdbg lldbg
|
||||
# define dinfo lldbg
|
||||
# else
|
||||
# define dvdbg(x...)
|
||||
# define dinfo(x...)
|
||||
# endif
|
||||
#else
|
||||
# define ddbg(x...)
|
||||
# define dvdbg(x...)
|
||||
# define dinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -197,7 +197,7 @@ static int userled_open(FAR struct file *filep)
|
||||
ret = userled_takesem(&priv->lu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
dvdbg("ERROR: userled_takesem failed: %d\n", ret);
|
||||
dinfo("ERROR: userled_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ static int userled_open(FAR struct file *filep)
|
||||
opriv = (FAR struct userled_open_s *)kmm_zalloc(sizeof(struct userled_open_s));
|
||||
if (!opriv)
|
||||
{
|
||||
dvdbg("ERROR: Failled to allocate open structure\n");
|
||||
dinfo("ERROR: Failled to allocate open structure\n");
|
||||
ret = -ENOMEM;
|
||||
goto errout_with_sem;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ static int userled_close(FAR struct file *filep)
|
||||
ret = userled_takesem(&priv->lu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
dvdbg("ERROR: userled_takesem failed: %d\n", ret);
|
||||
dinfo("ERROR: userled_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ static int userled_close(FAR struct file *filep)
|
||||
DEBUGASSERT(curr);
|
||||
if (!curr)
|
||||
{
|
||||
dvdbg("ERROR: Failed to find open entry\n");
|
||||
dinfo("ERROR: Failed to find open entry\n");
|
||||
ret = -ENOENT;
|
||||
goto errout_with_exclsem;
|
||||
}
|
||||
@@ -339,7 +339,7 @@ static ssize_t userled_write(FAR struct file *filep, FAR const char *buffer,
|
||||
|
||||
if (len < sizeof(userled_set_t))
|
||||
{
|
||||
dvdbg("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||
dinfo("ERROR: buffer too small: %lu\n", (unsigned long)len);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ static ssize_t userled_write(FAR struct file *filep, FAR const char *buffer,
|
||||
ret = userled_takesem(&priv->lu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
dvdbg("ERROR: userled_takesem failed: %d\n", ret);
|
||||
dinfo("ERROR: userled_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
ret = userled_takesem(&priv->lu_exclsem);
|
||||
if (ret < 0)
|
||||
{
|
||||
dvdbg("ERROR: userled_takesem failed: %d\n", ret);
|
||||
dinfo("ERROR: userled_takesem failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -521,7 +521,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
break;
|
||||
|
||||
default:
|
||||
dvdbg("ERROR: Unrecognized command: %ld\n", cmd);
|
||||
dinfo("ERROR: Unrecognized command: %ld\n", cmd);
|
||||
ret = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
@@ -569,7 +569,7 @@ int userled_register(FAR const char *devname,
|
||||
|
||||
if (!priv)
|
||||
{
|
||||
dvdbg("ERROR: Failed to allocate device structure\n");
|
||||
dinfo("ERROR: Failed to allocate device structure\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ int userled_register(FAR const char *devname,
|
||||
ret = register_driver(devname, &userled_fops, 0666, priv);
|
||||
if (ret < 0)
|
||||
{
|
||||
dvdbg("ERROR: register_driver failed: %d\n", ret);
|
||||
dinfo("ERROR: register_driver failed: %d\n", ret);
|
||||
goto errout_with_priv;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMCSD_DUMPALL
|
||||
# define mmcsd_dumpbuffer(m,b,l) fvdbgdumpbuffer(m,b,l)
|
||||
# define mmcsd_dumpbuffer(m,b,l) finfodumpbuffer(m,b,l)
|
||||
#else
|
||||
# define mmcsd_dumpbuffer(m,b,l)
|
||||
#endif
|
||||
|
||||
+40
-40
@@ -87,90 +87,90 @@ void mmcsd_dmpcsd(FAR const uint8_t *csd, uint8_t cardtype)
|
||||
bool mmc = (cardtype == MMCSD_CARDTYPE_MMC);
|
||||
bool sd2 = (MMCSD_CSD_CSDSTRUCT(csd) == 1);
|
||||
|
||||
fvdbg("CSD\n");
|
||||
fvdbg(" CSD_STRUCTURE: 1.%d\n", MMCSD_CSD_CSDSTRUCT(csd));
|
||||
finfo("CSD\n");
|
||||
finfo(" CSD_STRUCTURE: 1.%d\n", MMCSD_CSD_CSDSTRUCT(csd));
|
||||
if (mmc)
|
||||
{
|
||||
fvdbg(" MMC SPEC_VERS: %d\n", MMC_CSD_SPECVERS(csd));
|
||||
finfo(" MMC SPEC_VERS: %d\n", MMC_CSD_SPECVERS(csd));
|
||||
}
|
||||
|
||||
fvdbg(" TAAC:\n",
|
||||
finfo(" TAAC:\n",
|
||||
sd2 ? SD20_CSD_TAC_TIMEVALUE(csd) : MMCSD_CSD_TAAC_TIMEVALUE(csd));
|
||||
fvdbg(" TIME_VALUE: 0x%02x\n",
|
||||
finfo(" TIME_VALUE: 0x%02x\n",
|
||||
sd2 ? SD20_CSD_TAC_TIMEVALUE(csd) : MMCSD_CSD_TAAC_TIMEVALUE(csd));
|
||||
fvdbg(" TIME_UNIT: 0x%02x\n",
|
||||
finfo(" TIME_UNIT: 0x%02x\n",
|
||||
sd2 ? SD20_CSD_TAC_TIMEUNIT(csd) : MMCSD_CSD_TAAC_TIMEUNIT(csd));
|
||||
fvdbg(" NSAC: 0x%02x\n",
|
||||
finfo(" NSAC: 0x%02x\n",
|
||||
sd2 ? SD20_CSD_NSAC(csd) : MMCSD_CSD_NSAC(csd));
|
||||
fvdbg(" TRAN_SPEED:\n");
|
||||
fvdbg(" TIME_VALUE: 0x%02x\n",
|
||||
finfo(" TRAN_SPEED:\n");
|
||||
finfo(" TIME_VALUE: 0x%02x\n",
|
||||
sd2 ? SD20_CSD_TRANSPEED_TIMEVALUE(csd) : MMCSD_CSD_TRANSPEED_TIMEVALUE(csd));
|
||||
fvdbg(" RATE_UNIT: 0x%02x\n",
|
||||
finfo(" RATE_UNIT: 0x%02x\n",
|
||||
sd2 ? SD20_CSD_TRANSPEED_TRANSFERRATEUNIT(csd) : MMCSD_CSD_TRANSPEED_TRANSFERRATEUNIT(csd));
|
||||
fvdbg(" CCC: 0x%03x\n",
|
||||
finfo(" CCC: 0x%03x\n",
|
||||
sd2 ? SD20_CSD_CCC(csd) : MMCSD_CSD_CCC(csd));
|
||||
fvdbg(" READ_BL_LEN: %d\n",
|
||||
finfo(" READ_BL_LEN: %d\n",
|
||||
sd2 ? SD20_CSD_READBLLEN(csd) : MMCSD_CSD_READBLLEN(csd));
|
||||
fvdbg(" READ_BL_PARTIAL: %d\n",
|
||||
finfo(" READ_BL_PARTIAL: %d\n",
|
||||
sd2 ? SD20_CSD_READBLPARTIAL(csd) : MMCSD_CSD_READBLPARTIAL(csd));
|
||||
fvdbg(" WRITE_BLK_MISALIGN: %d\n",
|
||||
finfo(" WRITE_BLK_MISALIGN: %d\n",
|
||||
sd2 ? SD20_CSD_WRITEBLKMISALIGN(csd) : MMCSD_CSD_WRITEBLKMISALIGN(csd));
|
||||
fvdbg(" READ_BLK_MISALIGN: %d\n",
|
||||
finfo(" READ_BLK_MISALIGN: %d\n",
|
||||
sd2 ? SD20_CSD_READBLKMISALIGN(csd) : MMCSD_CSD_READBLKMISALIGN(csd));
|
||||
fvdbg(" DSR_IMP: %d\n",
|
||||
finfo(" DSR_IMP: %d\n",
|
||||
sd2 ? SD20_CSD_DSRIMP(csd) : MMCSD_CSD_DSRIMP(csd));
|
||||
fvdbg(" C_SIZE: %d\n",
|
||||
finfo(" C_SIZE: %d\n",
|
||||
sd2 ? SD20_CSD_CSIZE(csd) : MMCSD_CSD_CSIZE(csd));
|
||||
fvdbg(" VDD_R_CURR_MIN: %d\n",
|
||||
finfo(" VDD_R_CURR_MIN: %d\n",
|
||||
sd2 ? SD20_CSD_VDDRCURRMIN(csd) : MMCSD_CSD_VDDRCURRMIN(csd));
|
||||
fvdbg(" VDD_R_CURR_MAX: %d\n",
|
||||
finfo(" VDD_R_CURR_MAX: %d\n",
|
||||
sd2 ? SD20_CSD_VDDRCURRMAX(csd) : MMCSD_CSD_VDDRCURRMAX(csd));
|
||||
fvdbg(" VDD_W_CURR_MIN: %d\n",
|
||||
finfo(" VDD_W_CURR_MIN: %d\n",
|
||||
sd2 ? SD20_CSD_VDDWCURRMIN(csd) : MMCSD_CSD_VDDWCURRMIN(csd));
|
||||
fvdbg(" VDD_W_CURR_MAX: %d\n",
|
||||
finfo(" VDD_W_CURR_MAX: %d\n",
|
||||
sd2 ? SD20_CSD_VDDWCURRMAX(csd) : MMCSD_CSD_VDDWCURRMAX(csd));
|
||||
fvdbg(" C_SIZE_MULT: %d\n",
|
||||
finfo(" C_SIZE_MULT: %d\n",
|
||||
sd2 ? SD20_CSD_CSIZEMULT(csd) : MMCSD_CSD_CSIZEMULT(csd));
|
||||
if (mmc)
|
||||
{
|
||||
fvdbg(" MMC SECTOR_SIZE: %d\n", MMC_CSD_SECTORSIZE(csd));
|
||||
fvdbg(" MMC ER_GRP_SIZE: %d\n", MMC_CSD_ERGRPSIZE(csd));
|
||||
fvdbg(" MMC WP_GRP_SIZE: %d\n", MMC_CSD_WPGRPSIZE(csd));
|
||||
fvdbg(" MMC DFLT_ECC: %d\n", MMC_CSD_DFLTECC(csd));
|
||||
finfo(" MMC SECTOR_SIZE: %d\n", MMC_CSD_SECTORSIZE(csd));
|
||||
finfo(" MMC ER_GRP_SIZE: %d\n", MMC_CSD_ERGRPSIZE(csd));
|
||||
finfo(" MMC WP_GRP_SIZE: %d\n", MMC_CSD_WPGRPSIZE(csd));
|
||||
finfo(" MMC DFLT_ECC: %d\n", MMC_CSD_DFLTECC(csd));
|
||||
}
|
||||
else
|
||||
{
|
||||
fvdbg(" SD ER_BLK_EN: %d\n",
|
||||
finfo(" SD ER_BLK_EN: %d\n",
|
||||
sd2 ? SD20_CSD_SDERBLKEN(csd) : SD_CSD_SDERBLKEN(csd));
|
||||
fvdbg(" SD SECTOR_SIZE: %d\n",
|
||||
finfo(" SD SECTOR_SIZE: %d\n",
|
||||
sd2 ? SD20_CSD_SECTORSIZE(csd) : SD_CSD_SECTORSIZE(csd));
|
||||
fvdbg(" SD WP_GRP_SIZE: %d\n",
|
||||
finfo(" SD WP_GRP_SIZE: %d\n",
|
||||
sd2 ? SD_CSD_WPGRPSIZE(csd) : SD_CSD_WPGRPSIZE(csd));
|
||||
}
|
||||
fvdbg(" WP_GRP_EN: %d\n",
|
||||
finfo(" WP_GRP_EN: %d\n",
|
||||
sd2 ? SD20_WPGRPEN(csd) : MMCSD_WPGRPEN(csd));
|
||||
fvdbg(" R2W_FACTOR: %d\n",
|
||||
finfo(" R2W_FACTOR: %d\n",
|
||||
sd2 ? SD20_CSD_R2WFACTOR(csd) : MMCSD_CSD_R2WFACTOR(csd));
|
||||
fvdbg(" WRITE_BL_LEN: %d\n",
|
||||
finfo(" WRITE_BL_LEN: %d\n",
|
||||
sd2 ? SD20_CSD_WRITEBLLEN(csd) : MMCSD_CSD_WRITEBLLEN(csd));
|
||||
fvdbg(" WRITE_BL_PARTIAL: %d\n",
|
||||
finfo(" WRITE_BL_PARTIAL: %d\n",
|
||||
sd2 ? SD20_CSD_WRITEBLPARTIAL(csd) : MMCSD_CSD_WRITEBLPARTIAL(csd));
|
||||
fvdbg(" FILE_FORMAT_GROUP: %d\n",
|
||||
finfo(" FILE_FORMAT_GROUP: %d\n",
|
||||
sd2 ? SD20_CSD_FILEFORMATGRP(csd) : MMCSD_CSD_FILEFORMATGRP(csd));
|
||||
fvdbg(" COPY: %d\n",
|
||||
finfo(" COPY: %d\n",
|
||||
sd2 ? SD20_CSD_COPY(csd) : MMCSD_CSD_COPY(csd));
|
||||
fvdbg(" PERM_WRITE_PROTECT: %d\n",
|
||||
finfo(" PERM_WRITE_PROTECT: %d\n",
|
||||
sd2 ? SD20_CSD_PERMWRITEPROTECT(csd) : MMCSD_CSD_PERMWRITEPROTECT(csd));
|
||||
fvdbg(" TMP_WRITE_PROTECT: %d\n",
|
||||
finfo(" TMP_WRITE_PROTECT: %d\n",
|
||||
sd2 ?SD20_CSD_TMPWRITEPROTECT(csd) : MMCSD_CSD_TMPWRITEPROTECT(csd));
|
||||
fvdbg(" FILE_FORMAT: %d\n",
|
||||
finfo(" FILE_FORMAT: %d\n",
|
||||
sd2 ? SD20_CSD_FILEFORMAT(csd) : MMCSD_CSD_FILEFORMAT(csd));
|
||||
if (mmc)
|
||||
{
|
||||
fvdbg(" MMC ECC: %d\n",
|
||||
finfo(" MMC ECC: %d\n",
|
||||
sd2 ? MMC_CSD_ECC(csd) : MMC_CSD_ECC(csd));
|
||||
}
|
||||
fvdbg(" CRC: %02x\n",
|
||||
finfo(" CRC: %02x\n",
|
||||
sd2 ? SD20_CSD_CRC(csd) : MMCSD_CSD_CRC(csd));
|
||||
}
|
||||
#endif
|
||||
|
||||
+75
-75
@@ -413,7 +413,7 @@ static int mmcsd_recvR1(FAR struct mmcsd_state_s *priv, uint32_t cmd)
|
||||
* indication for later use.
|
||||
*/
|
||||
|
||||
fvdbg("ERROR: R1=%08x\n", r1);
|
||||
finfo("ERROR: R1=%08x\n", r1);
|
||||
priv->locked = ((r1 & MMCSD_R1_CARDISLOCKED) != 0);
|
||||
ret = -EIO;
|
||||
}
|
||||
@@ -767,69 +767,69 @@ static void mmcsd_decodeCSD(FAR struct mmcsd_state_s *priv, uint32_t csd[4])
|
||||
decoded.mmcecc = (csd[3] >> 8) & 3;
|
||||
decoded.crc = (csd[3] >> 1) & 0x7f;
|
||||
|
||||
fvdbg("CSD:\n");
|
||||
fvdbg(" CSD_STRUCTURE: %d SPEC_VERS: %d (MMC)\n",
|
||||
finfo("CSD:\n");
|
||||
finfo(" CSD_STRUCTURE: %d SPEC_VERS: %d (MMC)\n",
|
||||
decoded.csdstructure, decoded.mmcspecvers);
|
||||
fvdbg(" TAAC {TIME_UNIT: %d TIME_VALUE: %d} NSAC: %d\n",
|
||||
finfo(" TAAC {TIME_UNIT: %d TIME_VALUE: %d} NSAC: %d\n",
|
||||
decoded.taac.timeunit, decoded.taac.timevalue, decoded.nsac);
|
||||
fvdbg(" TRAN_SPEED {TRANSFER_RATE_UNIT: %d TIME_VALUE: %d}\n",
|
||||
finfo(" TRAN_SPEED {TRANSFER_RATE_UNIT: %d TIME_VALUE: %d}\n",
|
||||
decoded.transpeed.transferrateunit, decoded.transpeed.timevalue);
|
||||
fvdbg(" CCC: %d\n", decoded.ccc);
|
||||
fvdbg(" READ_BL_LEN: %d READ_BL_PARTIAL: %d\n",
|
||||
finfo(" CCC: %d\n", decoded.ccc);
|
||||
finfo(" READ_BL_LEN: %d READ_BL_PARTIAL: %d\n",
|
||||
decoded.readbllen, decoded.readblpartial);
|
||||
fvdbg(" WRITE_BLK_MISALIGN: %d READ_BLK_MISALIGN: %d\n",
|
||||
finfo(" WRITE_BLK_MISALIGN: %d READ_BLK_MISALIGN: %d\n",
|
||||
decoded.writeblkmisalign, decoded.readblkmisalign);
|
||||
fvdbg(" DSR_IMP: %d\n",
|
||||
finfo(" DSR_IMP: %d\n",
|
||||
decoded.dsrimp);
|
||||
|
||||
if (IS_BLOCK(priv->type))
|
||||
{
|
||||
fvdbg(" SD Block Addressing:\n");
|
||||
fvdbg(" C_SIZE: %d SD_ER_BLK_EN: %d\n",
|
||||
finfo(" SD Block Addressing:\n");
|
||||
finfo(" C_SIZE: %d SD_ER_BLK_EN: %d\n",
|
||||
decoded.u.sdblock.csize, decoded.u.sdblock.sderblen);
|
||||
fvdbg(" SD_SECTOR_SIZE: %d SD_WP_GRP_SIZE: %d\n",
|
||||
finfo(" SD_SECTOR_SIZE: %d SD_WP_GRP_SIZE: %d\n",
|
||||
decoded.u.sdblock.sdsectorsize, decoded.u.sdblock.sdwpgrpsize);
|
||||
}
|
||||
else if (IS_SD(priv->type))
|
||||
{
|
||||
fvdbg(" SD Byte Addressing:\n");
|
||||
fvdbg(" C_SIZE: %d C_SIZE_MULT: %d\n",
|
||||
finfo(" SD Byte Addressing:\n");
|
||||
finfo(" C_SIZE: %d C_SIZE_MULT: %d\n",
|
||||
decoded.u.sdbyte.csize, decoded.u.sdbyte.csizemult);
|
||||
fvdbg(" VDD_R_CURR_MIN: %d VDD_R_CURR_MAX: %d\n",
|
||||
finfo(" VDD_R_CURR_MIN: %d VDD_R_CURR_MAX: %d\n",
|
||||
decoded.u.sdbyte.vddrcurrmin, decoded.u.sdbyte.vddrcurrmax);
|
||||
fvdbg(" VDD_W_CURR_MIN: %d VDD_W_CURR_MAX: %d\n",
|
||||
finfo(" VDD_W_CURR_MIN: %d VDD_W_CURR_MAX: %d\n",
|
||||
decoded.u.sdbyte.vddwcurrmin, decoded.u.sdbyte.vddwcurrmax);
|
||||
fvdbg(" SD_ER_BLK_EN: %d SD_SECTOR_SIZE: %d (SD) SD_WP_GRP_SIZE: %d\n",
|
||||
finfo(" SD_ER_BLK_EN: %d SD_SECTOR_SIZE: %d (SD) SD_WP_GRP_SIZE: %d\n",
|
||||
decoded.u.sdbyte.sderblen, decoded.u.sdbyte.sdsectorsize, decoded.u.sdbyte.sdwpgrpsize);
|
||||
}
|
||||
#ifdef CONFIG_MMCSD_MMCSUPPORT
|
||||
else if (IS_MMC(priv->type))
|
||||
{
|
||||
fvdbg(" MMC:\n");
|
||||
fvdbg(" C_SIZE: %d C_SIZE_MULT: %d\n",
|
||||
finfo(" MMC:\n");
|
||||
finfo(" C_SIZE: %d C_SIZE_MULT: %d\n",
|
||||
decoded.u.mmc.csize, decoded.u.mmc.csizemult);
|
||||
fvdbg(" VDD_R_CURR_MIN: %d VDD_R_CURR_MAX: %d\n",
|
||||
finfo(" VDD_R_CURR_MIN: %d VDD_R_CURR_MAX: %d\n",
|
||||
decoded.u.mmc.vddrcurrmin, decoded.u.mmc.vddrcurrmax);
|
||||
fvdbg(" VDD_W_CURR_MIN: %d VDD_W_CURR_MAX: %d\n",
|
||||
finfo(" VDD_W_CURR_MIN: %d VDD_W_CURR_MAX: %d\n",
|
||||
decoded.u.mmc.vddwcurrmin, decoded.u.mmc.vddwcurrmax);
|
||||
fvdbg(" MMC_SECTOR_SIZE: %d MMC_ER_GRP_SIZE: %d MMC_WP_GRP_SIZE: %d\n",
|
||||
finfo(" MMC_SECTOR_SIZE: %d MMC_ER_GRP_SIZE: %d MMC_WP_GRP_SIZE: %d\n",
|
||||
decoded.u.mmc.er.mmc22.sectorsize, decoded.u.mmc.er.mmc22.ergrpsize,
|
||||
decoded.u.mmc.mmcwpgrpsize);
|
||||
}
|
||||
#endif
|
||||
|
||||
fvdbg(" WP_GRP_EN: %d MMC DFLT_ECC: %d (MMC) R2W_FACTOR: %d\n",
|
||||
finfo(" WP_GRP_EN: %d MMC DFLT_ECC: %d (MMC) R2W_FACTOR: %d\n",
|
||||
decoded.wpgrpen, decoded.mmcdfltecc, decoded.r2wfactor);
|
||||
fvdbg(" WRITE_BL_LEN: %d WRITE_BL_PARTIAL: %d\n",
|
||||
finfo(" WRITE_BL_LEN: %d WRITE_BL_PARTIAL: %d\n",
|
||||
decoded.writebllen, decoded.writeblpartial);
|
||||
fvdbg(" FILE_FORMAT_GROUP: %d COPY: %d\n",
|
||||
finfo(" FILE_FORMAT_GROUP: %d COPY: %d\n",
|
||||
decoded.fileformatgrp, decoded.copy);
|
||||
fvdbg(" PERM_WRITE_PROTECT: %d TMP_WRITE_PROTECT: %d\n",
|
||||
finfo(" PERM_WRITE_PROTECT: %d TMP_WRITE_PROTECT: %d\n",
|
||||
decoded.permwriteprotect, decoded.tmpwriteprotect);
|
||||
fvdbg(" FILE_FORMAT: %d ECC: %d (MMC) CRC: %d\n",
|
||||
finfo(" FILE_FORMAT: %d ECC: %d (MMC) CRC: %d\n",
|
||||
decoded.fileformat, decoded.mmcecc, decoded.crc);
|
||||
|
||||
fvdbg("Capacity: %luKb, Block size: %db, nblocks: %d wrprotect: %d\n",
|
||||
finfo("Capacity: %luKb, Block size: %db, nblocks: %d wrprotect: %d\n",
|
||||
(unsigned long)(priv->capacity / 1024), priv->blocksize,
|
||||
priv->nblocks, priv->wrprotect);
|
||||
#endif
|
||||
@@ -893,7 +893,7 @@ static void mmcsd_decodeCID(FAR struct mmcsd_state_s *priv, uint32_t cid[4])
|
||||
decoded.mdt = (cid[3] >> 8) & 0x0fff;
|
||||
decoded.crc = (cid[3] >> 1) & 0x7f;
|
||||
|
||||
fvdbg("mid: %02x oid: %04x pnm: %s prv: %d psn: %d mdt: %02x crc: %02x\n",
|
||||
finfo("mid: %02x oid: %04x pnm: %s prv: %d psn: %d mdt: %02x crc: %02x\n",
|
||||
decoded.mid, decoded.oid, decoded.pnm, decoded.prv,
|
||||
decoded.psn, decoded.mdt, decoded.crc);
|
||||
}
|
||||
@@ -955,12 +955,12 @@ struct mmcsd_scr_s decoded;
|
||||
#if defined(CONFIG_DEBUG) && defined (CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_FS)
|
||||
decoded.mfgdata = scr[1]; /* Might be byte reversed! */
|
||||
|
||||
fvdbg("SCR:\n");
|
||||
fvdbg(" SCR_STRUCTURE: %d SD_VERSION: %d\n",
|
||||
finfo("SCR:\n");
|
||||
finfo(" SCR_STRUCTURE: %d SD_VERSION: %d\n",
|
||||
decoded.scrversion, decoded.sdversion);
|
||||
fvdbg(" DATA_STATE_AFTER_ERASE: %d SD_SECURITY: %d SD_BUS_WIDTHS: %x\n",
|
||||
finfo(" DATA_STATE_AFTER_ERASE: %d SD_SECURITY: %d SD_BUS_WIDTHS: %x\n",
|
||||
decoded.erasestate, decoded.security, decoded.buswidth);
|
||||
fvdbg(" Manufacturing data: %08x\n",
|
||||
finfo(" Manufacturing data: %08x\n",
|
||||
decoded.mfgdata);
|
||||
#endif
|
||||
}
|
||||
@@ -1288,7 +1288,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv,
|
||||
off_t offset;
|
||||
int ret;
|
||||
|
||||
fvdbg("startblock=%d\n", startblock);
|
||||
finfo("startblock=%d\n", startblock);
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL);
|
||||
|
||||
/* Check if the card is locked */
|
||||
@@ -1342,7 +1342,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv,
|
||||
offset = startblock << priv->blockshift;
|
||||
}
|
||||
|
||||
fvdbg("offset=%d\n", offset);
|
||||
finfo("offset=%d\n", offset);
|
||||
|
||||
/* Select the block size for the card */
|
||||
|
||||
@@ -1365,7 +1365,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv,
|
||||
ret = SDIO_DMARECVSETUP(priv->dev, buffer, priv->blocksize);
|
||||
if (ret != OK)
|
||||
{
|
||||
fvdbg("SDIO_DMARECVSETUP: error %d\n", ret);
|
||||
finfo("SDIO_DMARECVSETUP: error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -1422,7 +1422,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv,
|
||||
off_t offset;
|
||||
int ret;
|
||||
|
||||
fvdbg("startblock=%d nblocks=%d\n", startblock, nblocks);
|
||||
finfo("startblock=%d nblocks=%d\n", startblock, nblocks);
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL && nblocks > 1);
|
||||
|
||||
/* Check if the card is locked */
|
||||
@@ -1476,7 +1476,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv,
|
||||
{
|
||||
offset = startblock << priv->blockshift;
|
||||
}
|
||||
fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset);
|
||||
finfo("nbytes=%d byte offset=%d\n", nbytes, offset);
|
||||
|
||||
/* Select the block size for the card */
|
||||
|
||||
@@ -1499,7 +1499,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv,
|
||||
ret = SDIO_DMARECVSETUP(priv->dev, buffer, nbytes);
|
||||
if (ret != OK)
|
||||
{
|
||||
fvdbg("SDIO_DMARECVSETUP: error %d\n", ret);
|
||||
finfo("SDIO_DMARECVSETUP: error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -1625,7 +1625,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv,
|
||||
off_t offset;
|
||||
int ret;
|
||||
|
||||
fvdbg("startblock=%d\n", startblock);
|
||||
finfo("startblock=%d\n", startblock);
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL);
|
||||
|
||||
/* Check if the card is locked or write protected (either via software or
|
||||
@@ -1681,7 +1681,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv,
|
||||
offset = startblock << priv->blockshift;
|
||||
}
|
||||
|
||||
fvdbg("offset=%d\n", offset);
|
||||
finfo("offset=%d\n", offset);
|
||||
|
||||
/* Select the block size for the card */
|
||||
|
||||
@@ -1713,7 +1713,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv,
|
||||
ret = SDIO_DMASENDSETUP(priv->dev, buffer, priv->blocksize);
|
||||
if (ret != OK)
|
||||
{
|
||||
fvdbg("SDIO_DMASENDSETUP: error %d\n", ret);
|
||||
finfo("SDIO_DMASENDSETUP: error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -1768,7 +1768,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv,
|
||||
size_t nbytes;
|
||||
int ret;
|
||||
|
||||
fvdbg("startblock=%d nblocks=%d\n", startblock, nblocks);
|
||||
finfo("startblock=%d nblocks=%d\n", startblock, nblocks);
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL && nblocks > 1);
|
||||
|
||||
/* Check if the card is locked or write protected (either via software or
|
||||
@@ -1825,7 +1825,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv,
|
||||
offset = startblock << priv->blockshift;
|
||||
}
|
||||
|
||||
fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset);
|
||||
finfo("nbytes=%d byte offset=%d\n", nbytes, offset);
|
||||
|
||||
/* Select the block size for the card */
|
||||
|
||||
@@ -1876,7 +1876,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv,
|
||||
ret = SDIO_DMASENDSETUP(priv->dev, buffer, nbytes);
|
||||
if (ret != OK)
|
||||
{
|
||||
fvdbg("SDIO_DMASENDSETUP: error %d\n", ret);
|
||||
finfo("SDIO_DMASENDSETUP: error %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -2003,7 +2003,7 @@ static int mmcsd_open(FAR struct inode *inode)
|
||||
{
|
||||
FAR struct mmcsd_state_s *priv;
|
||||
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
|
||||
@@ -2027,7 +2027,7 @@ static int mmcsd_close(FAR struct inode *inode)
|
||||
{
|
||||
FAR struct mmcsd_state_s *priv;
|
||||
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
|
||||
@@ -2061,7 +2061,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
fvdbg("startsector: %d nsectors: %d sectorsize: %d\n",
|
||||
finfo("startsector: %d nsectors: %d sectorsize: %d\n",
|
||||
startsector, nsectors, priv->blocksize);
|
||||
|
||||
if (nsectors > 0)
|
||||
@@ -2137,7 +2137,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, FAR const unsigned char *buf
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
|
||||
fvdbg("sector: %lu nsectors: %u sectorsize: %u\n",
|
||||
finfo("sector: %lu nsectors: %u sectorsize: %u\n",
|
||||
(unsigned long)startsector, nsectors, priv->blocksize);
|
||||
|
||||
mmcsd_takesem(priv);
|
||||
@@ -2200,7 +2200,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
FAR struct mmcsd_state_s *priv;
|
||||
int ret = -EINVAL;
|
||||
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
|
||||
if (geometry)
|
||||
@@ -2213,7 +2213,7 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
{
|
||||
/* No.. return ENODEV */
|
||||
|
||||
fvdbg("IS_EMPTY\n");
|
||||
finfo("IS_EMPTY\n");
|
||||
ret = -ENODEV;
|
||||
}
|
||||
else
|
||||
@@ -2230,10 +2230,10 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
geometry->geo_nsectors = priv->nblocks;
|
||||
geometry->geo_sectorsize = priv->blocksize;
|
||||
|
||||
fvdbg("available: true mediachanged: %s writeenabled: %s\n",
|
||||
finfo("available: true mediachanged: %s writeenabled: %s\n",
|
||||
geometry->geo_mediachanged ? "true" : "false",
|
||||
geometry->geo_writeenabled ? "true" : "false");
|
||||
fvdbg("nsectors: %lu sectorsize: %d\n",
|
||||
finfo("nsectors: %lu sectorsize: %d\n",
|
||||
(long)geometry->geo_nsectors, geometry->geo_sectorsize);
|
||||
|
||||
priv->mediachanged = false;
|
||||
@@ -2258,7 +2258,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
FAR struct mmcsd_state_s *priv;
|
||||
int ret;
|
||||
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
priv = (FAR struct mmcsd_state_s *)inode->i_private;
|
||||
|
||||
@@ -2269,7 +2269,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
{
|
||||
case BIOC_PROBE: /* Check for media in the slot */
|
||||
{
|
||||
fvdbg("BIOC_PROBE\n");
|
||||
finfo("BIOC_PROBE\n");
|
||||
|
||||
/* Probe the MMC/SD slot for media */
|
||||
|
||||
@@ -2283,7 +2283,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
|
||||
case BIOC_EJECT: /* Media has been removed from the slot */
|
||||
{
|
||||
fvdbg("BIOC_EJECT\n");
|
||||
finfo("BIOC_EJECT\n");
|
||||
|
||||
/* Process the removal of the card */
|
||||
|
||||
@@ -2330,7 +2330,7 @@ static void mmcsd_mediachange(FAR void *arg)
|
||||
{
|
||||
FAR struct mmcsd_state_s *priv = (FAR struct mmcsd_state_s *)arg;
|
||||
|
||||
fvdbg("arg: %p\n", arg);
|
||||
finfo("arg: %p\n", arg);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Is there a card present in the slot? */
|
||||
@@ -2411,7 +2411,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
|
||||
ret = mmcsd_recvR1(priv, SD_ACMD42);
|
||||
if (ret != OK)
|
||||
{
|
||||
fvdbg("WARNING: SD card does not support ACMD42: %d\n", ret);
|
||||
finfo("WARNING: SD card does not support ACMD42: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2438,7 +2438,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
|
||||
|
||||
/* Configure the SDIO peripheral */
|
||||
|
||||
fvdbg("Wide bus operation selected\n");
|
||||
finfo("Wide bus operation selected\n");
|
||||
SDIO_WIDEBUS(priv->dev, true);
|
||||
priv->widebus = true;
|
||||
|
||||
@@ -2454,7 +2454,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
|
||||
|
||||
#else /* CONFIG_SDIO_WIDTH_D1_ONLY */
|
||||
|
||||
fvdbg("Wide-bus operation is disabled\n");
|
||||
finfo("Wide-bus operation is disabled\n");
|
||||
return -ENOSYS;
|
||||
|
||||
#endif /* CONFIG_SDIO_WIDTH_D1_ONLY */
|
||||
@@ -2615,7 +2615,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv)
|
||||
return ret;
|
||||
}
|
||||
|
||||
fvdbg("RCA: %04x\n", priv->rca);
|
||||
finfo("RCA: %04x\n", priv->rca);
|
||||
|
||||
/* This should have caused a transition to standby state. However, this will
|
||||
* not be reflected in the present R1 status. R1/6 contains the state of
|
||||
@@ -2729,7 +2729,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
|
||||
|
||||
if (!SDIO_PRESENT(priv->dev))
|
||||
{
|
||||
fvdbg("No card present\n");
|
||||
finfo("No card present\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@@ -2779,7 +2779,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
|
||||
if (((response & MMCSD_R7VOLTAGE_MASK) == MMCSD_R7VOLTAGE_27) &&
|
||||
((response & MMCSD_R7ECHO_MASK) == MMCSD_R7CHECKPATTERN))
|
||||
{
|
||||
fvdbg("SD V2.x card\n");
|
||||
finfo("SD V2.x card\n");
|
||||
priv->type = MMCSD_CARDTYPE_SDV2;
|
||||
sdcapacity = MMCSD_ACMD41_HIGHCAPACITY;
|
||||
}
|
||||
@@ -2844,10 +2844,10 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
|
||||
* an SD V2.x (via CMD8), then this must be SD V1.x
|
||||
*/
|
||||
|
||||
fvdbg("R3: %08x\n", response);
|
||||
finfo("R3: %08x\n", response);
|
||||
if (priv->type == MMCSD_CARDTYPE_UNKNOWN)
|
||||
{
|
||||
fvdbg("SD V1.x card\n");
|
||||
finfo("SD V1.x card\n");
|
||||
priv->type = MMCSD_CARDTYPE_SDV1;
|
||||
}
|
||||
|
||||
@@ -2869,7 +2869,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
|
||||
|
||||
if ((response & MMCSD_R3_HIGHCAPACITY) != 0)
|
||||
{
|
||||
fvdbg("SD V2.x card with block addressing\n");
|
||||
finfo("SD V2.x card with block addressing\n");
|
||||
DEBUGASSERT(priv->type == MMCSD_CARDTYPE_SDV2);
|
||||
priv->type |= MMCSD_CARDTYPE_BLOCK;
|
||||
}
|
||||
@@ -2977,7 +2977,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv)
|
||||
{
|
||||
int ret;
|
||||
|
||||
fvdbg("type: %d probed: %d\n", priv->type, priv->probed);
|
||||
finfo("type: %d probed: %d\n", priv->type, priv->probed);
|
||||
|
||||
/* If we have reliable card detection events and if we have
|
||||
* already probed the card, then we don't need to do anything
|
||||
@@ -3045,7 +3045,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv)
|
||||
{
|
||||
/* Yes... */
|
||||
|
||||
fvdbg("Capacity: %lu Kbytes\n", (unsigned long)(priv->capacity / 1024));
|
||||
finfo("Capacity: %lu Kbytes\n", (unsigned long)(priv->capacity / 1024));
|
||||
priv->mediachanged = true;
|
||||
|
||||
/* Set up to receive asynchronous, media removal events */
|
||||
@@ -3066,7 +3066,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv)
|
||||
{
|
||||
/* There is no card in the slot */
|
||||
|
||||
fvdbg("No card\n");
|
||||
finfo("No card\n");
|
||||
#ifdef CONFIG_MMCSD_HAVECARDDETECT
|
||||
SDIO_CALLBACKENABLE(priv->dev, SDIOMEDIA_INSERTED);
|
||||
#endif
|
||||
@@ -3088,7 +3088,7 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv)
|
||||
|
||||
static int mmcsd_removed(FAR struct mmcsd_state_s *priv)
|
||||
{
|
||||
fvdbg("type: %d present: %d\n", priv->type, SDIO_PRESENT(priv->dev));
|
||||
finfo("type: %d present: %d\n", priv->type, SDIO_PRESENT(priv->dev));
|
||||
|
||||
/* Forget the card geometry, pretend the slot is empty (it might not
|
||||
* be), and that the card has never been initialized.
|
||||
@@ -3131,7 +3131,7 @@ static int mmcsd_hwinitialize(FAR struct mmcsd_state_s *priv)
|
||||
/* Does this architecture support DMA with the MMC/SD device? */
|
||||
|
||||
priv->dma = SDIO_DMASUPPORTED(priv->dev);
|
||||
fvdbg("DMA supported: %d\n", priv->dma);
|
||||
finfo("DMA supported: %d\n", priv->dma);
|
||||
#endif
|
||||
|
||||
/* Attach and prepare MMC/SD interrupts */
|
||||
@@ -3143,7 +3143,7 @@ static int mmcsd_hwinitialize(FAR struct mmcsd_state_s *priv)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
fvdbg("Attached MMC/SD interrupts\n");
|
||||
finfo("Attached MMC/SD interrupts\n");
|
||||
|
||||
/* Register a callback so that we get informed if media is inserted or
|
||||
* removed from the slot (Initially all callbacks are disabled).
|
||||
@@ -3174,7 +3174,7 @@ static int mmcsd_hwinitialize(FAR struct mmcsd_state_s *priv)
|
||||
ret = mmcsd_probe(priv);
|
||||
if (ret != OK)
|
||||
{
|
||||
fvdbg("Slot not empty, but initialization failed: %d\n", ret);
|
||||
finfo("Slot not empty, but initialization failed: %d\n", ret);
|
||||
|
||||
/* NOTE: The failure to initialize a card does not mean that
|
||||
* initialization has failed! A card could be installed in the slot
|
||||
@@ -3247,7 +3247,7 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev)
|
||||
char devname[16];
|
||||
int ret = -ENOMEM;
|
||||
|
||||
fvdbg("minor: %d\n", minor);
|
||||
finfo("minor: %d\n", minor);
|
||||
|
||||
/* Sanity check */
|
||||
|
||||
@@ -3293,7 +3293,7 @@ int mmcsd_slotinitialize(int minor, FAR struct sdio_dev_s *dev)
|
||||
|
||||
SDIO_CALLBACKENABLE(priv->dev, SDIOMEDIA_INSERTED);
|
||||
|
||||
fvdbg("MMC/SD slot is empty\n");
|
||||
finfo("MMC/SD slot is empty\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+41
-41
@@ -535,7 +535,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
|
||||
return (uint32_t)-1;
|
||||
}
|
||||
|
||||
fvdbg("CMD%d[%08x] R1B=%02x\n",
|
||||
finfo("CMD%d[%08x] R1B=%02x\n",
|
||||
cmd->cmd & 0x3f, arg, response);
|
||||
}
|
||||
break;
|
||||
@@ -544,7 +544,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
|
||||
|
||||
case MMCSD_CMDRESP_R1:
|
||||
{
|
||||
fvdbg("CMD%d[%08x] R1=%02x\n",
|
||||
finfo("CMD%d[%08x] R1=%02x\n",
|
||||
cmd->cmd & 0x3f, arg, response);
|
||||
}
|
||||
break;
|
||||
@@ -556,7 +556,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
|
||||
result = ((uint32_t)(response & 0xff) << 8);
|
||||
result |= SPI_SEND(spi, 0xff) & 0xff;
|
||||
|
||||
fvdbg("CMD%d[%08x] R2=%04x\n",
|
||||
finfo("CMD%d[%08x] R2=%04x\n",
|
||||
cmd->cmd & 0x3f, arg, result);
|
||||
}
|
||||
break;
|
||||
@@ -570,7 +570,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
|
||||
slot->ocr |= ((uint32_t)(SPI_SEND(spi, 0xff) & 0xff) << 8);
|
||||
slot->ocr |= SPI_SEND(spi, 0xff) & 0xff;
|
||||
|
||||
fvdbg("CMD%d[%08x] R1=%02x OCR=%08x\n",
|
||||
finfo("CMD%d[%08x] R1=%02x OCR=%08x\n",
|
||||
cmd->cmd & 0x3f, arg, response, slot->ocr);
|
||||
}
|
||||
break;
|
||||
@@ -585,7 +585,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
|
||||
slot->r7 |= ((uint32_t)(SPI_SEND(spi, 0xff) & 0xff) << 8);
|
||||
slot->r7 |= SPI_SEND(spi, 0xff) & 0xff;
|
||||
|
||||
fvdbg("CMD%d[%08x] R1=%02x R7=%08x\n",
|
||||
finfo("CMD%d[%08x] R1=%02x R7=%08x\n",
|
||||
cmd->cmd & 0x3f, arg, response, slot->r7);
|
||||
}
|
||||
break;
|
||||
@@ -609,7 +609,7 @@ static void mmcsd_setblklen(FAR struct mmcsd_slot_s *slot, uint32_t length)
|
||||
{
|
||||
uint32_t response;
|
||||
|
||||
fvdbg("Set block length to %d\n", length);
|
||||
finfo("Set block length to %d\n", length);
|
||||
response = mmcsd_sendcmd(slot, &g_cmd16, length);
|
||||
if (response != MMCSD_SPIR1_OK)
|
||||
{
|
||||
@@ -750,11 +750,11 @@ static void mmcsd_decodecsd(FAR struct mmcsd_slot_s *slot, uint8_t *csd)
|
||||
slot->twrite = SD_WRITEACCESS;
|
||||
}
|
||||
|
||||
fvdbg("SPI Frequency\n");
|
||||
fvdbg(" Maximum: %d Hz\n", maxfrequency);
|
||||
fvdbg(" Actual: %d Hz\n", frequency);
|
||||
fvdbg("Read access time: %d ticks\n", slot->taccess);
|
||||
fvdbg("Write access time: %d ticks\n", slot->twrite);
|
||||
finfo("SPI Frequency\n");
|
||||
finfo(" Maximum: %d Hz\n", maxfrequency);
|
||||
finfo(" Actual: %d Hz\n", frequency);
|
||||
finfo("Read access time: %d ticks\n", slot->taccess);
|
||||
finfo("Write access time: %d ticks\n", slot->twrite);
|
||||
|
||||
/* Get the physical geometry of the card: sector size and number of
|
||||
* sectors. The card's total capacity is computed from
|
||||
@@ -822,8 +822,8 @@ static void mmcsd_decodecsd(FAR struct mmcsd_slot_s *slot, uint8_t *csd)
|
||||
slot->sectorsize = 1 << readbllen;
|
||||
#endif
|
||||
slot->nsectors = csize << csizemult;
|
||||
fvdbg("Sector size: %d\n", SECTORSIZE(slot));
|
||||
fvdbg("Number of sectors: %d\n", slot->nsectors);
|
||||
finfo("Sector size: %d\n", SECTORSIZE(slot));
|
||||
finfo("Number of sectors: %d\n", slot->nsectors);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@@ -889,7 +889,7 @@ static int mmcsd_getcardinfo(FAR struct mmcsd_slot_s *slot, uint8_t *buffer,
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
response = SPI_SEND(spi, 0xff);
|
||||
fvdbg("%d. SPI send returned %02x\n", i, response);
|
||||
finfo("%d. SPI send returned %02x\n", i, response);
|
||||
|
||||
/* If a read operation fails and the card cannot provide the requested
|
||||
* data, it will send a data error token instead. The 4 least
|
||||
@@ -1029,7 +1029,7 @@ static int mmcsd_open(FAR struct inode *inode)
|
||||
FAR struct spi_dev_s *spi;
|
||||
int ret;
|
||||
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!inode || !inode->i_private)
|
||||
@@ -1067,7 +1067,7 @@ static int mmcsd_open(FAR struct inode *inode)
|
||||
ret = mmcsd_mediainitialize(slot);
|
||||
if (ret < 0)
|
||||
{
|
||||
fvdbg("Failed to initialize card\n");
|
||||
finfo("Failed to initialize card\n");
|
||||
goto errout_with_sem;
|
||||
}
|
||||
}
|
||||
@@ -1093,7 +1093,7 @@ errout_with_sem:
|
||||
|
||||
static int mmcsd_close(FAR struct inode *inode)
|
||||
{
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -1114,7 +1114,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
uint8_t response;
|
||||
int i;
|
||||
|
||||
fvdbg("start_sector=%d nsectors=%d\n", start_sector, nsectors);
|
||||
finfo("start_sector=%d nsectors=%d\n", start_sector, nsectors);
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!buffer)
|
||||
@@ -1166,12 +1166,12 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
if (IS_BLOCK(slot->type))
|
||||
{
|
||||
offset = start_sector;
|
||||
fvdbg("nbytes=%d sector offset=%d\n", nbytes, offset);
|
||||
finfo("nbytes=%d sector offset=%d\n", nbytes, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
offset = start_sector * SECTORSIZE(slot);
|
||||
fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset);
|
||||
finfo("nbytes=%d byte offset=%d\n", nbytes, offset);
|
||||
}
|
||||
|
||||
/* Select the slave */
|
||||
@@ -1239,7 +1239,7 @@ static ssize_t mmcsd_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
SPI_SEND(spi, 0xff);
|
||||
mmcsd_semgive(slot);
|
||||
|
||||
fvdbg("Read %d bytes:\n", nbytes);
|
||||
finfo("Read %d bytes:\n", nbytes);
|
||||
mmcsd_dumpbuffer("Read buffer", buffer, nbytes);
|
||||
return nsectors;
|
||||
|
||||
@@ -1268,7 +1268,7 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
|
||||
uint8_t response;
|
||||
int i;
|
||||
|
||||
fvdbg("start_sector=%d nsectors=%d\n", start_sector, nsectors);
|
||||
finfo("start_sector=%d nsectors=%d\n", start_sector, nsectors);
|
||||
|
||||
#ifdef CONFIG_DEBUG
|
||||
if (!buffer)
|
||||
@@ -1328,12 +1328,12 @@ static ssize_t mmcsd_write(FAR struct inode *inode, const unsigned char *buffer,
|
||||
if (IS_BLOCK(slot->type))
|
||||
{
|
||||
offset = start_sector;
|
||||
fvdbg("nbytes=%d sector offset=%d\n", nbytes, offset);
|
||||
finfo("nbytes=%d sector offset=%d\n", nbytes, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
offset = start_sector * SECTORSIZE(slot);
|
||||
fvdbg("nbytes=%d byte offset=%d\n", nbytes, offset);
|
||||
finfo("nbytes=%d byte offset=%d\n", nbytes, offset);
|
||||
}
|
||||
|
||||
mmcsd_dumpbuffer("Write buffer", buffer, nbytes);
|
||||
@@ -1519,11 +1519,11 @@ static int mmcsd_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
slot->state &= ~MMCSD_SLOTSTATUS_MEDIACHGD;
|
||||
mmcsd_semgive(slot);
|
||||
|
||||
fvdbg("geo_available: %d\n", geometry->geo_available);
|
||||
fvdbg("geo_mediachanged: %d\n", geometry->geo_mediachanged);
|
||||
fvdbg("geo_writeenabled: %d\n", geometry->geo_writeenabled);
|
||||
fvdbg("geo_nsectors: %d\n", geometry->geo_nsectors);
|
||||
fvdbg("geo_sectorsize: %d\n", geometry->geo_sectorsize);
|
||||
finfo("geo_available: %d\n", geometry->geo_available);
|
||||
finfo("geo_mediachanged: %d\n", geometry->geo_mediachanged);
|
||||
finfo("geo_writeenabled: %d\n", geometry->geo_writeenabled);
|
||||
finfo("geo_nsectors: %d\n", geometry->geo_nsectors);
|
||||
finfo("geo_sectorsize: %d\n", geometry->geo_sectorsize);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -1601,14 +1601,14 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
|
||||
* show IDLE STATE
|
||||
*/
|
||||
|
||||
fvdbg("Send CMD0\n");
|
||||
finfo("Send CMD0\n");
|
||||
SPI_SELECT(spi, SPIDEV_MMCSD, true);
|
||||
result = mmcsd_sendcmd(slot, &g_cmd0, 0);
|
||||
if (result == MMCSD_SPIR1_IDLESTATE)
|
||||
{
|
||||
/* Break out of the loop with card selected */
|
||||
|
||||
fvdbg("Card is in IDLE state\n");
|
||||
finfo("Card is in IDLE state\n");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1633,7 +1633,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
|
||||
* MMC.
|
||||
*/
|
||||
|
||||
fvdbg("Send CMD8\n");
|
||||
finfo("Send CMD8\n");
|
||||
result = mmcsd_sendcmd(slot, &g_cmd8, 0x1aa);
|
||||
if (result == MMCSD_SPIR1_IDLESTATE)
|
||||
{
|
||||
@@ -1650,7 +1650,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
|
||||
elapsed = 0;
|
||||
do
|
||||
{
|
||||
fvdbg("%d. Send CMD55/ACMD41\n", elapsed);
|
||||
finfo("%d. Send CMD55/ACMD41\n", elapsed);
|
||||
result = mmcsd_sendcmd(slot, &g_cmd55, 0);
|
||||
if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK)
|
||||
{
|
||||
@@ -1669,13 +1669,13 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
|
||||
|
||||
if (elapsed < MMCSD_DELAY_1SEC)
|
||||
{
|
||||
fvdbg("Send CMD58\n");
|
||||
finfo("Send CMD58\n");
|
||||
|
||||
SPI_SEND(spi, 0xff);
|
||||
result = mmcsd_sendcmd(slot, &g_cmd58, 0);
|
||||
if (result == MMCSD_SPIR1_OK)
|
||||
{
|
||||
fvdbg("OCR: %08x\n", slot->ocr);
|
||||
finfo("OCR: %08x\n", slot->ocr);
|
||||
if ((slot->ocr & MMCSD_OCR_CCS) != 0)
|
||||
{
|
||||
fdbg("Identified SD ver2 card/with block access\n");
|
||||
@@ -1697,7 +1697,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
|
||||
{
|
||||
/* Both the MMC card and the SD card support CMD55 */
|
||||
|
||||
fvdbg("Send CMD55/ACMD41\n");
|
||||
finfo("Send CMD55/ACMD41\n");
|
||||
result = mmcsd_sendcmd(slot, &g_cmd55, 0);
|
||||
if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK)
|
||||
{
|
||||
@@ -1719,7 +1719,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
|
||||
{
|
||||
if (IS_SD(slot->type))
|
||||
{
|
||||
fvdbg("%d. Send CMD55/ACMD41\n", elapsed);
|
||||
finfo("%d. Send CMD55/ACMD41\n", elapsed);
|
||||
result = mmcsd_sendcmd(slot, &g_cmd55, 0);
|
||||
if (result == MMCSD_SPIR1_IDLESTATE || result == MMCSD_SPIR1_OK)
|
||||
{
|
||||
@@ -1732,7 +1732,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
|
||||
}
|
||||
else
|
||||
{
|
||||
fvdbg("%d. Send CMD1\n", i);
|
||||
finfo("%d. Send CMD1\n", i);
|
||||
result = mmcsd_sendcmd(slot, &g_cmd1, 0);
|
||||
if (result == MMCSD_SPIR1_OK)
|
||||
{
|
||||
@@ -1765,7 +1765,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
|
||||
|
||||
/* Read CSD. CSD must always be valid */
|
||||
|
||||
fvdbg("Get CSD\n");
|
||||
finfo("Get CSD\n");
|
||||
result = mmcsd_getcsd(slot, csd);
|
||||
if (result != OK)
|
||||
{
|
||||
@@ -1879,7 +1879,7 @@ static void mmcsd_mediachanged(void *arg)
|
||||
ret = mmcsd_mediainitialize(slot);
|
||||
if (ret == 0)
|
||||
{
|
||||
fvdbg("mmcsd_mediainitialize returned OK\n");
|
||||
finfo("mmcsd_mediainitialize returned OK\n");
|
||||
slot->state |= MMCSD_SLOTSTATUS_MEDIACHGD;
|
||||
}
|
||||
}
|
||||
@@ -1954,7 +1954,7 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi)
|
||||
mmcsd_semgive(slot);
|
||||
if (ret == 0)
|
||||
{
|
||||
fvdbg("mmcsd_mediainitialize returned OK\n");
|
||||
finfo("mmcsd_mediainitialize returned OK\n");
|
||||
slot->state |= MMCSD_SLOTSTATUS_MEDIACHGD;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
|
||||
#ifdef CONFIG_MODEM_U_BLOX_DEBUG
|
||||
# define m_dbg dbg
|
||||
# define m_vdbg vdbg
|
||||
# define m_info info
|
||||
# define m_vlldbg lldbg
|
||||
# define m_vllvdbg llvdbg
|
||||
# define m_vllinfo llinfo
|
||||
#else
|
||||
# define m_dbg(x...)
|
||||
# define m_vdbg(x...)
|
||||
# define m_info(x...)
|
||||
# define m_lldbg(x...)
|
||||
# define m_llvdbg(x...)
|
||||
# define m_llinfo(x...)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@@ -149,7 +149,7 @@ static int ubxmdm_ioctl(FAR struct file* filep,
|
||||
int ret;
|
||||
FAR struct ubxmdm_status* status;
|
||||
|
||||
m_vdbg("cmd: %d arg: %ld\n", cmd, arg);
|
||||
m_info("cmd: %d arg: %ld\n", cmd, arg);
|
||||
DEBUGASSERT(upper && lower);
|
||||
|
||||
switch (cmd)
|
||||
@@ -235,7 +235,7 @@ static int ubxmdm_ioctl(FAR struct file* filep,
|
||||
*/
|
||||
|
||||
default:
|
||||
m_vdbg("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg);
|
||||
m_info("Forwarding unrecognized cmd: %d arg: %ld\n", cmd, arg);
|
||||
|
||||
if (lower->ops->ioctl)
|
||||
{
|
||||
@@ -326,7 +326,7 @@ void ubxmdm_unregister(FAR void *handle)
|
||||
lower = upper->lower;
|
||||
DEBUGASSERT(upper && lower);
|
||||
|
||||
m_vdbg("Unregistering: %s\n", upper->path);
|
||||
m_info("Unregistering: %s\n", upper->path);
|
||||
|
||||
DEBUGASSERT(lower->ops->poweroff);
|
||||
(void) lower->ops->poweroff(lower);
|
||||
|
||||
+11
-11
@@ -302,7 +302,7 @@ static ssize_t at24c_read_internal(FAR struct at24c_dev_s *priv, off_t offset,
|
||||
uint8_t buf[AT24XX_ADDRSIZE];
|
||||
uint16_t at24addr;
|
||||
|
||||
fvdbg("offset: %lu nbytes: %lu address: %02x\n",
|
||||
finfo("offset: %lu nbytes: %lu address: %02x\n",
|
||||
(unsigned long)offset, (unsigned long)nbytes, address);
|
||||
|
||||
/* "Random Read: A Random Read requires a dummy byte write sequence to load in the
|
||||
@@ -329,7 +329,7 @@ static ssize_t at24c_read_internal(FAR struct at24c_dev_s *priv, off_t offset,
|
||||
|
||||
while (at24c_i2c_write(priv, at24addr, buf, AT24XX_ADDRSIZE) < 0)
|
||||
{
|
||||
fvdbg("wait\n");
|
||||
finfo("wait\n");
|
||||
usleep(1000);
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ static ssize_t at24c_bread(FAR struct mtd_dev_s *dev, off_t startblock,
|
||||
nblocks *= (CONFIG_AT24XX_MTD_BLOCKSIZE / AT24XX_PAGESIZE);
|
||||
#endif
|
||||
|
||||
fvdbg("startblock: %08lx nblocks: %lu\n",
|
||||
finfo("startblock: %08lx nblocks: %lu\n",
|
||||
(unsigned long)startblock, (unsigned long)nblocks);
|
||||
|
||||
if (startblock >= priv->npages)
|
||||
@@ -427,7 +427,7 @@ static ssize_t at24c_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t
|
||||
nblocks = priv->npages - startblock;
|
||||
}
|
||||
|
||||
fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
|
||||
while (blocksleft-- > 0)
|
||||
{
|
||||
@@ -445,7 +445,7 @@ static ssize_t at24c_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t
|
||||
|
||||
while (at24c_i2c_write(priv, at24addr, buf, AT24XX_ADDRSIZE) < 0)
|
||||
{
|
||||
fvdbg("wait\n");
|
||||
finfo("wait\n");
|
||||
usleep(1000);
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ static ssize_t at24c_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes
|
||||
size_t memsize;
|
||||
uint8_t addr;
|
||||
|
||||
fvdbg("offset: %lu nbytes: %lu\n", (unsigned long)offset, (unsigned long)nbytes);
|
||||
finfo("offset: %lu nbytes: %lu\n", (unsigned long)offset, (unsigned long)nbytes);
|
||||
|
||||
/* Don't permit reads beyond the end of the memory region */
|
||||
|
||||
@@ -520,7 +520,7 @@ static int at24c_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
FAR struct at24c_dev_s *priv = (FAR struct at24c_dev_s *)dev;
|
||||
int ret = -EINVAL; /* Assume good command with bad parameters */
|
||||
|
||||
fvdbg("cmd: %d \n", cmd);
|
||||
finfo("cmd: %d \n", cmd);
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
@@ -561,7 +561,7 @@ static int at24c_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
#endif
|
||||
ret = OK;
|
||||
|
||||
fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
||||
finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
||||
geo->blocksize, geo->erasesize, geo->neraseblocks);
|
||||
}
|
||||
}
|
||||
@@ -610,7 +610,7 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev)
|
||||
FAR struct at24c_dev_s *priv;
|
||||
|
||||
#ifdef CONFIG_AT24XX_MULTI
|
||||
fvdbg("dev: %p address: %02x\n", dev, address);
|
||||
finfo("dev: %p address: %02x\n", dev, address);
|
||||
|
||||
/* Allocate a state structure (we allocate the structure instead of using
|
||||
* a fixed, static allocation so that we can handle multiple FLASH devices.
|
||||
@@ -627,7 +627,7 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev)
|
||||
}
|
||||
|
||||
#else
|
||||
fvdbg("dev: %p\n", dev);
|
||||
finfo("dev: %p\n", dev);
|
||||
|
||||
/* If only a signal AT24 part is supported then a statically allocated state
|
||||
* structure is used.
|
||||
@@ -669,7 +669,7 @@ FAR struct mtd_dev_s *at24c_initialize(FAR struct i2c_master_s *dev)
|
||||
|
||||
/* Return the implementation-specific state structure as the MTD device */
|
||||
|
||||
fvdbg("Return %p\n", priv);
|
||||
finfo("Return %p\n", priv);
|
||||
return (FAR struct mtd_dev_s *)priv;
|
||||
}
|
||||
|
||||
|
||||
+20
-20
@@ -213,7 +213,7 @@ static inline int at25_readid(struct at25_dev_s *priv)
|
||||
uint16_t manufacturer;
|
||||
uint16_t memory;
|
||||
|
||||
fvdbg("priv: %p\n", priv);
|
||||
finfo("priv: %p\n", priv);
|
||||
|
||||
/* Lock the SPI bus, configure the bus, and select this FLASH part. */
|
||||
|
||||
@@ -231,7 +231,7 @@ static inline int at25_readid(struct at25_dev_s *priv)
|
||||
SPI_SELECT(priv->dev, SPIDEV_FLASH, false);
|
||||
at25_unlock(priv->dev);
|
||||
|
||||
fvdbg("manufacturer: %02x memory: %02x\n",
|
||||
finfo("manufacturer: %02x memory: %02x\n",
|
||||
manufacturer, memory);
|
||||
|
||||
/* Check for a valid manufacturer and memory type */
|
||||
@@ -295,7 +295,7 @@ static void at25_waitwritecomplete(struct at25_dev_s *priv)
|
||||
fdbg("ERROR: Write error, status: 0x%02x\n", status);
|
||||
}
|
||||
|
||||
fvdbg("Complete, status: 0x%02x\n", status);
|
||||
finfo("Complete, status: 0x%02x\n", status);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@@ -307,7 +307,7 @@ static void at25_writeenable(struct at25_dev_s *priv)
|
||||
SPI_SELECT(priv->dev, SPIDEV_FLASH, true);
|
||||
(void)SPI_SEND(priv->dev, AT25_WREN);
|
||||
SPI_SELECT(priv->dev, SPIDEV_FLASH, false);
|
||||
fvdbg("Enabled\n");
|
||||
finfo("Enabled\n");
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@@ -318,7 +318,7 @@ static inline void at25_sectorerase(struct at25_dev_s *priv, off_t sector)
|
||||
{
|
||||
off_t offset = sector << priv->sectorshift;
|
||||
|
||||
fvdbg("sector: %08lx\n", (long)sector);
|
||||
finfo("sector: %08lx\n", (long)sector);
|
||||
|
||||
/* Wait for any preceding write to complete. We could simplify things by
|
||||
* perform this wait at the end of each write operation (rather than at
|
||||
@@ -352,7 +352,7 @@ static inline void at25_sectorerase(struct at25_dev_s *priv, off_t sector)
|
||||
/* Deselect the FLASH */
|
||||
|
||||
SPI_SELECT(priv->dev, SPIDEV_FLASH, false);
|
||||
fvdbg("Erased\n");
|
||||
finfo("Erased\n");
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@@ -361,7 +361,7 @@ static inline void at25_sectorerase(struct at25_dev_s *priv, off_t sector)
|
||||
|
||||
static inline int at25_bulkerase(struct at25_dev_s *priv)
|
||||
{
|
||||
fvdbg("priv: %p\n", priv);
|
||||
finfo("priv: %p\n", priv);
|
||||
|
||||
/* Wait for any preceding write to complete. We could simplify things by
|
||||
* perform this wait at the end of each write operation (rather than at
|
||||
@@ -386,7 +386,7 @@ static inline int at25_bulkerase(struct at25_dev_s *priv)
|
||||
/* Deselect the FLASH */
|
||||
|
||||
SPI_SELECT(priv->dev, SPIDEV_FLASH, false);
|
||||
fvdbg("Return: OK\n");
|
||||
finfo("Return: OK\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ static inline void at25_pagewrite(struct at25_dev_s *priv, FAR const uint8_t *bu
|
||||
{
|
||||
off_t offset = page << 8;
|
||||
|
||||
fvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset);
|
||||
finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset);
|
||||
|
||||
/* Wait for any preceding write to complete. We could simplify things by
|
||||
* perform this wait at the end of each write operation (rather than at
|
||||
@@ -434,7 +434,7 @@ static inline void at25_pagewrite(struct at25_dev_s *priv, FAR const uint8_t *bu
|
||||
/* Deselect the FLASH: Chip Select high */
|
||||
|
||||
SPI_SELECT(priv->dev, SPIDEV_FLASH, false);
|
||||
fvdbg("Written\n");
|
||||
finfo("Written\n");
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@@ -446,7 +446,7 @@ static int at25_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nblock
|
||||
FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev;
|
||||
size_t blocksleft = nblocks;
|
||||
|
||||
fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
|
||||
/* Lock access to the SPI bus until we complete the erase */
|
||||
|
||||
@@ -473,7 +473,7 @@ static ssize_t at25_bread(FAR struct mtd_dev_s *dev, off_t startblock, size_t nb
|
||||
FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev;
|
||||
ssize_t nbytes;
|
||||
|
||||
fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
|
||||
/* On this device, we can handle the block read just like the byte-oriented read */
|
||||
|
||||
@@ -496,7 +496,7 @@ static ssize_t at25_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t n
|
||||
FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev;
|
||||
size_t blocksleft = nblocks;
|
||||
|
||||
fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
|
||||
/* Lock the SPI bus and write each page to FLASH */
|
||||
|
||||
@@ -522,7 +522,7 @@ static ssize_t at25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes,
|
||||
{
|
||||
FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev;
|
||||
|
||||
fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes);
|
||||
finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes);
|
||||
|
||||
/* Wait for any preceding write to complete. We could simplify things by
|
||||
* perform this wait at the end of each write operation (rather than at
|
||||
@@ -556,7 +556,7 @@ static ssize_t at25_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes,
|
||||
SPI_SELECT(priv->dev, SPIDEV_FLASH, false);
|
||||
at25_unlock(priv->dev);
|
||||
|
||||
fvdbg("return nbytes: %d\n", (int)nbytes);
|
||||
finfo("return nbytes: %d\n", (int)nbytes);
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ static int at25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
FAR struct at25_dev_s *priv = (FAR struct at25_dev_s *)dev;
|
||||
int ret = -EINVAL; /* Assume good command with bad parameters */
|
||||
|
||||
fvdbg("cmd: %d \n", cmd);
|
||||
finfo("cmd: %d \n", cmd);
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
@@ -592,7 +592,7 @@ static int at25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
geo->neraseblocks = priv->nsectors;
|
||||
ret = OK;
|
||||
|
||||
fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
||||
finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
||||
geo->blocksize, geo->erasesize, geo->neraseblocks);
|
||||
}
|
||||
}
|
||||
@@ -614,7 +614,7 @@ static int at25_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
||||
break;
|
||||
}
|
||||
|
||||
fvdbg("return %d\n", ret);
|
||||
finfo("return %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -637,7 +637,7 @@ FAR struct mtd_dev_s *at25_initialize(FAR struct spi_dev_s *dev)
|
||||
FAR struct at25_dev_s *priv;
|
||||
int ret;
|
||||
|
||||
fvdbg("dev: %p\n", dev);
|
||||
finfo("dev: %p\n", dev);
|
||||
|
||||
/* Allocate a state structure (we allocate the structure instead of using
|
||||
* a fixed, static allocation so that we can handle multiple FLASH devices.
|
||||
@@ -695,6 +695,6 @@ FAR struct mtd_dev_s *at25_initialize(FAR struct spi_dev_s *dev)
|
||||
|
||||
/* Return the implementation-specific state structure as the MTD device */
|
||||
|
||||
fvdbg("Return %p\n", priv);
|
||||
finfo("Return %p\n", priv);
|
||||
return (FAR struct mtd_dev_s *)priv;
|
||||
}
|
||||
|
||||
+16
-16
@@ -341,7 +341,7 @@ static inline int at45db_rdid(FAR struct at45db_dev_s *priv)
|
||||
uint8_t capacity;
|
||||
uint8_t devid[3];
|
||||
|
||||
fvdbg("priv: %p\n", priv);
|
||||
finfo("priv: %p\n", priv);
|
||||
|
||||
/* Configure the bus, and select this FLASH part. (The caller should already have
|
||||
* locked the bus for exclusive access)
|
||||
@@ -360,7 +360,7 @@ static inline int at45db_rdid(FAR struct at45db_dev_s *priv)
|
||||
|
||||
SPI_SELECT(priv->spi, SPIDEV_FLASH, false);
|
||||
|
||||
fvdbg("manufacturer: %02x devid1: %02x devid2: %02x\n",
|
||||
finfo("manufacturer: %02x devid1: %02x devid2: %02x\n",
|
||||
devid[0], devid[1], devid[2]);
|
||||
|
||||
/* Check for a valid manufacturer and memory family */
|
||||
@@ -474,7 +474,7 @@ static inline void at45db_pgerase(FAR struct at45db_dev_s *priv, off_t sector)
|
||||
uint8_t erasecmd[4];
|
||||
off_t offset = sector << priv->pageshift;
|
||||
|
||||
fvdbg("sector: %08lx\n", (long)sector);
|
||||
finfo("sector: %08lx\n", (long)sector);
|
||||
|
||||
/* Higher performance write logic: We leave the chip busy after write and erase
|
||||
* operations. This improves write and erase performance because we do not have
|
||||
@@ -514,7 +514,7 @@ static inline void at45db_pgerase(FAR struct at45db_dev_s *priv, off_t sector)
|
||||
#ifndef CONFIG_AT45DB_PREWAIT
|
||||
at45db_waitbusy(priv);
|
||||
#endif
|
||||
fvdbg("Erased\n");
|
||||
finfo("Erased\n");
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@@ -523,7 +523,7 @@ static inline void at45db_pgerase(FAR struct at45db_dev_s *priv, off_t sector)
|
||||
|
||||
static inline int at32db_chiperase(FAR struct at45db_dev_s *priv)
|
||||
{
|
||||
fvdbg("priv: %p\n", priv);
|
||||
finfo("priv: %p\n", priv);
|
||||
|
||||
/* Higher performance write logic: We leave the chip busy after write and erase
|
||||
* operations. This improves write and erase performance because we do not have
|
||||
@@ -569,7 +569,7 @@ static inline void at45db_pgwrite(FAR struct at45db_dev_s *priv,
|
||||
uint8_t wrcmd [4];
|
||||
off_t offset = page << priv->pageshift;
|
||||
|
||||
fvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset);
|
||||
finfo("page: %08lx offset: %08lx\n", (long)page, (long)offset);
|
||||
|
||||
/* We assume that sectors are not write protected */
|
||||
|
||||
@@ -601,7 +601,7 @@ static inline void at45db_pgwrite(FAR struct at45db_dev_s *priv,
|
||||
#ifndef CONFIG_AT45DB_PREWAIT
|
||||
at45db_waitbusy(priv);
|
||||
#endif
|
||||
fvdbg("Written\n");
|
||||
finfo("Written\n");
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@@ -613,7 +613,7 @@ static int at45db_erase(FAR struct mtd_dev_s *mtd, off_t startblock, size_t nblo
|
||||
FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd;
|
||||
size_t pgsleft = nblocks;
|
||||
|
||||
fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
|
||||
/* Take the lock so that we have exclusive access to the bus, then power up the
|
||||
* FLASH device.
|
||||
@@ -669,7 +669,7 @@ static ssize_t at45db_bwrite(FAR struct mtd_dev_s *mtd, off_t startblock,
|
||||
FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd;
|
||||
size_t pgsleft = nblocks;
|
||||
|
||||
fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
finfo("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks);
|
||||
|
||||
/* Take the lock so that we have exclusive access to the bus, then power up the
|
||||
* FLASH device.
|
||||
@@ -703,7 +703,7 @@ static ssize_t at45db_read(FAR struct mtd_dev_s *mtd, off_t offset, size_t nbyte
|
||||
FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd;
|
||||
uint8_t rdcmd [5];
|
||||
|
||||
fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes);
|
||||
finfo("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes);
|
||||
|
||||
/* Set up for the read */
|
||||
|
||||
@@ -741,7 +741,7 @@ static ssize_t at45db_read(FAR struct mtd_dev_s *mtd, off_t offset, size_t nbyte
|
||||
at45db_pwrdown(priv);
|
||||
at45db_unlock(priv);
|
||||
|
||||
fvdbg("return nbytes: %d\n", (int)nbytes);
|
||||
finfo("return nbytes: %d\n", (int)nbytes);
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
@@ -754,7 +754,7 @@ static int at45db_ioctl(FAR struct mtd_dev_s *mtd, int cmd, unsigned long arg)
|
||||
FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd;
|
||||
int ret = -EINVAL; /* Assume good command with bad parameters */
|
||||
|
||||
fvdbg("cmd: %d \n", cmd);
|
||||
finfo("cmd: %d \n", cmd);
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
@@ -777,7 +777,7 @@ static int at45db_ioctl(FAR struct mtd_dev_s *mtd, int cmd, unsigned long arg)
|
||||
geo->neraseblocks = priv->npages;
|
||||
ret = OK;
|
||||
|
||||
fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
||||
finfo("blocksize: %d erasesize: %d neraseblocks: %d\n",
|
||||
geo->blocksize, geo->erasesize, geo->neraseblocks);
|
||||
}
|
||||
}
|
||||
@@ -806,7 +806,7 @@ static int at45db_ioctl(FAR struct mtd_dev_s *mtd, int cmd, unsigned long arg)
|
||||
break;
|
||||
}
|
||||
|
||||
fvdbg("return %d\n", ret);
|
||||
finfo("return %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -830,7 +830,7 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi)
|
||||
uint8_t sr;
|
||||
int ret;
|
||||
|
||||
fvdbg("spi: %p\n", spi);
|
||||
finfo("spi: %p\n", spi);
|
||||
|
||||
/* Allocate a state structure (we allocate the structure instead of using a fixed,
|
||||
* static allocation so that we can handle multiple FLASH devices. The current
|
||||
@@ -906,7 +906,7 @@ FAR struct mtd_dev_s *at45db_initialize(FAR struct spi_dev_s *spi)
|
||||
mtd_register(&priv->mtd, "at45db");
|
||||
#endif
|
||||
|
||||
fvdbg("Return %p\n", priv);
|
||||
finfo("Return %p\n", priv);
|
||||
return (FAR struct mtd_dev_s *)priv;
|
||||
|
||||
/* On any failure, we need free memory allocations and release the lock that
|
||||
|
||||
+11
-11
@@ -133,7 +133,7 @@ static const struct block_operations g_bops =
|
||||
|
||||
static int ftl_open(FAR struct inode *inode)
|
||||
{
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ static int ftl_open(FAR struct inode *inode)
|
||||
|
||||
static int ftl_close(FAR struct inode *inode)
|
||||
{
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ static ssize_t ftl_read(FAR struct inode *inode, unsigned char *buffer,
|
||||
{
|
||||
FAR struct ftl_struct_s *dev;
|
||||
|
||||
fvdbg("sector: %d nsectors: %d\n", start_sector, nsectors);
|
||||
finfo("sector: %d nsectors: %d\n", start_sector, nsectors);
|
||||
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
|
||||
@@ -271,7 +271,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
|
||||
nbytes = dev->geo.erasesize - offset;
|
||||
}
|
||||
|
||||
fvdbg("Copy %d bytes into erase block=%d at offset=%d\n",
|
||||
finfo("Copy %d bytes into erase block=%d at offset=%d\n",
|
||||
nbytes, eraseblock, offset);
|
||||
|
||||
memcpy(dev->eblock + offset, buffer, nbytes);
|
||||
@@ -315,7 +315,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
|
||||
|
||||
/* Write a full erase back to flash */
|
||||
|
||||
fvdbg("Write %d bytes into erase block=%d at offset=0\n",
|
||||
finfo("Write %d bytes into erase block=%d at offset=0\n",
|
||||
dev->geo.erasesize, alignedblock);
|
||||
|
||||
nxfrd = MTD_BWRITE(dev->mtd, alignedblock, dev->blkper, buffer);
|
||||
@@ -358,7 +358,7 @@ static ssize_t ftl_flush(FAR void *priv, FAR const uint8_t *buffer,
|
||||
/* Copy the user data at the beginning the buffered erase block */
|
||||
|
||||
nbytes = remaining * dev->geo.blocksize;
|
||||
fvdbg("Copy %d bytes into erase block=%d at offset=0\n",
|
||||
finfo("Copy %d bytes into erase block=%d at offset=0\n",
|
||||
nbytes, alignedblock);
|
||||
memcpy(dev->eblock, buffer, nbytes);
|
||||
|
||||
@@ -389,7 +389,7 @@ static ssize_t ftl_write(FAR struct inode *inode, const unsigned char *buffer,
|
||||
{
|
||||
struct ftl_struct_s *dev;
|
||||
|
||||
fvdbg("sector: %d nsectors: %d\n", start_sector, nsectors);
|
||||
finfo("sector: %d nsectors: %d\n", start_sector, nsectors);
|
||||
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
dev = (struct ftl_struct_s *)inode->i_private;
|
||||
@@ -412,7 +412,7 @@ static int ftl_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
{
|
||||
struct ftl_struct_s *dev;
|
||||
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
|
||||
DEBUGASSERT(inode);
|
||||
if (geometry)
|
||||
@@ -428,9 +428,9 @@ static int ftl_geometry(FAR struct inode *inode, struct geometry *geometry)
|
||||
geometry->geo_nsectors = dev->geo.neraseblocks * dev->blkper;
|
||||
geometry->geo_sectorsize = dev->geo.blocksize;
|
||||
|
||||
fvdbg("available: true mediachanged: false writeenabled: %s\n",
|
||||
finfo("available: true mediachanged: false writeenabled: %s\n",
|
||||
geometry->geo_writeenabled ? "true" : "false");
|
||||
fvdbg("nsectors: %d sectorsize: %d\n",
|
||||
finfo("nsectors: %d sectorsize: %d\n",
|
||||
geometry->geo_nsectors, geometry->geo_sectorsize);
|
||||
|
||||
return OK;
|
||||
@@ -451,7 +451,7 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
|
||||
struct ftl_struct_s *dev ;
|
||||
int ret;
|
||||
|
||||
fvdbg("Entry\n");
|
||||
finfo("Entry\n");
|
||||
DEBUGASSERT(inode && inode->i_private);
|
||||
|
||||
/* Only one block driver ioctl command is supported by this driver (and
|
||||
|
||||
@@ -301,11 +301,11 @@ static int hamming_verify256(FAR uint8_t *data, FAR const uint8_t *original)
|
||||
|
||||
/* There are bit errors */
|
||||
|
||||
fvdbg("Read: %02x %02x %02x\n",
|
||||
finfo("Read: %02x %02x %02x\n",
|
||||
original[0], original[1], original[2]);
|
||||
fvdbg("Computed: %02x %02x %02x\n",
|
||||
finfo("Computed: %02x %02x %02x\n",
|
||||
computed[0], computed[1], computed[2]);
|
||||
fvdbg("Correction: %02x %02x %02x\n",
|
||||
finfo("Correction: %02x %02x %02x\n",
|
||||
correction[0], correction[1], correction[2]);
|
||||
|
||||
/* If there is a single bit error, there are 11 bits set to 1 */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user