Update everything under nuttx/drivers to use the corrected syslog interfaces

This commit is contained in:
Gregory Nutt 2014-10-08 10:18:58 -06:00
parent d55ab6a0f5
commit d7d759f7a7
14 changed files with 198 additions and 167 deletions

View File

@ -215,10 +215,10 @@ void wm8904_dump_registers(FAR struct audio_lowerhalf_s *dev,
{ {
int i; int i;
syslog("WM8904 Registers: %s\n", msg); syslog(LOG_INFO, "WM8904 Registers: %s\n", msg);
for (i = 0; i < WM8904_NREGISTERS; i++) for (i = 0; i < WM8904_NREGISTERS; i++)
{ {
syslog("%16s[%02x]: %04x\n", syslog(LOG_INFO, "%16s[%02x]: %04x\n",
g_wm8904_debug[i].regname, g_wm8904_debug[i].regaddr, g_wm8904_debug[i].regname, g_wm8904_debug[i].regaddr,
wm8904_readreg((FAR struct wm8904_dev_s *)dev, wm8904_readreg((FAR struct wm8904_dev_s *)dev,
g_wm8904_debug[i].regaddr)); g_wm8904_debug[i].regaddr));
@ -252,9 +252,10 @@ void wm8904_clock_analysis(FAR struct audio_lowerhalf_s *dev,
unsigned int tmp; unsigned int tmp;
double ftmp; double ftmp;
syslog("WM8904 Clock Analysis: %s\n", msg); syslog(LOG_INFO, "WM8904 Clock Analysis: %s\n", msg);
DEBUGASSERT(priv && priv->lower); DEBUGASSERT(priv && priv->lower);
syslog(" MCLK: %lu Hz\n", (unsigned long)priv->lower->mclk); syslog(LOG_INFO, " MCLK: %lu Hz\n",
(unsigned long)priv->lower->mclk);
/* Is the SYSCLK source the FLL? Or MCK? */ /* Is the SYSCLK source the FLL? Or MCK? */
@ -266,7 +267,7 @@ void wm8904_clock_analysis(FAR struct audio_lowerhalf_s *dev,
*/ */
sysclk = priv->lower->mclk; sysclk = priv->lower->mclk;
syslog(" SYSCLK Source: MCLK (%s)\n", syslog(LOG_INFO, " SYSCLK Source: MCLK (%s)\n",
(regval & WM8904_MCLK_INV) != 0 ? "inverted" : "not inverted"); (regval & WM8904_MCLK_INV) != 0 ? "inverted" : "not inverted");
} }
else else
@ -291,116 +292,121 @@ void wm8904_clock_analysis(FAR struct audio_lowerhalf_s *dev,
switch (regval & WM8904_FLL_CLK_REF_SRC_MASK) switch (regval & WM8904_FLL_CLK_REF_SRC_MASK)
{ {
case WM8904_FLL_CLK_REF_SRC_MCLK: case WM8904_FLL_CLK_REF_SRC_MCLK:
syslog(" FLL Source: MCLK\n"); syslog(LOG_INFO, " FLL Source: MCLK\n");
break; break;
case WM8904_FLL_CLK_REF_SRC_BCLK: case WM8904_FLL_CLK_REF_SRC_BCLK:
syslog(" ERROR: FLL source is BCLK: %04x\n", regval); syslog(LOG_INFO, " ERROR: FLL source is BCLK: %04x\n",
regval);
break; break;
case WM8904_FLL_CLK_REF_SRC_LRCLK: case WM8904_FLL_CLK_REF_SRC_LRCLK:
syslog(" ERROR: FLL source is LRCLK: %04x\n", regval); syslog(LOG_INFO, " ERROR: FLL source is LRCLK: %04x\n",
regval);
break; break;
default: default:
syslog(" ERROR: Unrecognized FLL source: %04x\n", regval); syslog(LOG_INFO, " ERROR: Unrecognized FLL source: %04x\n",
regval);
} }
syslog(" Fref: %lu Hz (before divider)\n", fref); syslog(LOG_INFO, " Fref: %lu Hz (before divider)\n",
fref);
switch (regval & WM8904_FLL_CLK_REF_DIV_MASK) switch (regval & WM8904_FLL_CLK_REF_DIV_MASK)
{ {
case WM8904_FLL_CLK_REF_DIV1: case WM8904_FLL_CLK_REF_DIV1:
syslog(" FLL_CLK_REF_DIV: 1\n"); syslog(LOG_INFO, " FLL_CLK_REF_DIV: 1\n");
break; break;
case WM8904_FLL_CLK_REF_DIV2: case WM8904_FLL_CLK_REF_DIV2:
syslog(" FLL_CLK_REF_DIV: 2\n"); syslog(LOG_INFO, " FLL_CLK_REF_DIV: 2\n");
fref >>= 1; fref >>= 1;
break; break;
case WM8904_FLL_CLK_REF_DIV4: case WM8904_FLL_CLK_REF_DIV4:
syslog(" FLL_CLK_REF_DIV: 4\n"); syslog(LOG_INFO, " FLL_CLK_REF_DIV: 4\n");
fref >>= 2; fref >>= 2;
break; break;
case WM8904_FLL_CLK_REF_DIV8: case WM8904_FLL_CLK_REF_DIV8:
syslog(" FLL_CLK_REF_DIV: 8\n"); syslog(LOG_INFO, " FLL_CLK_REF_DIV: 8\n");
fref >>= 3; fref >>= 3;
break; break;
} }
syslog(" Fref: %lu Hz (after divider)\n", fref); syslog(LOG_INFO, " Fref: %lu Hz (after divider)\n", fref);
regval = wm8904_readreg(priv, WM8904_FLL_CTRL2); regval = wm8904_readreg(priv, WM8904_FLL_CTRL2);
frndx = (regval & WM8904_FLL_FRATIO_MASK) >> WM8904_FLL_FRATIO_SHIFT; frndx = (regval & WM8904_FLL_FRATIO_MASK) >> WM8904_FLL_FRATIO_SHIFT;
tmp = (regval & WM8904_FLL_CTRL_RATE_MASK) >> WM8904_FLL_CTRL_RATE_SHIFT; tmp = (regval & WM8904_FLL_CTRL_RATE_MASK) >> WM8904_FLL_CTRL_RATE_SHIFT;
outdiv = ((regval & WM8904_FLL_OUTDIV_MASK) >> WM8904_FLL_OUTDIV_SHIFT) + 1; outdiv = ((regval & WM8904_FLL_OUTDIV_MASK) >> WM8904_FLL_OUTDIV_SHIFT) + 1;
syslog(" FLL_CTRL_RATE: Fvco / %u\n", tmp + 1); syslog(LOG_INFO, " FLL_CTRL_RATE: Fvco / %u\n", tmp + 1);
regval = wm8904_readreg(priv, WM8904_FLL_CTRL4); regval = wm8904_readreg(priv, WM8904_FLL_CTRL4);
flln = (regval & WM8904_FLL_N_MASK) >> WM8904_FLL_N_SHIFT; flln = (regval & WM8904_FLL_N_MASK) >> WM8904_FLL_N_SHIFT;
tmp = (regval & WM8904_FLL_GAIN_MASK) >> WM8904_FLL_GAIN_SHIFT; tmp = (regval & WM8904_FLL_GAIN_MASK) >> WM8904_FLL_GAIN_SHIFT;
syslog(" FLL_GAIN: %u\n", (1 << tmp)); syslog(LOG_INFO, " FLL_GAIN: %u\n", (1 << tmp));
fllk = wm8904_readreg(priv, WM8904_FLL_CTRL3); fllk = wm8904_readreg(priv, WM8904_FLL_CTRL3);
nk = (double)flln + ((double)fllk / 65536.0); nk = (double)flln + ((double)fllk / 65536.0);
fratio = g_fllratio[frndx]; fratio = g_fllratio[frndx];
syslog(" FLL_FRATIO: %u\n", fratio); syslog(LOG_INFO, " FLL_FRATIO: %u\n", fratio);
syslog(" FLL_OUTDIV: %u\n", outdiv); syslog(LOG_INFO, " FLL_OUTDIV: %u\n", outdiv);
syslog(" FLL_N.K: %u.%05u\n", flln, fllk); syslog(LOG_INFO, " FLL_N.K: %u.%05u\n", flln, fllk);
ftmp = nk * (double)fref * (double)fratio; ftmp = nk * (double)fref * (double)fratio;
fvco = (uint32_t)ftmp; fvco = (uint32_t)ftmp;
syslog(" Fvco: %lu Hz\n", (unsigned long)fvco); syslog(LOG_INFO, " Fvco: %lu Hz\n", (unsigned long)fvco);
fout = fvco / outdiv; fout = fvco / outdiv;
syslog(" Fout: %lu Hz\n", (unsigned long)fout); syslog(LOG_INFO, " Fout: %lu Hz\n", (unsigned long)fout);
regval = wm8904_readreg(priv, WM8904_FLL_CTRL1); regval = wm8904_readreg(priv, WM8904_FLL_CTRL1);
syslog(" FLL_FRACN_ENA: %s\n", syslog(LOG_INFO, " FLL_FRACN_ENA: %s\n",
(regval & WM8904_FLL_FRACN_ENA) != 0 ? "Enabled" : "Disabled"); (regval & WM8904_FLL_FRACN_ENA) != 0 ? "Enabled" : "Disabled");
syslog(" FLL_OSC_ENA: %s\n", syslog(LOG_INFO, " FLL_OSC_ENA: %s\n",
(regval & WM8904_FLL_OSC_ENA) != 0 ? "Enabled" : "Disabled"); (regval & WM8904_FLL_OSC_ENA) != 0 ? "Enabled" : "Disabled");
syslog(" FLL_ENA: %s\n", syslog(LOG_INFO, " FLL_ENA: %s\n",
(regval & WM8904_FLL_ENA) != 0 ? "Enabled" : "Disabled"); (regval & WM8904_FLL_ENA) != 0 ? "Enabled" : "Disabled");
if ((regval & WM8904_FLL_ENA) == 0) if ((regval & WM8904_FLL_ENA) == 0)
{ {
syslog(" No SYSCLK\n"); syslog(LOG_INFO, " No SYSCLK\n");
return; return;
} }
sysclk = fout; sysclk = fout;
} }
syslog(" SYSCLK: %lu Hz (before divider)\n", (unsigned long)sysclk); syslog(LOG_INFO, " SYSCLK: %lu Hz (before divider)\n",
(unsigned long)sysclk);
regval = wm8904_readreg(priv, WM8904_CLKRATE0); regval = wm8904_readreg(priv, WM8904_CLKRATE0);
if ((regval & WM8904_MCLK_DIV) == WM8904_MCLK_DIV1) if ((regval & WM8904_MCLK_DIV) == WM8904_MCLK_DIV1)
{ {
syslog(" MCLK_DIV: 1\n"); syslog(LOG_INFO, " MCLK_DIV: 1\n");
} }
else else
{ {
syslog(" MCLK_DIV: 2\n"); syslog(LOG_INFO, " MCLK_DIV: 2\n");
sysclk >>=1; sysclk >>=1;
} }
syslog(" SYSCLK: %lu (after divider)\n", (unsigned long)sysclk); syslog(LOG_INFO, " SYSCLK: %lu (after divider)\n", (unsigned long)sysclk);
regval = wm8904_readreg(priv, WM8904_CLKRATE2); regval = wm8904_readreg(priv, WM8904_CLKRATE2);
syslog(" CLK_SYS_ENA: %s\n", syslog(LOG_INFO, " CLK_SYS_ENA: %s\n",
(regval & WM8904_CLK_SYS_ENA) != 0 ? "Enabled" : "Disabled"); (regval & WM8904_CLK_SYS_ENA) != 0 ? "Enabled" : "Disabled");
if ((regval & WM8904_CLK_SYS_ENA) == 0) if ((regval & WM8904_CLK_SYS_ENA) == 0)
{ {
syslog(" No SYSCLK\n"); syslog(LOG_INFO, " No SYSCLK\n");
return; return;
} }
@ -409,15 +415,15 @@ void wm8904_clock_analysis(FAR struct audio_lowerhalf_s *dev,
tmp = g_sysclk_scaleb1[tmp]; tmp = g_sysclk_scaleb1[tmp];
ftmp = (double)tmp / 2.0; ftmp = (double)tmp / 2.0;
syslog(" BCLK_DIV: SYSCLK / %u.%01u\n", syslog(LOG_INFO, " BCLK_DIV: SYSCLK / %u.%01u\n",
(unsigned int)(tmp >> 1), (unsigned int)(5 * (tmp & 1))); (unsigned int)(tmp >> 1), (unsigned int)(5 * (tmp & 1)));
bclk = (uint32_t)(sysclk / ftmp); bclk = (uint32_t)(sysclk / ftmp);
syslog(" BCLK: %lu Hz\n", (unsigned long)bclk); syslog(LOG_INFO, " BCLK: %lu Hz\n", (unsigned long)bclk);
regval = wm8904_readreg(priv, WM8904_AIF1); regval = wm8904_readreg(priv, WM8904_AIF1);
syslog(" BCLK_DIR: %s\n", syslog(LOG_INFO, " BCLK_DIR: %s\n",
(regval & WM8904_BCLK_DIR) != 0 ? "Output" : "Input"); (regval & WM8904_BCLK_DIR) != 0 ? "Output" : "Input");
regval = wm8904_readreg(priv, WM8904_AIF3); regval = wm8904_readreg(priv, WM8904_AIF3);
@ -425,9 +431,9 @@ void wm8904_clock_analysis(FAR struct audio_lowerhalf_s *dev,
lrclk = bclk / tmp; lrclk = bclk / tmp;
syslog(" LRCLK_RATE: BCLK / %lu\n", (unsigned long)tmp); syslog(LOG_INFO, " LRCLK_RATE: BCLK / %lu\n", (unsigned long)tmp);
syslog(" LRCLK: %lu Hz\n", (unsigned long)lrclk); syslog(LOG_INFO, " LRCLK: %lu Hz\n", (unsigned long)lrclk);
syslog(" LRCLK_DIR: %s\n", syslog(LOG_INFO, " LRCLK_DIR: %s\n",
(regval & WM8904_LRCLK_DIR) != 0 ? "Output" : "Input"); (regval & WM8904_LRCLK_DIR) != 0 ? "Output" : "Input");
} }
#endif /* CONFIG_WM8904_CLKDEBUG */ #endif /* CONFIG_WM8904_CLKDEBUG */

View File

@ -495,15 +495,16 @@ static void mio283qt2_dumprun(FAR const char *msg, FAR uint16_t *run, size_t npi
{ {
int i, j; int i, j;
syslog("\n%s:\n", msg); syslog(LOG_INFO, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16) for (i = 0; i < npixels; i += 16)
{ {
up_putc(' '); up_putc(' ');
syslog(" "); syslog(LOG_INFO, " ");
for (j = 0; j < 16; j++) for (j = 0; j < 16; j++)
{ {
syslog(" %04x", *run++); syslog(LOG_INFO, " %04x", *run++);
} }
up_putc('\n'); up_putc('\n');
} }
} }

View File

@ -411,14 +411,14 @@ static void mio283qt9a_dumprun(FAR const char *msg, FAR uint16_t *run, size_t np
int i; int i;
int j; int j;
syslog("\n%s:\n", msg); syslog(LOG_INFO, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16) for (i = 0; i < npixels; i += 16)
{ {
up_putc(' '); up_putc(' ');
syslog(" "); syslog(LOG_INFO, " ");
for (j = 0; j < 16; j++) for (j = 0; j < 16; j++)
{ {
syslog(" %04x", *run++); syslog(LOG_INFO, " %04x", *run++);
} }
up_putc('\n'); up_putc('\n');

View File

@ -497,14 +497,14 @@ static void ssd1289_dumprun(FAR const char *msg, FAR uint16_t *run, size_t npixe
{ {
int i, j; int i, j;
syslog("\n%s:\n", msg); syslog(LOG_INFO, "\n%s:\n", msg);
for (i = 0; i < npixels; i += 16) for (i = 0; i < npixels; i += 16)
{ {
up_putc(' '); up_putc(' ');
syslog(" "); syslog(LOG_INFO, " ");
for (j = 0; j < 16; j++) for (j = 0; j < 16; j++)
{ {
syslog(" %04x", *run++); syslog(LOG_INFO, " %04x", *run++);
} }
up_putc('\n'); up_putc('\n');
} }

View File

@ -53,14 +53,6 @@
* Pre-Processor Definitions * Pre-Processor Definitions
****************************************************************************/ ****************************************************************************/
/* This needs to match the logic in include/debug.h */
#ifdef CONFIG_CPP_HAVE_VARARGS
# define message(format, ...) syslog(format, ##__VA_ARGS__)
#else
# define message syslog
#endif
/**************************************************************************** /****************************************************************************
* Private Types * Private Types
****************************************************************************/ ****************************************************************************/
@ -101,6 +93,7 @@ void mmcsd_dmpcsd(FAR const uint8_t *csd, uint8_t cardtype)
{ {
fvdbg(" MMC SPEC_VERS: %d\n", MMC_CSD_SPECVERS(csd)); fvdbg(" MMC SPEC_VERS: %d\n", MMC_CSD_SPECVERS(csd));
} }
fvdbg(" TAAC:\n", fvdbg(" TAAC:\n",
sd2 ? SD20_CSD_TAC_TIMEVALUE(csd) : MMCSD_CSD_TAAC_TIMEVALUE(csd)); sd2 ? SD20_CSD_TAC_TIMEVALUE(csd) : MMCSD_CSD_TAAC_TIMEVALUE(csd));
fvdbg(" TIME_VALUE: 0x%02x\n", fvdbg(" TIME_VALUE: 0x%02x\n",

View File

@ -192,10 +192,14 @@
/* Debug ********************************************************************/ /* Debug ********************************************************************/
#ifdef CONFIG_ENC28J60_REGDEBUG #ifdef CONFIG_ENC28J60_REGDEBUG
# define enc_wrdump(a,v) lowsyslog("ENC28J60: %02x<-%02x\n", a, v); # define enc_wrdump(a,v) \
# define enc_rddump(a,v) lowsyslog("ENC28J60: %02x->%02x\n", a, v); lowsyslog(LOG_DEBUG, "ENC28J60: %02x<-%02x\n", a, v);
# define enc_cmddump(c) lowsyslog("ENC28J60: CMD: %02x\n", c); # define enc_rddump(a,v) \
# define enc_bmdump(c,b,s) lowsyslog("ENC28J60: CMD: %02x buffer: %p length: %d\n", c,b,s); lowsyslog(LOG_DEBUG, "ENC28J60: %02x->%02x\n", a, v);
# define enc_cmddump(c) \
lowsyslog(LOG_DEBUG, "ENC28J60: CMD: %02x\n", c);
# define enc_bmdump(c,b,s) \
lowsyslog(LOG_DEBUG, "ENC28J60: CMD: %02x buffer: %p length: %d\n", c,b,s);
#else #else
# define enc_wrdump(a,v) # define enc_wrdump(a,v)
# define enc_rddump(a,v) # define enc_rddump(a,v)
@ -786,25 +790,25 @@ static int enc_waitbreg(FAR struct enc_driver_s *priv, uint8_t ctrlreg,
#if 0 /* Sometimes useful */ #if 0 /* Sometimes useful */
static void enc_rxdump(FAR struct enc_driver_s *priv) static void enc_rxdump(FAR struct enc_driver_s *priv)
{ {
lowsyslog("Rx Registers:\n"); lowsyslog(LOG_DEBUG, "Rx Registers:\n");
lowsyslog(" EIE: %02x EIR: %02x\n", lowsyslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n",
enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR));
lowsyslog(" ESTAT: %02x ECON1: %02x ECON2: %02x\n", lowsyslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x ECON2: %02x\n",
enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1), enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1),
enc_rdgreg(priv, ENC_ECON2)); enc_rdgreg(priv, ENC_ECON2));
lowsyslog(" ERXST: %02x %02x\n", lowsyslog(LOG_DEBUG, " ERXST: %02x %02x\n",
enc_rdbreg(priv, ENC_ERXSTH), enc_rdbreg(priv, ENC_ERXSTL)); enc_rdbreg(priv, ENC_ERXSTH), enc_rdbreg(priv, ENC_ERXSTL));
lowsyslog(" ERXND: %02x %02x\n", lowsyslog(LOG_DEBUG, " ERXND: %02x %02x\n",
enc_rdbreg(priv, ENC_ERXNDH), enc_rdbreg(priv, ENC_ERXNDL)); enc_rdbreg(priv, ENC_ERXNDH), enc_rdbreg(priv, ENC_ERXNDL));
lowsyslog(" ERXRDPT: %02x %02x\n", lowsyslog(LOG_DEBUG, " ERXRDPT: %02x %02x\n",
enc_rdbreg(priv, ENC_ERXRDPTH), enc_rdbreg(priv, ENC_ERXRDPTL)); enc_rdbreg(priv, ENC_ERXRDPTH), enc_rdbreg(priv, ENC_ERXRDPTL));
lowsyslog(" ERXFCON: %02x EPKTCNT: %02x\n", lowsyslog(LOG_DEBUG, " ERXFCON: %02x EPKTCNT: %02x\n",
enc_rdbreg(priv, ENC_ERXFCON), enc_rdbreg(priv, ENC_EPKTCNT)); enc_rdbreg(priv, ENC_ERXFCON), enc_rdbreg(priv, ENC_EPKTCNT));
lowsyslog(" MACON1: %02x MACON3: %02x\n", lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x\n",
enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3)); enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3));
lowsyslog(" MAMXFL: %02x %02x\n", lowsyslog(LOG_DEBUG, " MAMXFL: %02x %02x\n",
enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL));
lowsyslog(" MAADR: %02x:%02x:%02x:%02x:%02x:%02x\n", lowsyslog(LOG_DEBUG, " MAADR: %02x:%02x:%02x:%02x:%02x:%02x\n",
enc_rdbreg(priv, ENC_MAADR1), enc_rdbreg(priv, ENC_MAADR2), enc_rdbreg(priv, ENC_MAADR1), enc_rdbreg(priv, ENC_MAADR2),
enc_rdbreg(priv, ENC_MAADR3), enc_rdbreg(priv, ENC_MAADR4), enc_rdbreg(priv, ENC_MAADR3), enc_rdbreg(priv, ENC_MAADR4),
enc_rdbreg(priv, ENC_MAADR5), enc_rdbreg(priv, ENC_MAADR6)); enc_rdbreg(priv, ENC_MAADR5), enc_rdbreg(priv, ENC_MAADR6));
@ -814,27 +818,27 @@ static void enc_rxdump(FAR struct enc_driver_s *priv)
#if 0 /* Sometimes useful */ #if 0 /* Sometimes useful */
static void enc_txdump(FAR struct enc_driver_s *priv) static void enc_txdump(FAR struct enc_driver_s *priv)
{ {
lowsyslog("Tx Registers:\n"); lowsyslog(LOG_DEBUG, "Tx Registers:\n");
lowsyslog(" EIE: %02x EIR: %02x ESTAT: %02x\n", lowsyslog(LOG_DEBUG, " EIE: %02x EIR: %02x ESTAT: %02x\n",
enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR),); enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR),);
lowsyslog(" ESTAT: %02x ECON1: %02x\n", lowsyslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x\n",
enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1)); enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1));
lowsyslog(" ETXST: %02x %02x\n", lowsyslog(LOG_DEBUG, " ETXST: %02x %02x\n",
enc_rdbreg(priv, ENC_ETXSTH), enc_rdbreg(priv, ENC_ETXSTL)); enc_rdbreg(priv, ENC_ETXSTH), enc_rdbreg(priv, ENC_ETXSTL));
lowsyslog(" ETXND: %02x %02x\n", lowsyslog(LOG_DEBUG, " ETXND: %02x %02x\n",
enc_rdbreg(priv, ENC_ETXNDH), enc_rdbreg(priv, ENC_ETXNDL)); enc_rdbreg(priv, ENC_ETXNDH), enc_rdbreg(priv, ENC_ETXNDL));
lowsyslog(" MACON1: %02x MACON3: %02x MACON4: %02x\n", lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n",
enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3),
enc_rdbreg(priv, ENC_MACON4)); enc_rdbreg(priv, ENC_MACON4));
lowsyslog(" MACON1: %02x MACON3: %02x MACON4: %02x\n", lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n",
enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3),
enc_rdbreg(priv, ENC_MACON4)); enc_rdbreg(priv, ENC_MACON4));
lowsyslog(" MABBIPG: %02x MAIPG %02x %02x\n", lowsyslog(LOG_DEBUG, " MABBIPG: %02x MAIPG %02x %02x\n",
enc_rdbreg(priv, ENC_MABBIPG), enc_rdbreg(priv, ENC_MAIPGH), enc_rdbreg(priv, ENC_MABBIPG), enc_rdbreg(priv, ENC_MAIPGH),
enc_rdbreg(priv, ENC_MAIPGL)); enc_rdbreg(priv, ENC_MAIPGL));
lowsyslog(" MACLCON1: %02x MACLCON2: %02x\n", lowsyslog(LOG_DEBUG, " MACLCON1: %02x MACLCON2: %02x\n",
enc_rdbreg(priv, ENC_MACLCON1), enc_rdbreg(priv, ENC_MACLCON2)); enc_rdbreg(priv, ENC_MACLCON1), enc_rdbreg(priv, ENC_MACLCON2));
lowsyslog(" MAMXFL: %02x %02x\n", lowsyslog(LOG_DEBUG, " MAMXFL: %02x %02x\n",
enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL));
} }
#endif #endif

