Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
Add Comment
Please, Sign In to add comment