mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
Slightly improved debug output
This commit is contained in:
@@ -200,6 +200,13 @@ static void up_dumpstate(void)
|
|||||||
* stack?
|
* stack?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (sp > istackbase || sp <= istackbase - istacksize)
|
||||||
|
{
|
||||||
|
if (up_interrupt_context())
|
||||||
|
{
|
||||||
|
lldbg("ERROR: Stack pointer is not within interrupt stack\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (sp <= istackbase && sp > istackbase - istacksize)
|
if (sp <= istackbase && sp > istackbase - istacksize)
|
||||||
{
|
{
|
||||||
/* Yes.. dump the interrupt stack */
|
/* Yes.. dump the interrupt stack */
|
||||||
@@ -231,9 +238,12 @@ static void up_dumpstate(void)
|
|||||||
|
|
||||||
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
if (sp > ustackbase || sp <= ustackbase - ustacksize)
|
||||||
{
|
{
|
||||||
#if !defined(CONFIG_ARCH_INTERRUPTSTACK) || CONFIG_ARCH_INTERRUPTSTACK < 4
|
#if defined(CONFIG_ARCH_INTERRUPTSTACK) && CONFIG_ARCH_INTERRUPTSTACK > 3
|
||||||
lldbg("ERROR: Stack pointer is not within allocated stack\n");
|
if (!up_interrupt_context())
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
lldbg("ERROR: Stack pointer is not within allocated stack\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -956,7 +956,8 @@ static void sam_dma_wrsetup(struct sam_usbdev_s *priv, struct sam_ep_s *privep,
|
|||||||
|
|
||||||
/* How many bytes remain to be transferred in the request? */
|
/* How many bytes remain to be transferred in the request? */
|
||||||
|
|
||||||
remaining = privreq->req.len - privreq->req.xfrd;
|
remaining = (int)privreq->req.len - (int)privreq->req.xfrd;
|
||||||
|
DEBUGASSERT(remaining >= 0 && remaining <= (int)privreq->req.len);
|
||||||
|
|
||||||
/* If there are no bytes to send, then send a zero length packet */
|
/* If there are no bytes to send, then send a zero length packet */
|
||||||
|
|
||||||
@@ -1020,8 +1021,9 @@ static void sam_dma_rdsetup(struct sam_usbdev_s *priv,
|
|||||||
|
|
||||||
/* How many more bytes can we append to the request buffer? */
|
/* How many more bytes can we append to the request buffer? */
|
||||||
|
|
||||||
remaining = privreq->req.len - privreq->req.xfrd;
|
remaining = (int)privreq->req.len - (int)privreq->req.xfrd;
|
||||||
DEBUGASSERT(remaining > 0 && privep->epstate == UDPHS_EPSTATE_RECEIVING);
|
DEBUGASSERT(remaining > 0 && remaining <= (int)privreq->req.len &&
|
||||||
|
privep->epstate == UDPHS_EPSTATE_RECEIVING);
|
||||||
|
|
||||||
/* Clip the DMA transfer size to the size available in the user buffer */
|
/* Clip the DMA transfer size to the size available in the user buffer */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user