void send_callback(void *cb_data) { ec_master_t *m = (ec_master_t *) cb_data; down(&master_sem); ecrt_master_send_ext(m); up(&master_sem); }
void send_callback(void *cb_data) { ec_master_t *m = (ec_master_t *) cb_data; // too close to the next real time cycle: deny access... if (get_cycles() - t_last_cycle <= t_critical) { rt_sem_wait(&master_sem); ecrt_master_send_ext(m); rt_sem_signal(&master_sem); } }