summaryrefslogtreecommitdiff
path: root/src/ao_usb.c
Commit message (Collapse)AuthorAge
* altos: Switch ao_usb.c __xdata to __pdataKeith Packard2011-07-06
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: clear CPU port 1 interrupt flag when handledKeith Packard2011-05-06
| | | | Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Hook up the P1 ISR for TeleBT v0.1 bt_link lineKeith Packard2011-05-06
| | | | | | Otherwise, we're heading off into the weeds... Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Use PIO(6) on BTM to monitor BT connection. Fix BTM init.Keith Packard2011-04-07
| | | | | | | | PIo(6) appears to be an active-low indication of the Bluetooth connection status. Hook this up using an interrupt to track the link state instead of using in-band status messages. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: Windows sends USB Out packets of 0 length. Ack them.Keith Packard2010-08-30
| | | | | | | | This was an untested case as no other operating system sents 0-length out packets (they're not necessary). The correct response is to ACK them by clearing the OUTPKT_RDY bit so that another packet can be sent. Signed-off-by: Keith Packard <keithp@keithp.com>
* altos: prepare for sdcc 2.9.1Keith Packard2010-08-27
| | | | | | | A few minor language changes -- non-standard keywords are now prefixed with __, such as 'at', 'interrupt', 'naked'. Signed-off-by: Keith Packard <keithp@keithp.com>
* When the EP0 IN buffer is full, don't panic, just skip sending anotherKeith Packard2010-07-26
| | | | | | | | | | If the host doesn't pull the IN packet out of EP0 before sending another SETUP command along, the IN buffer will still be busy when we try to reply to the SETUP command. While I don't quite understand why this would ever happen, there's no need to panic about it, just drop the reply packet on the floor. Signed-off-by: Keith Packard <keithp@keithp.com>
* Add special code for USB panic's.Keith Packard2010-06-16
| | | | | | | | The USB system may panic if the hardware isn't ready for IN data when the driver thinks it should be. This adds a special panic code to make figuring this out easier. 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>
* In USB pollchar, wait for packet before re-checking USB out lenKeith Packard2009-11-04
| | | | | | | | | This probably wouldn't actually cause a problem, but it seems more reliable to wait for a packet interrupt before re-reading the packet OUT len register. This could avoid spinning while waiting for a USB packet, which seems like a good thing. 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>
* Save some DSEG space by marking cmd functions __reentrantKeith Packard2009-10-16
| | | | | | | __reentrant causes the compiler to place args and locals on the stack instead of in the data segment. Signed-off-by: Keith Packard <keithp@keithp.com>
* Send 0-length IN packet to flush USB after full packetKeith Packard2009-10-10
| | | | | | | | | USB bulk transfers are a sequence of maximum-sized packets followed by a short packet, which signals the end of the transfer. When the last packet of the transfer would be a full-sized packet, an additional packet of zero length is sent to signal the transfer end. Signed-off-by: Keith Packard <keithp@keithp.com>
* Use autotools, move altos to src subdirKeith Packard2009-06-04
Signed-off-by: Keith Packard <keithp@keithp.com>