Guest User

Untitled

a guest
Jul 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. static enum hrtimer_restart spike_timer_callback(struct hrtimer *timer)
  2. {
  3. if (!spike_dev.running) {
  4. return HRTIMER_NORESTART;
  5. }
  6.  
  7. /* busy means the previous message has not completed */
  8. if (spike_ctl.busy) {
  9. spike_ctl.busy_counter++;
  10. }
  11. else if (spike_queue_spi_write() != 0) {
  12. return HRTIMER_NORESTART;
  13. }
  14.  
  15. hrtimer_forward_now(&spike_dev.timer,
  16. ktime_set(spike_dev.timer_period_sec,
  17. spike_dev.timer_period_ns));
  18.  
  19. return HRTIMER_RESTART;
  20. }
Add Comment
Please, Sign In to add comment