Debug microSD CS
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1824 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
d859f8655f
commit
869d6b8d57
@ -141,7 +141,7 @@ int lm3s_dumpgpio(uint32 pinset, const char *msg)
|
|||||||
lldbg(" AFSEL: %02x DEN: %02x DIR: %02x DATA: %02x\n",
|
lldbg(" AFSEL: %02x DEN: %02x DIR: %02x DATA: %02x\n",
|
||||||
getreg32(base + LM3S_GPIO_AFSEL_OFFSET), getreg32(base + LM3S_GPIO_DEN_OFFSET),
|
getreg32(base + LM3S_GPIO_AFSEL_OFFSET), getreg32(base + LM3S_GPIO_DEN_OFFSET),
|
||||||
getreg32(base + LM3S_GPIO_DIR_OFFSET), getreg32(base + LM3S_GPIO_DATA_OFFSET + 0x3fc));
|
getreg32(base + LM3S_GPIO_DIR_OFFSET), getreg32(base + LM3S_GPIO_DATA_OFFSET + 0x3fc));
|
||||||
lldbg(" IS: %02x IBE: %02x IEV: %02x IM: %02x RIS: %02x MIS: %02x\n",
|
lldbg(" IS: %02x IBE: %02x IEV: %02x IM: %02x RIS: %08x MIS: %08x\n",
|
||||||
getreg32(base + LM3S_GPIO_IEV_OFFSET), getreg32(base + LM3S_GPIO_IM_OFFSET),
|
getreg32(base + LM3S_GPIO_IEV_OFFSET), getreg32(base + LM3S_GPIO_IM_OFFSET),
|
||||||
getreg32(base + LM3S_GPIO_RIS_OFFSET), getreg32(base + LM3S_GPIO_MIS_OFFSET));
|
getreg32(base + LM3S_GPIO_RIS_OFFSET), getreg32(base + LM3S_GPIO_MIS_OFFSET));
|
||||||
lldbg(" 2MA: %02x 4MA: %02x 8MA: %02x ODR: %02x PUR %02x PDR: %02x SLR: %02x\n",
|
lldbg(" 2MA: %02x 4MA: %02x 8MA: %02x ODR: %02x PUR %02x PDR: %02x SLR: %02x\n",
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
* CONFIG_DEBUG_VERBOSE too)
|
* CONFIG_DEBUG_VERBOSE too)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#undef SSI_DEBUG /* Define to enable debug */
|
#undef SSI_DEBUG /* Define to enable debug */
|
||||||
|
|
||||||
#ifdef SSI_DEBUG
|
#ifdef SSI_DEBUG
|
||||||
# define ssidbg lldbg
|
# define ssidbg lldbg
|
||||||
@ -426,12 +426,14 @@ static void ssi_semtake(sem_t *sem)
|
|||||||
|
|
||||||
static void ssi_txnull(struct lm32_ssidev_s *priv)
|
static void ssi_txnull(struct lm32_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
|
ssivdbg("TX: ones\n");
|
||||||
ssi_putreg(priv, LM3S_SSI_DR_OFFSET, 0xffff);
|
ssi_putreg(priv, LM3S_SSI_DR_OFFSET, 0xffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssi_txuint16(struct lm32_ssidev_s *priv)
|
static void ssi_txuint16(struct lm32_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
uint16 *ptr = (uint16*)priv->txbuffer;
|
uint16 *ptr = (uint16*)priv->txbuffer;
|
||||||
|
ssivdbg("TX: %p->%04x\n", ptr, *ptr);
|
||||||
ssi_putreg(priv, LM3S_SSI_DR_OFFSET, (uint32)(*ptr++));
|
ssi_putreg(priv, LM3S_SSI_DR_OFFSET, (uint32)(*ptr++));
|
||||||
priv->txbuffer = (void*)ptr;
|
priv->txbuffer = (void*)ptr;
|
||||||
}
|
}
|
||||||
@ -439,6 +441,7 @@ static void ssi_txuint16(struct lm32_ssidev_s *priv)
|
|||||||
static void ssi_txubyte(struct lm32_ssidev_s *priv)
|
static void ssi_txubyte(struct lm32_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
ubyte *ptr = (ubyte*)priv->txbuffer;
|
ubyte *ptr = (ubyte*)priv->txbuffer;
|
||||||
|
ssivdbg("TX: %p->%02x\n", ptr, *ptr);
|
||||||
ssi_putreg(priv, LM3S_SSI_DR_OFFSET, (uint32)(*ptr++));
|
ssi_putreg(priv, LM3S_SSI_DR_OFFSET, (uint32)(*ptr++));
|
||||||
priv->txbuffer = (void*)ptr;
|
priv->txbuffer = (void*)ptr;
|
||||||
}
|
}
|
||||||
@ -462,21 +465,28 @@ static void ssi_txubyte(struct lm32_ssidev_s *priv)
|
|||||||
|
|
||||||
static void ssi_rxnull(struct lm32_ssidev_s *priv)
|
static void ssi_rxnull(struct lm32_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
|
#if defined(SSI_DEBUG) && defined(CONFIG_DEBUG_VERBOSE)
|
||||||
|
uint32 regval = ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
||||||
|
ssivdbg("RX: discard %04x\n", regval);
|
||||||
|
#else
|
||||||
(void)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
(void)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssi_rxuint16(struct lm32_ssidev_s *priv)
|
static void ssi_rxuint16(struct lm32_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
uint16 *ptr = (uint16*)priv->rxbuffer;
|
uint16 *ptr = (uint16*)priv->rxbuffer;
|
||||||
*ptr++ = (uint16)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
*ptr = (uint16)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
||||||
priv->rxbuffer = (void*)ptr;
|
ssivdbg("RX: %p<-%04x\n", ptr, *ptr);
|
||||||
|
priv->rxbuffer = (void*)(++ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssi_rxubyte(struct lm32_ssidev_s *priv)
|
static void ssi_rxubyte(struct lm32_ssidev_s *priv)
|
||||||
{
|
{
|
||||||
ubyte *ptr = (ubyte*)priv->rxbuffer;
|
ubyte *ptr = (ubyte*)priv->rxbuffer;
|
||||||
*ptr++ = (ubyte)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
*ptr = (ubyte)ssi_getreg(priv, LM3S_SSI_DR_OFFSET);
|
||||||
priv->rxbuffer = (void*)ptr;
|
ssivdbg("RX: %p<-%02x\n", ptr, *ptr);
|
||||||
|
priv->rxbuffer = (void*)(++ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user