mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 10:58:49 +08:00
Replace all ASSERT with DEBUGASSERT to save the code space
This commit is contained in:
parent
467d2a58ea
commit
e1202d2ed3
129 changed files with 219 additions and 219 deletions
|
@ -81,7 +81,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -97,7 +97,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -79,7 +79,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -90,7 +90,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -94,7 +94,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -216,7 +216,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
|||
* multiple pending SGI interrupts.
|
||||
*/
|
||||
|
||||
ASSERT((unsigned int)irq <= GIC_IRQ_SGI15 &&
|
||||
DEBUGASSERT((unsigned int)irq <= GIC_IRQ_SGI15 &&
|
||||
(g_sgi_pending[cpu] & bit) == 0);
|
||||
|
||||
/* Mare the SGI as pending and return immediately */
|
||||
|
|
|
@ -94,7 +94,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -80,7 +80,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -95,7 +95,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -81,7 +81,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -85,7 +85,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -1604,11 +1604,11 @@ int efm32_i2c_reset(FAR struct i2c_master_s *dev)
|
|||
uint32_t sda_gpio;
|
||||
int ret = ERROR;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Our caller must own a ref */
|
||||
|
||||
ASSERT(priv->refs > 0);
|
||||
DEBUGASSERT(priv->refs > 0);
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
|
@ -1765,7 +1765,7 @@ int efm32_i2cbus_uninitialize(FAR struct i2c_master_s *dev)
|
|||
FAR struct efm32_i2c_priv_s *priv = (struct efm32_i2c_priv_s *)dev;
|
||||
irqstate_t flags;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decrement reference count and check for underflow */
|
||||
|
||||
|
|
|
@ -405,7 +405,7 @@ static int pwm_timer(FAR struct efm32_pwmtimer_s *priv,
|
|||
break;
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
}
|
||||
|
||||
pwm_putreg(priv, EFM32_TIMER_ROUTE_OFFSET, regval);
|
||||
|
@ -625,7 +625,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev)
|
|||
break;
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -523,7 +523,7 @@ static int imxrt_transmit(FAR struct imxrt_driver_s *priv)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT(txdesc->data == buf);
|
||||
DEBUGASSERT(txdesc->data == buf);
|
||||
}
|
||||
|
||||
/* Start the TX transfer (if it was not already waiting for buffers) */
|
||||
|
|
|
@ -494,7 +494,7 @@ static int kinetis_transmit(FAR struct kinetis_driver_s *priv)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT(txdesc->data == buf);
|
||||
DEBUGASSERT(txdesc->data == buf);
|
||||
}
|
||||
|
||||
/* Start the TX transfer (if it was not already waiting for buffers) */
|
||||
|
|
|
@ -168,7 +168,7 @@ void lc823450_clockconfig()
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1107,7 +1107,7 @@ FAR struct i2c_master_s *lc823450_i2cbus_initialize(int port)
|
|||
break;
|
||||
#endif
|
||||
default:
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1144,7 +1144,7 @@ int lc823450_i2cbus_uninitialize(FAR struct i2c_master_s *dev)
|
|||
irqstate_t flags;
|
||||
int port = -1;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decrement refs and check for underflow */
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ extern unsigned int XT1OSC_CLK;
|
|||
|
||||
static void _setup_audio_pll(uint32_t freq)
|
||||
{
|
||||
ASSERT(24000000 == XT1OSC_CLK);
|
||||
DEBUGASSERT(24000000 == XT1OSC_CLK);
|
||||
|
||||
uint32_t m;
|
||||
uint32_t n;
|
||||
|
@ -289,7 +289,7 @@ static void _setup_audio_pll(uint32_t freq)
|
|||
break;
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
}
|
||||
|
||||
/* Set divider */
|
||||
|
@ -396,7 +396,7 @@ static void lc823450_i2s_setchannel(char id, uint8_t ch)
|
|||
break;
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,7 @@ static int lc823450_i2s_ioctl(struct i2s_dev_s *dev, int cmd, unsigned long arg)
|
|||
{
|
||||
case AUDIOIOC_CONFIGURE:
|
||||
cap_desc = (FAR const struct audio_caps_desc_s *)((uintptr_t)arg);
|
||||
ASSERT(NULL != cap_desc);
|
||||
DEBUGASSERT(NULL != cap_desc);
|
||||
|
||||
tx_th = cap_desc->caps.ac_controls.w >> 24;
|
||||
rate[1] = cap_desc->caps.ac_controls.w & 0xfffff;
|
||||
|
@ -663,7 +663,7 @@ static int lc823450_i2s_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb,
|
|||
uint32_t bufc_enabled;
|
||||
uint32_t decsel;
|
||||
|
||||
ASSERT(0 < n);
|
||||
DEBUGASSERT(0 < n);
|
||||
|
||||
decsel = getreg32(AUDSEL) & AUDSEL_DECSEL;
|
||||
|
||||
|
|
|
@ -736,7 +736,7 @@ void up_ack_irq(int irq)
|
|||
{
|
||||
/* IRQ should be handled on CPU0 */
|
||||
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -655,9 +655,9 @@ int lc823450_mtd_initialize(uint32_t devno)
|
|||
#ifdef CONFIG_DEBUG
|
||||
for (i = 0; i < LC823450_NPARTS - 1; i++)
|
||||
{
|
||||
ASSERT(partinfo[i].startblock < partinfo[i + 1].startblock);
|
||||
ASSERT(partinfo[i].startblock + partinfo[i].nblocks <= maxblock);
|
||||
ASSERT(partinfo[i + 1].startblock + partinfo[i + 1].nblocks <= maxblock);
|
||||
DEBUGASSERT(partinfo[i].startblock < partinfo[i + 1].startblock);
|
||||
DEBUGASSERT(partinfo[i].startblock + partinfo[i].nblocks <= maxblock);
|
||||
DEBUGASSERT(partinfo[i + 1].startblock + partinfo[i + 1].nblocks <= maxblock);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -241,7 +241,7 @@ int lc823450_sdc_initialize(uint32_t ch)
|
|||
|
||||
/* Only ES2 is supported */
|
||||
|
||||
ASSERT(1 == cpu_ver);
|
||||
DEBUGASSERT(1 == cpu_ver);
|
||||
|
||||
struct SdDrCfg_s *psd = _cfg[ch];
|
||||
|
||||
|
@ -280,7 +280,7 @@ int lc823450_sdc_initialize(uint32_t ch)
|
|||
#endif
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
}
|
||||
|
||||
mcinfo("++++ start \n");
|
||||
|
|
|
@ -110,7 +110,7 @@ static int _get_ch_from_cfg(struct SdDrCfg_s *cfg)
|
|||
break;
|
||||
|
||||
default:
|
||||
ASSERT(false);
|
||||
DEBUGASSERT(false);
|
||||
}
|
||||
|
||||
return ch;
|
||||
|
|
|
@ -146,7 +146,7 @@ void up_enable_clk(enum clock_e clk)
|
|||
irqstate_t flags;
|
||||
flags = spin_lock_irqsave();
|
||||
|
||||
ASSERT(clk < LC823450_CLOCK_NUM);
|
||||
DEBUGASSERT(clk < LC823450_CLOCK_NUM);
|
||||
|
||||
if (lc823450_clocks[clk].count++ == 0)
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ void up_disable_clk(enum clock_e clk)
|
|||
irqstate_t flags;
|
||||
flags = spin_lock_irqsave();
|
||||
|
||||
ASSERT(clk < LC823450_CLOCK_NUM);
|
||||
DEBUGASSERT(clk < LC823450_CLOCK_NUM);
|
||||
|
||||
if (--lc823450_clocks[clk].count == 0)
|
||||
{
|
||||
|
@ -174,7 +174,7 @@ void up_disable_clk(enum clock_e clk)
|
|||
lc823450_clocks[clk].regmask, 0);
|
||||
}
|
||||
|
||||
/* ASSERT(lc823450_clocks[clk].count >= 0); */
|
||||
/* DEBUGASSERT(lc823450_clocks[clk].count >= 0); */
|
||||
|
||||
if (lc823450_clocks[clk].count < 0)
|
||||
{
|
||||
|
|
|
@ -355,7 +355,7 @@ int up_proftimerisr(int irq, uint32_t *regs, FAR void *arg)
|
|||
{
|
||||
if (profile_ptr != CONFIG_PROFILE_SAMPLES)
|
||||
{
|
||||
ASSERT(current_regs);
|
||||
DEBUGASSERT(current_regs);
|
||||
profile_data[profile_ptr++] = current_regs[REG_R15];
|
||||
}
|
||||
else
|
||||
|
|
|
@ -752,7 +752,7 @@ void lpc43_tmrinitialize(FAR const char *devpath, int irq)
|
|||
#endif
|
||||
|
||||
default:
|
||||
ASSERT(0);
|
||||
DEBUGASSERT(0);
|
||||
}
|
||||
|
||||
priv->ops = &g_tmrops;
|
||||
|
|
|
@ -642,7 +642,7 @@ void sam_tcinitialize(FAR const char *devpath, int irq)
|
|||
#endif
|
||||
|
||||
default:
|
||||
ASSERT(0);
|
||||
DEBUGASSERT(0);
|
||||
}
|
||||
|
||||
priv->ops = &g_tcops;
|
||||
|
|
|
@ -570,7 +570,7 @@ static xcpt_t sam34_capture(FAR struct watchdog_lowerhalf_s *lower,
|
|||
return oldhandler;
|
||||
|
||||
#endif
|
||||
ASSERT(0);
|
||||
DEBUGASSERT(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -610,7 +610,7 @@ static void sam_adc_dmadone(void *arg)
|
|||
int i;
|
||||
|
||||
ainfo("ready=%d enabled=%d\n", priv->enabled, priv->ready);
|
||||
ASSERT(priv != NULL && !priv->ready);
|
||||
DEBUGASSERT(priv != NULL && !priv->ready);
|
||||
|
||||
/* If the DMA transfer is not enabled, just ignore the data (and do not start
|
||||
* the next DMA transfer).
|
||||
|
@ -853,7 +853,7 @@ static void sam_adc_endconversion(void *arg)
|
|||
uint32_t pending;
|
||||
int chan;
|
||||
|
||||
ASSERT(priv != NULL);
|
||||
DEBUGASSERT(priv != NULL);
|
||||
ainfo("pending=%08x\n", priv->pending);
|
||||
|
||||
/* Get the set of unmasked, pending ADC interrupts */
|
||||
|
|
|
@ -970,7 +970,7 @@ static struct sam_buffer_s *ssc_buf_allocate(struct sam_ssc_s *priv)
|
|||
|
||||
flags = enter_critical_section();
|
||||
bfcontainer = priv->freelist;
|
||||
ASSERT(bfcontainer);
|
||||
DEBUGASSERT(bfcontainer);
|
||||
|
||||
/* Unlink the buffer from the freelist */
|
||||
|
||||
|
|
|
@ -522,7 +522,7 @@ static void sam_tsd_bottomhalf(void *arg)
|
|||
uint32_t p;
|
||||
bool pendown;
|
||||
|
||||
ASSERT(priv != NULL);
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Get the set of pending ADC interrupts and pen status */
|
||||
|
||||
|
|
|
@ -873,7 +873,7 @@ static int twi_reset(FAR struct i2c_master_s *dev)
|
|||
uint32_t sdapin;
|
||||
int ret;
|
||||
|
||||
ASSERT(priv);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the TWI device */
|
||||
|
||||
|
|
|
@ -1404,7 +1404,7 @@ int sam_i2c_reset(FAR struct i2c_master_s *dev)
|
|||
struct sam_i2c_dev_s *priv = (struct sam_i2c_dev_s *)dev;
|
||||
int ret;
|
||||
|
||||
ASSERT(priv);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the I2C device */
|
||||
|
||||
|
|
|
@ -1455,7 +1455,7 @@ int sam_i2c_reset(FAR struct i2c_master_s *dev)
|
|||
struct sam_i2c_dev_s *priv = (struct sam_i2c_dev_s *)dev;
|
||||
int ret;
|
||||
|
||||
ASSERT(priv);
|
||||
DEBUGASSERT(priv);
|
||||
|
||||
/* Get exclusive access to the I2C device */
|
||||
|
||||
|
|
|
@ -944,7 +944,7 @@ static struct sam_buffer_s *ssc_buf_allocate(struct sam_ssc_s *priv)
|
|||
|
||||
flags = enter_critical_section();
|
||||
bfcontainer = priv->freelist;
|
||||
ASSERT(bfcontainer);
|
||||
DEBUGASSERT(bfcontainer);
|
||||
|
||||
/* Unlink the buffer from the freelist */
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ static int stm32_dma2dirq(int irq, void *context, FAR void *arg)
|
|||
{
|
||||
/* Unknown irq, should not occur */
|
||||
|
||||
ASSERT("Unknown interrupt error\n");
|
||||
DEBUGASSERT("Unknown interrupt error\n");
|
||||
}
|
||||
|
||||
/* Unlock the semaphore if locked */
|
||||
|
|
|
@ -1801,11 +1801,11 @@ static int stm32_i2c_reset(FAR struct i2c_master_s *dev)
|
|||
uint32_t frequency;
|
||||
int ret = ERROR;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Our caller must own a ref */
|
||||
|
||||
ASSERT(priv->refs > 0);
|
||||
DEBUGASSERT(priv->refs > 0);
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
|
@ -1986,7 +1986,7 @@ int stm32_i2cbus_uninitialize(FAR struct i2c_master_s *dev)
|
|||
FAR struct stm32_i2c_priv_s *priv = (struct stm32_i2c_priv_s *)dev;
|
||||
irqstate_t flags;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decrement reference count and check for underflow */
|
||||
|
||||
|
|
|
@ -2266,11 +2266,11 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
|
|||
uint32_t frequency;
|
||||
int ret = ERROR;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Our caller must own a ref */
|
||||
|
||||
ASSERT(priv->refs > 0);
|
||||
DEBUGASSERT(priv->refs > 0);
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
|
@ -2448,7 +2448,7 @@ int stm32_i2cbus_uninitialize(FAR struct i2c_master_s *dev)
|
|||
FAR struct stm32_i2c_priv_s *priv = (FAR struct stm32_i2c_priv_s *)dev;
|
||||
irqstate_t flags;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decrement reference count and check for underflow */
|
||||
|
||||
|
|
|
@ -710,7 +710,7 @@ static struct stm32_buffer_s *i2s_buf_allocate(struct stm32_i2s_s *priv)
|
|||
|
||||
flags = enter_critical_section();
|
||||
bfcontainer = priv->freelist;
|
||||
ASSERT(bfcontainer);
|
||||
DEBUGASSERT(bfcontainer);
|
||||
|
||||
/* Unlink the buffer from the freelist */
|
||||
|
||||
|
|
|
@ -1524,7 +1524,7 @@ static int stm32_ltdcirq(int irq, void *context, FAR void *arg)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT("Unknown interrupt");
|
||||
DEBUGASSERT("Unknown interrupt");
|
||||
}
|
||||
|
||||
/* Unlock the semaphore if locked */
|
||||
|
|
|
@ -447,7 +447,7 @@ void arm_timer_initialize(void)
|
|||
|
||||
/* Basic timers not supported by this implementation */
|
||||
|
||||
ASSERT(0);
|
||||
DEBUGASSERT(0);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -456,7 +456,7 @@ void arm_timer_initialize(void)
|
|||
|
||||
/* Basic timers not supported by this implementation */
|
||||
|
||||
ASSERT(0);
|
||||
DEBUGASSERT(0);
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -517,7 +517,7 @@ void arm_timer_initialize(void)
|
|||
#endif
|
||||
|
||||
default:
|
||||
ASSERT(0);
|
||||
DEBUGASSERT(0);
|
||||
}
|
||||
|
||||
/* Get the TC frequency that corresponds to the requested resolution */
|
||||
|
@ -535,7 +535,7 @@ void arm_timer_initialize(void)
|
|||
if (!g_tickless.tch)
|
||||
{
|
||||
tmrerr("ERROR: Failed to allocate TIM%d\n", g_tickless.timer);
|
||||
ASSERT(0);
|
||||
DEBUGASSERT(0);
|
||||
}
|
||||
|
||||
STM32_TIM_SETCLOCK(g_tickless.tch, g_tickless.frequency);
|
||||
|
|
|
@ -1804,11 +1804,11 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
|
|||
uint32_t frequency;
|
||||
int ret = ERROR;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Our caller must own a ref */
|
||||
|
||||
ASSERT(priv->refs > 0);
|
||||
DEBUGASSERT(priv->refs > 0);
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
|
@ -1986,7 +1986,7 @@ int stm32_i2cbus_uninitialize(FAR struct i2c_master_s * dev)
|
|||
FAR struct stm32_i2c_priv_s *priv = (struct stm32_i2c_priv_s *)dev;
|
||||
irqstate_t flags;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decrement refs and check for underflow */
|
||||
|
||||
|
|
|
@ -1779,11 +1779,11 @@ static int stm32f0_i2c_reset(FAR struct i2c_master_s * dev)
|
|||
uint32_t frequency;
|
||||
int ret = -EIO;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Our caller must own a ref */
|
||||
|
||||
ASSERT(priv->refs > 0);
|
||||
DEBUGASSERT(priv->refs > 0);
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
|
@ -1969,7 +1969,7 @@ int stm32f0_i2cbus_uninitialize(FAR struct i2c_master_s * dev)
|
|||
FAR struct stm32f0_i2c_priv_s *priv = (struct stm32f0_i2c_priv_s *)dev;
|
||||
irqstate_t flags;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decrement refs and check for underflow */
|
||||
|
||||
|
|
|
@ -410,7 +410,7 @@ static int stm32_dma2dirq(int irq, void *context, FAR void *arg)
|
|||
{
|
||||
/* Unknown irq, should not occur */
|
||||
|
||||
ASSERT("Unknown interrupt error\n");
|
||||
DEBUGASSERT("Unknown interrupt error\n");
|
||||
}
|
||||
|
||||
/* Unlock the semaphore if locked */
|
||||
|
|
|
@ -2554,7 +2554,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
|
|||
uint32_t frequency;
|
||||
int ret = ERROR;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Get I2C private structure */
|
||||
|
||||
|
@ -2562,7 +2562,7 @@ static int stm32_i2c_reset(FAR struct i2c_master_s * dev)
|
|||
|
||||
/* Our caller must own a ref */
|
||||
|
||||
ASSERT(priv->refs > 0);
|
||||
DEBUGASSERT(priv->refs > 0);
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
|
@ -2837,7 +2837,7 @@ int stm32_i2cbus_uninitialize(FAR struct i2c_master_s * dev)
|
|||
{
|
||||
irqstate_t irqs;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decrement refs and check for underflow */
|
||||
|
||||
|
|
|
@ -1526,7 +1526,7 @@ static int stm32_ltdcirq(int irq, void *context, FAR void *arg)
|
|||
}
|
||||
else
|
||||
{
|
||||
ASSERT("Unknown interrupt");
|
||||
DEBUGASSERT("Unknown interrupt");
|
||||
}
|
||||
|
||||
/* Unlock the semaphore if locked */
|
||||
|
|
|
@ -2704,7 +2704,7 @@ static int stm32l4_i2c_reset(FAR struct i2c_master_s * dev)
|
|||
uint32_t frequency;
|
||||
int ret = ERROR;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Get I2C private structure */
|
||||
|
||||
|
@ -2712,7 +2712,7 @@ static int stm32l4_i2c_reset(FAR struct i2c_master_s * dev)
|
|||
|
||||
/* Our caller must own a ref */
|
||||
|
||||
ASSERT(priv->refs > 0);
|
||||
DEBUGASSERT(priv->refs > 0);
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
|
@ -2984,7 +2984,7 @@ int stm32l4_i2cbus_uninitialize(FAR struct i2c_master_s * dev)
|
|||
{
|
||||
irqstate_t irqs;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decrement refs and check for underflow */
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ static int stm32l4_lptim_setchannel(FAR struct stm32l4_lptim_dev_s *dev,
|
|||
int ret = OK;
|
||||
uint32_t cfg = 0;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Configure GPIOs */
|
||||
|
||||
|
@ -532,7 +532,7 @@ FAR struct stm32l4_lptim_dev_s *stm32l4_lptim_init(int timer)
|
|||
|
||||
int stm32l4_lptim_deinit(FAR struct stm32l4_lptim_dev_s * dev)
|
||||
{
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Disable power */
|
||||
|
||||
|
|
|
@ -1207,7 +1207,7 @@ static struct sai_buffer_s *sai_buf_allocate(struct stm32l4_sai_s *priv)
|
|||
|
||||
flags = enter_critical_section();
|
||||
bfcontainer = priv->freelist;
|
||||
ASSERT(bfcontainer);
|
||||
DEBUGASSERT(bfcontainer);
|
||||
|
||||
/* Unlink the buffer from the freelist */
|
||||
|
||||
|
@ -1305,7 +1305,7 @@ static void sai_portinitialize(struct stm32l4_sai_s *priv)
|
|||
/* Create a watchdog timer to catch transfer timeouts */
|
||||
|
||||
priv->dog = wd_create();
|
||||
ASSERT(priv->dog);
|
||||
DEBUGASSERT(priv->dog);
|
||||
|
||||
/* Initialize buffering */
|
||||
|
||||
|
|
|
@ -1776,7 +1776,7 @@ static int tiva_i2c_reset(FAR struct i2c_master_s * dev)
|
|||
|
||||
/* Our caller must own a ref */
|
||||
|
||||
ASSERT(priv->refs > 0);
|
||||
DEBUGASSERT(priv->refs > 0);
|
||||
|
||||
/* Lock out other clients */
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ static inline void tms570_check_reset(void)
|
|||
*/
|
||||
|
||||
#if 0
|
||||
ASSERT((regval & SYS_ESR_FAILALL) == 0);
|
||||
DEBUGASSERT((regval & SYS_ESR_FAILALL) == 0);
|
||||
#else
|
||||
UNUSED(regval);
|
||||
#endif
|
||||
|
@ -322,7 +322,7 @@ void arm_boot(void)
|
|||
* application.
|
||||
*/
|
||||
|
||||
ASSERT(getreg32(TMS570_ESM_SR3) == 0);
|
||||
DEBUGASSERT(getreg32(TMS570_ESM_SR3) == 0);
|
||||
|
||||
/* Initialize clocking to settings provided by board-specific logic */
|
||||
|
||||
|
@ -341,7 +341,7 @@ void arm_boot(void)
|
|||
/* Run the memory selftest on CPU RAM. */
|
||||
|
||||
tms570_memtest_start(PBIST_RINFOL_ESRAM1_RAM);
|
||||
ASSERT(tms570_memtest_complete() == OK);
|
||||
DEBUGASSERT(tms570_memtest_complete() == OK);
|
||||
#endif /* CONFIG_TMS570_SELFTEST */
|
||||
|
||||
/* Initialize CPU RAM. */
|
||||
|
@ -380,7 +380,7 @@ void arm_boot(void)
|
|||
|
||||
/* Wait for the memory test to complete */
|
||||
|
||||
ASSERT(tms570_memtest_complete() == OK);
|
||||
DEBUGASSERT(tms570_memtest_complete() == OK);
|
||||
#endif /* CONFIG_TMS570_SELFTEST */
|
||||
|
||||
#ifdef CONFIG_TMS570_MIBASPI1
|
||||
|
|
|
@ -837,7 +837,7 @@ void tms570_clockconfig(void)
|
|||
#ifdef CONFIG_TMS570_SELFTEST
|
||||
/* Wait for eFuse controller self-test to complete and check results */
|
||||
|
||||
ASSERT(tms570_efc_selftest_complete() == 0);
|
||||
DEBUGASSERT(tms570_efc_selftest_complete() == 0);
|
||||
#endif
|
||||
|
||||
/* Set up flash address and data wait states. */
|
||||
|
|
|
@ -80,7 +80,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -84,7 +84,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -81,7 +81,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -88,7 +88,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -81,7 +81,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -75,7 +75,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -309,7 +309,7 @@ static inline void pim_configgpio(uint16_t cfgset, uint8_t portndx, uint8_t pin)
|
|||
{
|
||||
/* Yes.. then it must not be tagged as an output */
|
||||
|
||||
ASSERT((cfgset & GPIO_DIRECTION) != GPIO_OUTPUT);
|
||||
DEBUGASSERT((cfgset & GPIO_DIRECTION) != GPIO_OUTPUT);
|
||||
|
||||
/* If the pull-driver is also enabled, it must be enabled with a
|
||||
* compatible priority.
|
||||
|
@ -319,11 +319,11 @@ static inline void pim_configgpio(uint16_t cfgset, uint8_t portndx, uint8_t pin)
|
|||
{
|
||||
if ((cfgset & GPIO_INT_POLARITY) != 0)
|
||||
{
|
||||
ASSERT((cfgset & GPIO_PULL_POLARITY) != 0);
|
||||
DEBUGASSERT((cfgset & GPIO_PULL_POLARITY) != 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT((cfgset & GPIO_PULL_POLARITY) == 0);
|
||||
DEBUGASSERT((cfgset & GPIO_PULL_POLARITY) == 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -98,7 +98,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -83,7 +83,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -85,7 +85,7 @@ void lm32_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -81,7 +81,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -75,7 +75,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -80,7 +80,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -75,7 +75,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -97,7 +97,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ static int nr5_timer_setclock(FAR struct nr5_timer_dev_s *dev, uint32_t freq)
|
|||
{
|
||||
int prescaler;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Disable Timer? */
|
||||
|
||||
|
@ -199,7 +199,7 @@ static int nr5_timer_setclock(FAR struct nr5_timer_dev_s *dev, uint32_t freq)
|
|||
static void nr5_timer_setperiod(FAR struct nr5_timer_dev_s *dev,
|
||||
uint32_t period)
|
||||
{
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
nr5_putreg32(dev, NR5_BTIM_ARR_OFFSET, period);
|
||||
}
|
||||
|
||||
|
@ -208,8 +208,8 @@ static int nr5_timer_setisr(FAR struct nr5_timer_dev_s *dev,
|
|||
{
|
||||
int vectorno;
|
||||
|
||||
ASSERT(dev);
|
||||
ASSERT(source == 0);
|
||||
DEBUGASSERT(dev);
|
||||
DEBUGASSERT(source == 0);
|
||||
|
||||
switch (((struct nr5_timer_priv_s *)dev)->base)
|
||||
{
|
||||
|
@ -290,13 +290,13 @@ static int nr5_timer_setisr(FAR struct nr5_timer_dev_s *dev,
|
|||
|
||||
static void nr5_timer_enableint(FAR struct nr5_timer_dev_s *dev, int source)
|
||||
{
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
nr5_modifyreg16(dev, NR5_BTIM_DIER_OFFSET, 0, ATIM_DIER_UIE);
|
||||
}
|
||||
|
||||
static void nr5_timer_disableint(FAR struct nr5_timer_dev_s *dev, int source)
|
||||
{
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
nr5_modifyreg16(dev, NR5_BTIM_DIER_OFFSET, ATIM_DIER_UIE, 0);
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ static int nr5_timer_setmode(FAR struct nr5_timer_dev_s *dev, nr5_timer_mode_t m
|
|||
{
|
||||
uint16_t val = ATIM_CR1_CEN | ATIM_CR1_ARPE;
|
||||
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Decode operational modes */
|
||||
|
||||
|
@ -465,7 +465,7 @@ FAR struct nr5_timer_dev_s *nr5_timer_init(int timer)
|
|||
|
||||
int nr5_timer_deinit(FAR struct nr5_timer_dev_s * dev)
|
||||
{
|
||||
ASSERT(dev);
|
||||
DEBUGASSERT(dev);
|
||||
|
||||
/* Set timer mode to STOP */
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -91,7 +91,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -80,7 +80,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
//sinfo("Blocking TCB=%p\n", tcb);
|
||||
|
|
|
@ -74,7 +74,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
sinfo("Unblocking TCB=%p\n", tcb);
|
||||
|
|
|
@ -80,7 +80,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -74,7 +74,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -85,7 +85,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ void up_block_task(struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* Remove the tcb task from the ready-to-run list. If we
|
||||
|
|
|
@ -93,7 +93,7 @@ void xtensa_sig_deliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* Remove the task from the blocked task list */
|
||||
|
|
|
@ -80,7 +80,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* sinfo("Blocking TCB=%p\n", tcb); */
|
||||
|
|
|
@ -86,7 +86,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* sinfo("Unblocking TCB=%p\n", tcb); */
|
||||
|
|
|
@ -82,7 +82,7 @@ void up_block_task(FAR struct tcb_s *tcb, tstate_t task_state)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_READY_TO_RUN_STATE) &&
|
||||
(tcb->task_state <= LAST_READY_TO_RUN_STATE));
|
||||
|
||||
/* _info("Blocking TCB=%p\n", tcb); */
|
||||
|
|
|
@ -78,7 +78,7 @@ void up_unblock_task(FAR struct tcb_s *tcb)
|
|||
|
||||
/* Verify that the context switch can be performed */
|
||||
|
||||
ASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
DEBUGASSERT((tcb->task_state >= FIRST_BLOCKED_STATE) &&
|
||||
(tcb->task_state <= LAST_BLOCKED_STATE));
|
||||
|
||||
/* _info("Unblocking TCB=%p\n", tcb); */
|
||||
|
|
|
@ -97,7 +97,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ void up_sigdeliver(void)
|
|||
|
||||
sinfo("rtcb=%p sigdeliver=%p sigpendactionq.head=%p\n",
|
||||
rtcb, rtcb->xcp.sigdeliver, rtcb->sigpendactionq.head);
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
DEBUGASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
/* Save the real return state on the stack. */
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ static int lc823450_st7565_backlight(FAR struct st7565_lcd_s *lcd, int level)
|
|||
int board_lcd_initialize(void)
|
||||
{
|
||||
g_spidev = lc823450_spibus_initialize(LCD_SPI_PORTNO);
|
||||
ASSERT(NULL != g_spidev);
|
||||
DEBUGASSERT(NULL != g_spidev);
|
||||
|
||||
g_spidev->ops->setmode(g_spidev, SPIDEV_MODE3);
|
||||
g_spidev->ops->setbits(g_spidev, 8);
|
||||
|
|
|
@ -755,7 +755,7 @@ static void tc_worker(FAR void *arg)
|
|||
int16_t ydiff;
|
||||
int ret;
|
||||
|
||||
ASSERT(priv != NULL);
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
/* Perform the next action based on the state of the conversions */
|
||||
|
||||
|
@ -1103,7 +1103,7 @@ static void tc_worker(FAR void *arg)
|
|||
/* Set up the next sample event */
|
||||
|
||||
ret = work_queue(HPWORK, &priv->work, tc_worker, priv, delay);
|
||||
ASSERT(ret == 0);
|
||||
DEBUGASSERT(ret == 0);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue