@Giovanni
I need some help about porting to v3.
1)
Code: Select all
/**
* @brief Wakes up the waiting thread.
*
* @param[in] emcnandp pointer to the @p EMCNANDDriver object
* @param[in] msg wakeup message
*
* @notapi
*/
static void wakeup_isr(EMCNANDDriver *emcnandp, msg_t msg){
osalDbgCheck(emcnandp->thread != NULL);
if (emcnandp->thread) {
thread_t *tp = emcnandp->thread;
emcnandp->thread = NULL;
tp->p_u.rdymsg = msg;
chSchReadyI(tp);
}
}
/**
* @brief Put calling thread in suspend and switch driver state
*
* @param[in] emcnandp pointer to the @p EMCNANDDriver object
*/
static void emcnand_lld_suspend_thread(EMCNANDDriver *emcnandp) {
emcnandp->thread = chThdGetSelfX();
chSchGoSleepS(CH_STATE_SUSPENDED);
}
Is this code correct for use with v3? I am talking about thread handling.
2) For testhal application I need time measurment instruments. What I must use instead of tmStartMeasurement() from v2.6