Add user callback function to the Bluetooth host demo to filter out connections from...
[pub/USBasp.git] / Projects / Benito / Benito.c
index 10e2e8f..86da27a 100644 (file)
@@ -145,9 +145,6 @@ void SetupHardware(void)
        MCUSR &= ~(1 << WDRF);\r
        wdt_disable();\r
 \r
-       /* Disable clock division */\r
-       clock_prescale_set(clock_div_1);\r
-\r
        /* Hardware Initialization */\r
        Serial_Init(9600, false);\r
        LEDs_Init();\r
@@ -250,10 +247,10 @@ ISR(USART1_RX_vect, ISR_BLOCK)
  */\r
 void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)\r
 {\r
-       bool CurrentDTRState = CDCInterfaceInfo->State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR);\r
+       bool CurrentDTRState = (CDCInterfaceInfo->State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR);\r
 \r
-       /* Check if the DTR line has been de-asserted - if so, start the target AVR's reset pulse */\r
-       if (PreviousDTRState && !(CurrentDTRState))\r
+       /* Check if the DTR line has been asserted - if so, start the target AVR's reset pulse */\r
+       if (!(PreviousDTRState) && CurrentDTRState)\r
        {\r
                LEDs_SetAllLEDs(LEDMASK_BUSY);\r
        \r