View File

@ -184,12 +184,18 @@
/* Debug ********************************************************************/ /* Debug ********************************************************************/
#ifdef CONFIG_ENCX24J600_REGDEBUG #ifdef CONFIG_ENCX24J600_REGDEBUG
# define enc_wrdump(a,v) lowsyslog("ENCX24J600: %02x<-%04x\n", a, v); # define enc_wrdump(a,v) \
# define enc_rddump(a,v) lowsyslog("ENCX24J600: %02x->%04x\n", a, v); lowsyslog(LOG_DEBUG, "ENCX24J600: %02x<-%04x\n", a, v);
# define enc_bfsdump(a,m) lowsyslog("ENCX24J600: %02x|=%04x\n", a, m); # define enc_rddump(a,v) \
# define enc_bfcdump(a,m) lowsyslog("ENCX24J600: %02x&=~%04x\n", a, m); lowsyslog(LOG_DEBUG, "ENCX24J600: %02x->%04x\n", a, v);
# define enc_cmddump(c) lowsyslog("ENCX24J600: CMD: %02x\n", c); # define enc_bfsdump(a,m) \
# define enc_bmdump(c,b,s) lowsyslog("ENCX24J600: CMD: %02x buffer: %p length: %d\n", c,b,s); lowsyslog(LOG_DEBUG, "ENCX24J600: %02x|=%04x\n", a, m);
# define enc_bfcdump(a,m) \
lowsyslog(LOG_DEBUG, "ENCX24J600: %02x&=~%04x\n", a, m);
# define enc_cmddump(c) \
lowsyslog(LOG_DEBUG, "ENCX24J600: CMD: %02x\n", c);
# define enc_bmdump(c,b,s) \
lowsyslog(LOG_DEBUG, "ENCX24J600: CMD: %02x buffer: %p length: %d\n", c,b,s);
#else #else
# define enc_wrdump(a,v) # define enc_wrdump(a,v)
# define enc_rddump(a,v) # define enc_rddump(a,v)
@ -803,25 +809,25 @@ static void enc_bfc(FAR struct enc_driver_s *priv, uint16_t ctrlreg,
#if 0 /* Sometimes useful */ #if 0 /* Sometimes useful */
static void enc_rxdump(FAR struct enc_driver_s *priv) static void enc_rxdump(FAR struct enc_driver_s *priv)
{ {
lowsyslog("Rx Registers:\n"); lowsyslog(LOG_DEBUG, "Rx Registers:\n");
lowsyslog(" EIE: %02x EIR: %02x\n", lowsyslog(LOG_DEBUG, " EIE: %02x EIR: %02x\n",
enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR)); enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR));
lowsyslog(" ESTAT: %02x ECON1: %02x ECON2: %02x\n", lowsyslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x ECON2: %02x\n",
enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1), enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1),
enc_rdgreg(priv, ENC_ECON2)); enc_rdgreg(priv, ENC_ECON2));
lowsyslog(" ERXST: %02x %02x\n", lowsyslog(LOG_DEBUG, " ERXST: %02x %02x\n",
enc_rdbreg(priv, ENC_ERXSTH), enc_rdbreg(priv, ENC_ERXSTL)); enc_rdbreg(priv, ENC_ERXSTH), enc_rdbreg(priv, ENC_ERXSTL));
lowsyslog(" ERXND: %02x %02x\n", lowsyslog(LOG_DEBUG, " ERXND: %02x %02x\n",
enc_rdbreg(priv, ENC_ERXNDH), enc_rdbreg(priv, ENC_ERXNDL)); enc_rdbreg(priv, ENC_ERXNDH), enc_rdbreg(priv, ENC_ERXNDL));
lowsyslog(" ERXRDPT: %02x %02x\n", lowsyslog(LOG_DEBUG, " ERXRDPT: %02x %02x\n",
enc_rdbreg(priv, ENC_ERXRDPTH), enc_rdbreg(priv, ENC_ERXRDPTL)); enc_rdbreg(priv, ENC_ERXRDPTH), enc_rdbreg(priv, ENC_ERXRDPTL));
lowsyslog(" ERXFCON: %02x EPKTCNT: %02x\n", lowsyslog(LOG_DEBUG, " ERXFCON: %02x EPKTCNT: %02x\n",
enc_rdbreg(priv, ENC_ERXFCON), enc_rdbreg(priv, ENC_EPKTCNT)); enc_rdbreg(priv, ENC_ERXFCON), enc_rdbreg(priv, ENC_EPKTCNT));
lowsyslog(" MACON1: %02x MACON3: %02x\n", lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x\n",
enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3)); enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3));
lowsyslog(" MAMXFL: %02x %02x\n", lowsyslog(LOG_DEBUG, " MAMXFL: %02x %02x\n",
enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL));
lowsyslog(" MAADR: %02x:%02x:%02x:%02x:%02x:%02x\n", lowsyslog(LOG_DEBUG, " MAADR: %02x:%02x:%02x:%02x:%02x:%02x\n",
enc_rdbreg(priv, ENC_MAADR1), enc_rdbreg(priv, ENC_MAADR2), enc_rdbreg(priv, ENC_MAADR1), enc_rdbreg(priv, ENC_MAADR2),
enc_rdbreg(priv, ENC_MAADR3), enc_rdbreg(priv, ENC_MAADR4), enc_rdbreg(priv, ENC_MAADR3), enc_rdbreg(priv, ENC_MAADR4),
enc_rdbreg(priv, ENC_MAADR5), enc_rdbreg(priv, ENC_MAADR6)); enc_rdbreg(priv, ENC_MAADR5), enc_rdbreg(priv, ENC_MAADR6));
@ -831,27 +837,27 @@ static void enc_rxdump(FAR struct enc_driver_s *priv)
#if 0 /* Sometimes useful */ #if 0 /* Sometimes useful */
static void enc_txdump(FAR struct enc_driver_s *priv) static void enc_txdump(FAR struct enc_driver_s *priv)
{ {
lowsyslog("Tx Registers:\n"); lowsyslog(LOG_DEBUG, "Tx Registers:\n");
lowsyslog(" EIE: %02x EIR: %02x ESTAT: %02x\n", lowsyslog(LOG_DEBUG, " EIE: %02x EIR: %02x ESTAT: %02x\n",
enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR),); enc_rdgreg(priv, ENC_EIE), enc_rdgreg(priv, ENC_EIR),);
lowsyslog(" ESTAT: %02x ECON1: %02x\n", lowsyslog(LOG_DEBUG, " ESTAT: %02x ECON1: %02x\n",
enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1)); enc_rdgreg(priv, ENC_ESTAT), enc_rdgreg(priv, ENC_ECON1));
lowsyslog(" ETXST: %02x %02x\n", lowsyslog(LOG_DEBUG, " ETXST: %02x %02x\n",
enc_rdbreg(priv, ENC_ETXSTH), enc_rdbreg(priv, ENC_ETXSTL)); enc_rdbreg(priv, ENC_ETXSTH), enc_rdbreg(priv, ENC_ETXSTL));
lowsyslog(" ETXND: %02x %02x\n", lowsyslog(LOG_DEBUG, " ETXND: %02x %02x\n",
enc_rdbreg(priv, ENC_ETXNDH), enc_rdbreg(priv, ENC_ETXNDL)); enc_rdbreg(priv, ENC_ETXNDH), enc_rdbreg(priv, ENC_ETXNDL));
lowsyslog(" MACON1: %02x MACON3: %02x MACON4: %02x\n", lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n",
enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3),
enc_rdbreg(priv, ENC_MACON4)); enc_rdbreg(priv, ENC_MACON4));
lowsyslog(" MACON1: %02x MACON3: %02x MACON4: %02x\n", lowsyslog(LOG_DEBUG, " MACON1: %02x MACON3: %02x MACON4: %02x\n",
enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3), enc_rdbreg(priv, ENC_MACON1), enc_rdbreg(priv, ENC_MACON3),
enc_rdbreg(priv, ENC_MACON4)); enc_rdbreg(priv, ENC_MACON4));
lowsyslog(" MABBIPG: %02x MAIPG %02x %02x\n", lowsyslog(LOG_DEBUG, " MABBIPG: %02x MAIPG %02x %02x\n",
enc_rdbreg(priv, ENC_MABBIPG), enc_rdbreg(priv, ENC_MAIPGH), enc_rdbreg(priv, ENC_MABBIPG), enc_rdbreg(priv, ENC_MAIPGH),
enc_rdbreg(priv, ENC_MAIPGL)); enc_rdbreg(priv, ENC_MAIPGL));
lowsyslog(" MACLCON1: %02x MACLCON2: %02x\n", lowsyslog(LOG_DEBUG, " MACLCON1: %02x MACLCON2: %02x\n",
enc_rdbreg(priv, ENC_MACLCON1), enc_rdbreg(priv, ENC_MACLCON2)); enc_rdbreg(priv, ENC_MACLCON1), enc_rdbreg(priv, ENC_MACLCON2));
lowsyslog(" MAMXFL: %02x %02x\n", lowsyslog(LOG_DEBUG, " MAMXFL: %02x %02x\n",
enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL)); enc_rdbreg(priv, ENC_MAMXFLH), enc_rdbreg(priv, ENC_MAMXFLL));
} }
#endif #endif

