Created
December 6, 2010 11:35
-
-
Save scottellis/730170 to your computer and use it in GitHub Desktop.
spike_timer_callback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static enum hrtimer_restart spike_timer_callback(struct hrtimer *timer) | |
{ | |
if (!spike_dev.running) { | |
return HRTIMER_NORESTART; | |
} | |
/* busy means the previous message has not completed */ | |
if (spike_ctl.busy) { | |
spike_ctl.busy_counter++; | |
} | |
else if (spike_queue_spi_write() != 0) { | |
return HRTIMER_NORESTART; | |
} | |
hrtimer_forward_now(&spike_dev.timer, | |
ktime_set(spike_dev.timer_period_sec, | |
spike_dev.timer_period_ns)); | |
return HRTIMER_RESTART; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment