summaryrefslogtreecommitdiff
path: root/src-avr
Commit message (Collapse)AuthorAge
* altos: Make telescience reliably log only when told toKeith Packard2011-05-24
| | | | | | | | | | | | | | Use a pull-up on telescience and tri-state input on telemetrum at boot time. Enable logging by pulling the TM output low and enabling as an output, disable by pulling the TM output high and switching back to input mode. Also, ignore pin state changes for 5 seconds at boot to give things a chance to settle down. Should work when both boards are powered up together. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Move logging printfs out of ISR call chainKeith Packard2011-05-23
| | | | | | Probably not the best plan to call printf from an interrupt handler. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Control log with pin on companion connectorKeith Packard2011-05-23
| | | | | | Use the SPI chip select (SS) which is hooked to port B0. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Check RAM usage for telescienceKeith Packard2011-05-21
| | | | | | | ATmega32u4 has only 2.5kB of ram, so check the output of the compiler to make sure it will work. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: bump ADC ring to 16 samplesKeith Packard2011-05-21
| | | | | | | We've got ram for it at this point, and it's nice to have more data from before boost detect. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Finish up telescience loggingKeith Packard2011-05-21
| | | | | | | Adds list and delete commands, making them compatible with telemetrum and telemini equivalents. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Log ADC data to eepromKeith Packard2011-05-21
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Clean up AVR ADC codeKeith Packard2011-05-21
| | | | | | Remove interrupt debug variables, print channel number in ao_adc_dump. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Add ADC routines to telescienceKeith Packard2011-05-21
| | | | | | | Note that SLEEP mode must be disabled or extra ADC interrupts occur, which messes up saving ADC values to the right channel. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Reduce control connection interruptsKeith Packard2011-05-20
| | | | | | | Leave these disabled while processing stuff; otherwise we receive a steady stream of them. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Clean up the USB echo debug task a bitKeith Packard2011-05-20
|
* src-avr: Disable USB interrupts while we're not interestedKeith Packard2011-05-20
| | | | | | | | We leave USB data lying around until called for, which results in constant badgering if interrupts are enabled. Disable them until there isn't any data left. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Add USB IRQ debug cmdKeith Packard2011-05-20
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Attempt to leave IN interrupts disabled most of the timeKeith Packard2011-05-20
|
* src-avr: Add 'sleep_cpu' to reduce power usage while idleKeith Packard2011-05-20
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Add SPI modules to telescienceKeith Packard2011-05-19
| | | | | | And it works too! Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Add telescience build targetKeith Packard2011-05-19
| | | | | | No serial output, just USB Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Get USB on AVR workingKeith Packard2011-05-18
| | | | | | | As usual, the key is to know when to send 0-length IN and OUT packets. Needs a bunch of cleanup, but it's working now. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Make avr-demo objects depend on ao_usb.hKeith Packard2011-05-18
| | | | | | Now that we have a usb driver, it's part of the build Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Trap accidental restartKeith Packard2011-05-18
| | | | | | | Use the LED output pin to notice when avr-demo accidentally restarts and print out an error message in that case. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Suspend interrupts while switching stacksKeith Packard2011-05-18
| | | | | | | | Setting the stack pointer takes two instructions, so make sure we don't get an interrupt in the middle of it. Let the restoration of SREG set the interrupt flag as appropriate. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: USB work in progressKeith Packard2011-05-17
| | | | | | Some packets are flowing, although it's not working right. Signed-off-by: Keith Packard <keithp@keithp.com>
* src-avr: Add a couple of missing filesKeith Packard2011-05-17
| | | | | | These are part of the ../src directory, I think Signed-off-by: Keith Packard <keithp@keithp.com>
* altos-avr: Start writing USB driver.Keith Packard2011-05-15
| | | | | | Adapt ao_usb to new environment. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos-avr: Enable command processor over serial line in demoKeith Packard2011-05-13
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos-avr: Initial OS port to AVRKeith Packard2011-05-13
This is working with output to the serial line Signed-off-by: Keith Packard <keithp@keithp.com>