View File

@ -725,10 +725,10 @@ int ramlog_sysloginit(void)
* Description: * Description:
* This is the low-level system logging interface. The debugging/syslogging * This is the low-level system logging interface. The debugging/syslogging
* interfaces are syslog() and lowsyslog(). The difference is that * interfaces are syslog() and lowsyslog(). The difference is that
* the syslog() internface writes to fd=1 (stdout) whereas lowsyslog() uses * the syslog() internface writes to syslog device (usually fd=1, stdout)
* a lower level interface that works from interrupt handlers. This * whereas lowsyslog() uses a lower level interface that works from
* function is a a low-level interface used to implement lowsyslog() * interrupt handlers. This function is a a low-level interface used to
* when CONFIG_RAMLOG_SYSLOG=y and CONFIG_SYSLOG=y * implement lowsyslog() when CONFIG_RAMLOG_SYSLOG=y and CONFIG_SYSLOG=y
* *
****************************************************************************/ ****************************************************************************/

View File

@ -40,6 +40,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdarg.h>
#include <stdint.h> #include <stdint.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
@ -88,6 +89,26 @@ static usbtrace_idset_t g_maskedidset = CONFIG_USBDEV_TRACE_INITIALIDSET;
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Name: usbtrace_syslog
****************************************************************************/
#if !defined(CONFIG_USBDEV_TRACE) && \
(defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB))
static int usbtrace_syslog(const char *fmt, ...)
{
va_list ap;
int ret;
/* Let lowvsyslog do the real work */
va_start(ap, fmt);
ret = lowvsyslog(LOG_INFO, fmt, ap);
va_end(ap);
return ret;
}
#endif
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@ -110,7 +131,8 @@ static usbtrace_idset_t g_maskedidset = CONFIG_USBDEV_TRACE_INITIALIDSET;
* *
*******************************************************************************/ *******************************************************************************/
#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) #if defined(CONFIG_USBDEV_TRACE) || \
(defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB))
usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset) usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset)
{ {
irqstate_t flags; irqstate_t flags;
@ -170,7 +192,7 @@ void usbtrace(uint16_t event, uint16_t value)
#else #else
/* Just print the data using lowsyslog */ /* Just print the data using lowsyslog */
usbtrace_trprintf((trprintf_t)lowsyslog, event, value); usbtrace_trprintf(usbtrace_syslog, event, value);
#endif #endif
} }

