summaryrefslogtreecommitdiff
path: root/src/ao_packet_master.c
Commit message (Collapse)AuthorAge
* altos: packet and usb i/o routines use 'char', not 'uint8_t'Keith Packard2011-01-06
| | | | | | | Just fixing the type of a local variable holding a character passed from the packet link to usb. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: eliminate ao_wake_taskKeith Packard2010-12-22
| | | | | | | Waking up a task waiting on some random object is a bad idea. Fix the waiters to look for suitable signalling. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: clean up radio abort paths. Share radio code.Keith Packard2010-12-22
| | | | | | | | | | | | | Instead of aborting the DMA and radio operation and expecting that to be handled reasonably by the radio receiving task, rewrite things so that the abort function just wakes the receiving task while that terminates the DMA and cleans up the radio. This eliminates all kinds of nasty bugs dealing with radio abort smashing the radio registers at the wrong time, or interrupting a radio transmission. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: shut down packet mode cleanlyKeith Packard2010-08-29
| | | | | | | | | | | | Instead of constantly bashing the packet master thread, let it shut itself down in an orderly fashion. It will shut down fairly quickly as all of the activities in that thread are bounded. Otherwise, the master packet thread might leave mutexes locked and all sorts of other horrors. Tested on Linux and Mac OS X and shown to be reliable. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Abort radio harder when terminating packet mode.Keith Packard2010-08-29
| | | | | | | | Make sure the master radio tasks don't get stuck waiting for an incoming packet again by aborting the radio each time we poke the tasks. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: flush pending output when terminating packet modeKeith Packard2010-08-29
| | | | | | | Just in case the last command sent hasn't been transmitted, hang around for up to a second waiting for the data to get across the link. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: add callsign to packet mode, increase payload to 64 bytesKeith Packard2010-08-07
| | | | | | | Untested, but it 'should' work. Need to add callsign setting to packet mode users. Signed-off-by: Keith Packard <keithp@keithp.com>
* Fix all stdio reading functions to be __criticalKeith Packard2010-05-05
| | | | | | | Oh, right SDCC has '__critical' to mark sections of code that need to run with interrupts disabled; no need to use EA = 0 and EA = 1. Signed-off-by: Keith Packard <keithp@keithp.com>
* Return radio to telemetry settings when packet system closed.Keith Packard2009-11-05
| | | | | | | To receive telemetry after disabling the packet system, the radio must be reconfigured for telemetry mode. Signed-off-by: Keith Packard <keithp@keithp.com>
* Explicitly use USB I/O routines in packet codeKeith Packard2009-11-04
| | | | | | | | | Using the implicit stdio functions (putchar/getchar/flush) would result in essentially random redirection of each, depending on whether the packet code had characters available when getchar was called. This would cause lockups in putchar. Signed-off-by: Keith Packard <keithp@keithp.com>
* In packet master, move USB flush from packet thread to echo threadKeith Packard2009-11-04
| | | | | | | | This keeps the packet thread from blocking on USB and also makes the flush happen after every packet (slightly more USB traffic, but packets are slow anyway). Signed-off-by: Keith Packard <keithp@keithp.com>
* Enable packet-based communcation to command processorKeith Packard2009-11-01
This splits the packet code into master/slave halves and hooks the slave side up to the getchar/putchar/flush logic in ao_stdio.c Signed-off-by: Keith Packard <keithp@keithp.com>