diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-05-29 12:41:14 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-05-29 12:41:14 +0000 |
commit | ea922c98d187eb74c31535afa3334ead5bd50526 (patch) | |
tree | 0add2892e10e4686e555ddf1d98c9110ebb4ba9f /Projects/AVRISP-MKII/Lib/V2Protocol.c | |
parent | cc9b190919abbc567cd179b31afeef565efb1f17 (diff) | |
download | lufa-ea922c98d187eb74c31535afa3334ead5bd50526.tar.gz lufa-ea922c98d187eb74c31535afa3334ead5bd50526.tar.bz2 lufa-ea922c98d187eb74c31535afa3334ead5bd50526.zip |
Added new incomplete AudioInputHost Host LowLevel demo.
Added missing Audio class control request definitions.
Added support for the Audio class GET STATUS request so that it is correctly ACKed when sent by the host.
Diffstat (limited to 'Projects/AVRISP-MKII/Lib/V2Protocol.c')
-rw-r--r-- | Projects/AVRISP-MKII/Lib/V2Protocol.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Projects/AVRISP-MKII/Lib/V2Protocol.c b/Projects/AVRISP-MKII/Lib/V2Protocol.c index f763d6333..a955a95a8 100644 --- a/Projects/AVRISP-MKII/Lib/V2Protocol.c +++ b/Projects/AVRISP-MKII/Lib/V2Protocol.c @@ -42,13 +42,17 @@ uint32_t CurrentAddress; /** Flag to indicate that the next read/write operation must update the device's current extended FLASH address */ bool MustLoadExtendedAddress; +/** Command timeout expiration flag. */ +volatile bool TimeoutExpired; +#if (ARCH == ARCH_AVR8) // TODO: FIXME /** ISR to manage timeouts whilst processing a V2Protocol command */ ISR(WDT_vect, ISR_BLOCK) { TimeoutExpired = true; wdt_disable(); } +#endif /** Initialises the hardware and software associated with the V2 protocol command handling. */ void V2Protocol_Init(void) @@ -75,10 +79,12 @@ void V2Protocol_ProcessCommand(void) { uint8_t V2Command = Endpoint_Read_8(); + #if (ARCH == ARCH_AVR8) // TODO: FIXME /* Start the watchdog with timeout interrupt enabled to manage the timeout */ TimeoutExpired = false; wdt_enable(WDTO_1S); WDTCSR |= (1 << WDIE); + #endif switch (V2Command) { @@ -140,8 +146,10 @@ void V2Protocol_ProcessCommand(void) break; } + #if (ARCH == ARCH_AVR8) // TODO: FIXME /* Disable the timeout management watchdog timer */ wdt_disable(); + #endif Endpoint_WaitUntilReady(); Endpoint_SelectEndpoint(AVRISP_DATA_OUT_EPNUM); |