View File

@ -204,30 +204,6 @@
# define CONFIG_USBMSC_SCSI_STACKSIZE 2048 # define CONFIG_USBMSC_SCSI_STACKSIZE 2048
#endif #endif
/* Debug -- must be consistent with include/debug.h */
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG
# ifdef CONFIG_ARCH_LOWPUTC
# define dbgprintf(format, ...) lowsyslog(format, ##__VA_ARGS__)
# else
# define dbgprintf(format, ...) syslog(format, ##__VA_ARGS__)
# endif
# else
# define dbgprintf(x...)
# endif
#else
# ifdef CONFIG_DEBUG
# ifdef CONFIG_ARCH_LOWPUTC
# define dbgprintf lowsyslog
# else
# define dbgprintf syslog
# endif
# else
# define dbgprintf (void)
# endif
#endif
/* Packet and request buffer sizes */ /* Packet and request buffer sizes */
#ifndef CONFIG_USBMSC_EP0MAXPACKET #ifndef CONFIG_USBMSC_EP0MAXPACKET

View File

@ -199,12 +199,13 @@ static void usbmsc_dumpdata(const char *msg, const uint8_t *buf, int buflen)
{ {
int i; int i;
dbgprintf("%s:", msg); lowsyslog(LOG_DEBUG, "%s:", msg);
for (i = 0; i < buflen; i++) for (i = 0; i < buflen; i++)
{ {
dbgprintf(" %02x", buf[i]); lowsyslog(LOG_DEBUG, " %02x", buf[i]);
} }
dbgprintf("\n");
lowsyslog(LOG_DEBUG, "\n");
} }
#endif #endif

