| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The atmega328 is basically the same as the atmega168 - it just adds
some additional memory. Allow the chip to be selected during the
build.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Instead of assuming the maximum PWM value is 255, export a constant
from the firmware to the host with the maximum value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
The maximum value for the ADC is 1023 for 10bit samples and 4095 for
12bit samples.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Rework the pin search loop.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Move the PWM, ADC, and SPI pin tables closer to their corresponding
code. This is code movement only - no code changes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
The flags and cs variables should be uint8_t not irqstatus_t.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Instead of commenting out the timer1 pwm definitions, detect them at
runtime.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add GPIO definitions for the AT90USB1286. Add code for communicating
over USB port on AT90USB1286.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|