Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
94bb2e05bb
commit
3e00d182d2
|
@ -60,6 +60,7 @@
|
|||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* USB trace dumping */
|
||||
|
||||
#ifndef CONFIG_USBDEV_TRACE
|
||||
|
|
|
@ -93,11 +93,13 @@ static void up_stackdump(uint16_t sp, uint16_t stack_base)
|
|||
|
||||
for (stack = sp; stack < stack_base; stack += 16)
|
||||
{
|
||||
uint8_t *ptr = (uint8_t*)stack;
|
||||
uint8_t *ptr = (uint8_t *)stack;
|
||||
|
||||
_alert("%04x: %02x %02x %02x %02x %02x %02x %02x %02x"
|
||||
" %02x %02x %02x %02x %02x %02x %02x %02x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7],
|
||||
ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]);
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4],
|
||||
ptr[5], ptr[6], ptr[7], ptr[8], ptr[9], ptr[10],
|
||||
ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -130,23 +132,22 @@ static inline void up_registerdump(void)
|
|||
_alert("SP:%02x%02x FRAME:%02x%02x TMP:%02x%02x Z:%02x%02x XY:%02x\n",
|
||||
regs[REG_SPH], regs[REG_SPL], regs[REG_FRAMEH], regs[REG_FRAMEL],
|
||||
regs[REG_TMPL], regs[REG_TMPH], regs[REG_ZL], regs[REG_ZH],
|
||||
regs[REG_XY], regs[REG_XY+1]);
|
||||
regs[REG_XY], regs[REG_XY + 1]);
|
||||
|
||||
#if CONFIG_HCS12_MSOFTREGS > 2
|
||||
# error "Need to save more registers"
|
||||
#elif CONFIG_HCS12_MSOFTREGS == 2
|
||||
_alert("SOFTREGS: %02x%02x :%02x%02x\n",
|
||||
regs[REG_SOFTREG1], regs[REG_SOFTREG1+1],
|
||||
regs[REG_SOFTREG2], regs[REG_SOFTREG2+1]);
|
||||
regs[REG_SOFTREG1], regs[REG_SOFTREG1 + 1],
|
||||
regs[REG_SOFTREG2], regs[REG_SOFTREG2 + 1]);
|
||||
#elif CONFIG_HCS12_MSOFTREGS == 1
|
||||
_alert("SOFTREGS: %02x%02x\n",
|
||||
regs[REG_SOFTREG1], regs[REG_SOFTREG1+1]);
|
||||
regs[REG_SOFTREG1], regs[REG_SOFTREG1 + 1]);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_HCS12_NONBANKED
|
||||
_alert("PPAGE: %02x\n", regs[REG_PPAGE]);
|
||||
_alert("PPAGE: %02x\n", regs[REG_PPAGE]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#else
|
||||
# define up_registerdump()
|
||||
|
@ -295,19 +296,19 @@ static void _up_assert(int errorcode)
|
|||
|
||||
if (g_current_regs || (running_task())->flink == NULL)
|
||||
{
|
||||
up_irq_save();
|
||||
for (;;)
|
||||
{
|
||||
up_irq_save();
|
||||
for (; ; )
|
||||
{
|
||||
#if CONFIG_BOARD_RESET_ON_ASSERT >= 1
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
board_autoled_on(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_off(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_on(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_off(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -94,19 +94,19 @@ static void _up_assert(int errorcode)
|
|||
|
||||
if (g_current_regs || running_task()->flink == NULL)
|
||||
{
|
||||
up_irq_save();
|
||||
for (; ; )
|
||||
{
|
||||
up_irq_save();
|
||||
for (; ; )
|
||||
{
|
||||
#if CONFIG_BOARD_RESET_ON_ASSERT >= 1
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
board_autoled_on(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_off(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_on(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_off(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -85,11 +85,11 @@ static void _up_assert(int errorcode)
|
|||
|
||||
syslog_flush();
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? NOTE: You cannot use the
|
||||
* PID to determine if this is an IDLE task. In the SMP case, there may be
|
||||
* multiple IDLE tasks with different PIDs. The only consistent way to test
|
||||
* for the IDLE task is to check it is at the end of the list (flink ==
|
||||
* NULL)
|
||||
/* Are we in an interrupt handler or the idle task? NOTE: You cannot use
|
||||
* the PID to determine if this is an IDLE task. In the SMP case, there
|
||||
* may be multiple IDLE tasks with different PIDs. The only consistent
|
||||
* way to test for the IDLE task is to check it is at the end of the list
|
||||
* (flink == NULL)
|
||||
*/
|
||||
|
||||
if (g_current_regs || running_task()->flink == NULL)
|
||||
|
|
|
@ -90,19 +90,19 @@ static void _up_assert(int errorcode)
|
|||
|
||||
if (g_current_regs || running_task()->flink == NULL)
|
||||
{
|
||||
up_irq_save();
|
||||
for (;;)
|
||||
{
|
||||
up_irq_save();
|
||||
for (; ; )
|
||||
{
|
||||
#if CONFIG_BOARD_RESET_ON_ASSERT >= 1
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
board_autoled_on(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_off(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_on(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_off(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* USB trace dumping */
|
||||
|
||||
#ifndef CONFIG_USBDEV_TRACE
|
||||
|
@ -93,7 +94,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
|
|||
|
||||
for (stack = sp & ~0x1f; stack < stack_base; stack += 32)
|
||||
{
|
||||
uint32_t *ptr = (uint32_t*)stack;
|
||||
uint32_t *ptr = (uint32_t *)stack;
|
||||
_alert("%08x: %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
stack, ptr[0], ptr[1], ptr[2], ptr[3],
|
||||
ptr[4], ptr[5], ptr[6], ptr[7]);
|
||||
|
@ -147,7 +148,7 @@ static void up_dumpstate(void)
|
|||
|
||||
if (g_current_regs != NULL)
|
||||
{
|
||||
up_registerdump((uint32_t*)g_current_regs);
|
||||
up_registerdump((uint32_t *)g_current_regs);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -256,19 +257,19 @@ static void _up_assert(int errorcode)
|
|||
|
||||
if (g_current_regs || (running_task())->flink == NULL)
|
||||
{
|
||||
up_irq_save();
|
||||
for (;;)
|
||||
{
|
||||
up_irq_save();
|
||||
for (; ; )
|
||||
{
|
||||
#if CONFIG_BOARD_RESET_ON_ASSERT >= 1
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
board_reset(CONFIG_BOARD_ASSERT_RESET_VALUE);
|
||||
#endif
|
||||
#ifdef CONFIG_ARCH_LEDS
|
||||
board_autoled_on(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_off(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_on(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
board_autoled_off(LED_PANIC);
|
||||
up_mdelay(250);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -118,11 +118,12 @@ static int usbtrace_syslog(const char *fmt, ...)
|
|||
* Name: usbtrace_enable
|
||||
*
|
||||
* Description:
|
||||
* Enable/disable tracing per trace ID. The initial state is all IDs enabled.
|
||||
* Enable/disable tracing per trace ID. The initial state is all IDs
|
||||
* enabled.
|
||||
*
|
||||
* Input Parameters:
|
||||
* idset - The bitset of IDs to be masked. TRACE_ALLIDS enables all IDS; zero
|
||||
* masks all IDs.
|
||||
* idset - The bitset of IDs to be masked. TRACE_ALLIDS enables all IDS;
|
||||
* zero masks all IDs.
|
||||
*
|
||||
* Returned Value:
|
||||
* The previous idset value.
|
||||
|
|
Loading…
Reference in New Issue