View File

@ -108,7 +108,7 @@ static int usbhost_trsyslog(uint32_t event, FAR void *arg)
{ {
/* Just print the data using syslog() */ /* Just print the data using syslog() */
syslog(fmt, (unsigned int)TRACE_DECODE_U23(event)); syslog(LOG_INFO, fmt, (unsigned int)TRACE_DECODE_U23(event));
} }
/* No, then it must the the two argument format first. */ /* No, then it must the the two argument format first. */
@ -121,7 +121,7 @@ static int usbhost_trsyslog(uint32_t event, FAR void *arg)
{ {
/* Just print the data using syslog() */ /* Just print the data using syslog() */
syslog(fmt, (unsigned int)TRACE_DECODE_U7(event), syslog(LOG_INFO, fmt, (unsigned int)TRACE_DECODE_U7(event),
(unsigned int)TRACE_DECODE_U16(event)); (unsigned int)TRACE_DECODE_U16(event));
} }
} }
@ -206,7 +206,7 @@ void usbhost_trace1(uint16_t id, uint32_t u23)
/* Just print the data using syslog() */ /* Just print the data using syslog() */
syslog(fmt, (unsigned int)u23); syslog(LOG_INFO, fmt, (unsigned int)u23);
#endif #endif
} }
@ -224,7 +224,7 @@ void usbhost_trace2(uint16_t id, uint8_t u7, uint16_t u16)
/* Just print the data using syslog() */ /* Just print the data using syslog() */
syslog(fmt, u7, u16); syslog(LOG_INFO, fmt, u7, u16);
#endif #endif
} }

