aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/timer.c
Commit message (Collapse)AuthorAgeFilesLines
* build: Define DECL_CONSTANT mechanism for defining exported constantsKevin O'Connor2016-12-231-0/+3
| | | | | | | | | Add a DECL_CONSTANT macro to allow the firmware to define constants that are to be exported to the host during the "identify" phase. This replaces the existing hardcoded mechanism of scanning the Kconfig header file for certain constants. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* timer: Rework AVR timer priority code to use time instead of event countKevin O'Connor2016-10-191-11/+23
| | | | | | | | | Rework the timer prioritization code so that is compares against the current time instead of the number of repeat timers in a given interrupt. This makes the code slightly faster and it should provide better protection against task starvation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* irq: Allow boards to define the return type of irq_save()Kevin O'Connor2016-06-131-2/+2
| | | | | | | | The AVR wants a uint8_t return type for irq_save(), but other architectures will generally prefer int. Allow the board to configure the size of the flag by introducing an irqstatus_t typedef. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* generic: Move board timer.h files into generic/misc.hKevin O'Connor2016-06-131-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add config option to clear the CPU prescalerKevin O'Connor2016-06-051-0/+9
| | | | | | | Some AVR chips ship with a 1/8th clock divisor set. Add a compile time option to manually clear this field at startup. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Change sched_from_ms() to sched_from_us()Kevin O'Connor2016-06-021-5/+5
| | | | | | | Some code may require micro-second precision so update sched_from_ms() to use micro-seconds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* timer: Move union u32_u16_u from compiler.h to avr/timer.cKevin O'Connor2016-06-011-1/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+171
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>