aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/gpio.c
Commit message (Collapse)AuthorAgeFilesLines
* mcu: Obtain the maximum adc value from the firmwareKevin O'Connor2016-12-231-0/+2
| | | | | | | Don't assume the hardware ADC has 10bit resultion - instead have the firmware define a constant and read that constant in the host. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpio: Merge gpio_adc_sample_time() into gpio_adc_sample()Kevin O'Connor2016-11-021-17/+17
| | | | | | | Return the number of clock ticks to wait directly from gpio_adc_sample(). This simplifies the ADC interface. 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-6/+6
| | | | | | | | 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>
* 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: 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-051-2/+19
| | | | | | | Add GPIO definitions for the AT90USB1286. Add code for communicating over USB port on AT90USB1286. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+337
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>