View File

@ -687,9 +687,11 @@ static void * cc3000_worker(FAR void *arg)
* Will it fit? * Will it fit?
*/ */
if (data_to_recv >= priv->rx_buffer_max_len){ if (data_to_recv >= priv->rx_buffer_max_len
lowsyslog("data_to_recv %d",data_to_recv); {
lowsyslog(LOG_INFO, "data_to_recv %d", data_to_recv);
} }
DEBUGASSERT(data_to_recv < priv->rx_buffer_max_len); DEBUGASSERT(data_to_recv < priv->rx_buffer_max_len);
SPI_RECVBLOCK(priv->spi, priv->rx_buffer.pbuffer, data_to_recv); SPI_RECVBLOCK(priv->spi, priv->rx_buffer.pbuffer, data_to_recv);
} }

View File

@ -1733,39 +1733,59 @@ void nrf24l01_dumpregs(struct nrf24l01_dev_s *dev)
uint8_t addr[NRF24L01_MAX_ADDR_LEN]; uint8_t addr[NRF24L01_MAX_ADDR_LEN];
char addrstr[NRF24L01_MAX_ADDR_LEN * 2 +1]; char addrstr[NRF24L01_MAX_ADDR_LEN * 2 +1];
syslog("CONFIG: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_CONFIG)); syslog(LOG_INFO, "CONFIG: %02x\n",
syslog("EN_AA: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_EN_AA)); nrf24l01_readregbyte(dev, NRF24L01_CONFIG));
syslog("EN_RXADDR: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_EN_RXADDR)); syslog(LOG_INFO, "EN_AA: %02x\n",
syslog("SETUP_AW: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_SETUP_AW)); nrf24l01_readregbyte(dev, NRF24L01_EN_AA));
syslog(LOG_INFO, "EN_RXADDR: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_EN_RXADDR));
syslog(LOG_INFO, "SETUP_AW: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_SETUP_AW));
syslog("SETUP_RETR:%02x\n", nrf24l01_readregbyte(dev, NRF24L01_SETUP_RETR)); syslog(LOG_INFO, "SETUP_RETR:%02x\n",
syslog("RF_CH: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_RF_CH)); nrf24l01_readregbyte(dev, NRF24L01_SETUP_RETR));
syslog("RF_SETUP: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_RF_SETUP)); syslog(LOG_INFO, "RF_CH: %02x\n",
syslog("STATUS: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_STATUS)); nrf24l01_readregbyte(dev, NRF24L01_RF_CH));
syslog("OBS_TX: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_OBSERVE_TX)); syslog(LOG_INFO, "RF_SETUP: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_RF_SETUP));
syslog(LOG_INFO, "STATUS: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_STATUS));
syslog(LOG_INFO, "OBS_TX: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_OBSERVE_TX));
nrf24l01_readreg(dev, NRF24L01_TX_ADDR, addr, dev->addrlen); nrf24l01_readreg(dev, NRF24L01_TX_ADDR, addr, dev->addrlen);
binarycvt(addrstr, addr, dev->addrlen); binarycvt(addrstr, addr, dev->addrlen);
syslog("TX_ADDR: %s\n", addrstr); syslog(LOG_INFO, "TX_ADDR: %s\n", addrstr);
syslog("CD: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_CD)); syslog(LOG_INFO, "CD: %02x\n",
syslog("RX_PW_P0: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P0)); nrf24l01_readregbyte(dev, NRF24L01_CD));
syslog("RX_PW_P1: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P1)); syslog(LOG_INFO, "RX_PW_P0: %02x\n",
syslog("RX_PW_P2: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P2)); nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P0));
syslog("RX_PW_P3: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P3)); syslog(LOG_INFO, "RX_PW_P1: %02x\n",
syslog("RX_PW_P4: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P4)); nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P1));
syslog("RX_PW_P5: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P5)); syslog(LOG_INFO, "RX_PW_P2: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P2));
syslog(LOG_INFO, "RX_PW_P3: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P3));
syslog(LOG_INFO, "RX_PW_P4: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P4));
syslog(LOG_INFO, "RX_PW_P5: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_RX_PW_P5));
syslog("FIFO_STAT: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_FIFO_STATUS)); syslog(LOG_INFO, "FIFO_STAT: %02x\n",
syslog("DYNPD: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_DYNPD)); nrf24l01_readregbyte(dev, NRF24L01_FIFO_STATUS));
syslog("FEATURE: %02x\n", nrf24l01_readregbyte(dev, NRF24L01_FEATURE)); syslog(LOG_INFO, "DYNPD: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_DYNPD));
syslog(LOG_INFO, "FEATURE: %02x\n",
nrf24l01_readregbyte(dev, NRF24L01_FEATURE));
} }
#ifdef CONFIG_WL_NRF24L01_RXSUPPORT #ifdef CONFIG_WL_NRF24L01_RXSUPPORT
void nrf24l01_dumprxfifo(struct nrf24l01_dev_s *dev) void nrf24l01_dumprxfifo(struct nrf24l01_dev_s *dev)
{ {
syslog("bytes count: %d\n", dev->fifo_len); syslog(LOG_INFO, "bytes count: %d\n", dev->fifo_len);
syslog("next read: %d, next write: %d\n", dev->nxt_read, dev-> nxt_write); syslog(LOG_INFO, "next read: %d, next write: %d\n",
dev->nxt_read, dev-> nxt_write);
} }
#endif #endif