aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* irq: Prefer irq_disable/enable instead of irq_save/restore in cmds/tasksKevin O'Connor2016-06-134-13/+13
| | | | | | | | Task and command handlers always run with irqs enabled, so it is not necessary to save/restore the irq state when disabling irqs in these handlers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pwmcmds: Add Kconfig option to allow boards to disable hardware PWM commandsKevin O'Connor2016-06-135-70/+85
| | | | | | | | Some boards may not support hardware based PWM. Update the build so that those commands do not need to be compiled if they are not available. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* spicmds: Add Kconfig option to allow boards to disable SPI commandsKevin O'Connor2016-06-133-1/+6
| | | | | | | Some boards may not support SPI transfers. Update the build so that those commands do not need to be compiled if they are not available. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpiocmds: Add Kconfig option to allow boards to disable ADC commandsKevin O'Connor2016-06-135-111/+132
| | | | | | | | Some boards may not support the ADC hardware. Update the build so that those commands do not need to be compiled if they are not available. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* compiler.h: Check if __aligned and __section macros are already definedKevin O'Connor2016-06-131-0/+4
| | | | | | | Don't define these macros if they are already - doing so causes compiler warnings. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Makefile: Move listing of directories to create to board makefilesKevin O'Connor2016-06-132-0/+4
| | | | | | Rename DIRS to dirs-y and populate it in the per-board Makefile rules. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* generic: Add new file generic/io.h and move read/writeb() to itKevin O'Connor2016-06-133-19/+26
| | | | | | | | Move the definitions of the readb() style functions to a new header generic/io.h. This eliminates the dependency of stdint.h on compiler.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* generic: Move simulator/gpio.h to generic/gpio.hKevin O'Connor2016-06-132-3/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* generic: Move simulator/irq.h to new file generic/irq.hKevin O'Connor2016-06-134-34/+46
| | | | | | | Move the generic irq definitions into generic/irq.h and move the simulator irq code into main.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* generic: Move board timer.h files into generic/misc.hKevin O'Connor2016-06-135-26/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* generic: Create generic board infrastructure and move misc.h to itKevin O'Connor2016-06-1310-68/+69
| | | | | | | Instead of creating a misc.h file in each board directory, create a generic board directory and declare misc.h there. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Optimize timer list handlingKevin O'Connor2016-06-131-39/+50
| | | | | | Rework the timer list rescheduling to be more optimized. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Optimize for case where add is zeroKevin O'Connor2016-06-131-11/+15
| | | | | | | At high rates, the "add" field is frequently zero. It's possible to optimize for that case. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpio: Fix off-by-one bug in check for the maximum gpio portKevin O'Connor2016-06-131-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Add config option to clear the CPU prescalerKevin O'Connor2016-06-052-0/+23
| | | | | | | 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>
* avr: Separate out gpio pwm pin definitions from pwm register definitionsKevin O'Connor2016-06-051-41/+44
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Eliminate gpio_adc_info struct in gpio adc pin definitionsKevin O'Connor2016-06-051-17/+12
| | | | | | | The gpio_adc_info only contains a single uint8_t field - it's simpler to use an array of uint8_t instead. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Define timer1 timers and prevent their use as PWM at runtimeKevin O'Connor2016-06-051-10/+12
| | | | | | | Instead of commenting out the timer1 pwm definitions, detect them at runtime. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* avr: Initial support for Atmel AT90USB1286 mcuKevin O'Connor2016-06-054-2/+93
| | | | | | | Add GPIO definitions for the AT90USB1286. Add code for communicating over USB port on AT90USB1286. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Change sched_from_ms() to sched_from_us()Kevin O'Connor2016-06-027-16/+16
| | | | | | | 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>
* stepper: Use stepper_stop() instead of stepper_reset() in stepper_shutdown()Kevin O'Connor2016-06-021-13/+6
| | | | | | | The stepper_stop() function is equivalent to stepper_reset() during a shutdown event. 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-012-6/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-2536-0/+3129
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>