File tree 2 files changed +7
-22
lines changed
2 files changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -363,28 +363,6 @@ void power_down(void) {
363
363
SREG = imode ;
364
364
}
365
365
366
- #define wdt_interrupt (value ) \
367
- __asm__ __volatile__ ( \
368
- "in __tmp_reg__,__SREG__" "\n\t" \
369
- "cli" "\n\t" \
370
- "wdr" "\n\t" \
371
- "sts %0,%1" "\n\t" \
372
- "out __SREG__,__tmp_reg__" "\n\t" \
373
- "sts %0,%2" "\n\t" \
374
- : /* no outputs */ \
375
- : "M " (_SFR_MEM_ADDR(_WD_CONTROL_REG)), \
376
- "r" (_BV(_WD_CHANGE_BIT) | _BV(WDIE)), \
377
- "r" ((uint8_t) ((value & 0x08 ? _WD_PS3_MASK : 0x00) | \
378
- _BV(WDIE) | (value & 0x07)) ) \
379
- : "r0" \
380
- )
381
-
382
- ISR (WDT_vect ) {
383
- wdt_disable ();
384
- power_down ();
385
- wdt_interrupt (WDTO_8S );
386
- }
387
-
388
366
static void usb_work (void ) {
389
367
HID_Device_MillisecondElapsed (& kbd_iface );
390
368
HID_Device_USBTask (& kbd_iface );
Original file line number Diff line number Diff line change @@ -264,6 +264,7 @@ static t16_mode_t timer3_mode_value = 0;
264
264
static timer_callback timer3_capture_callback_ = NULL ;
265
265
static timer_callback timer3_compare_a_callback_ = NULL ;
266
266
static timer_callback timer3_compare_b_callback_ = NULL ;
267
+ static timer_callback timer3_compare_c_callback_ = NULL ;
267
268
static timer_callback timer3_overflow_callback_ = NULL ;
268
269
269
270
/* Timer 3 Capture event */
@@ -285,6 +286,12 @@ ISR( TIMER3_COMPB_vect )
285
286
if ( timer3_compare_b_callback_ ) timer3_compare_b_callback_ ();
286
287
}
287
288
289
+ /* Timer 3 Compare match B */
290
+ ISR ( TIMER3_COMPC_vect )
291
+ {
292
+ if ( timer3_compare_c_callback_ ) timer3_compare_c_callback_ ();
293
+ }
294
+
288
295
/* Timer 3 Overflow */
289
296
ISR ( TIMER3_OVF_vect )
290
297
{
You can’t perform that action at this time.
0 commit comments