short delay
This commit is contained in:
parent
e752e17776
commit
b285a436f8
@ -1,4 +1,8 @@
|
|||||||
$Id: Changelog.txt,v 1.2 2006/10/02 17:08:41 rschaten Exp $
|
$Id: Changelog.txt,v 1.3 2007/01/02 21:03:54 rschaten Exp $
|
||||||
|
|
||||||
|
* Release
|
||||||
|
|
||||||
|
- short delay before initialization
|
||||||
|
|
||||||
* Release 061002
|
* Release 061002
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* \file main.c
|
* \file main.c
|
||||||
* \brief Firmware for the USB-LED-Fader.
|
* \brief Firmware for the USB-LED-Fader.
|
||||||
* \author Ronald Schaten & Thomas Stegemann
|
* \author Ronald Schaten & Thomas Stegemann
|
||||||
* \version $Id: main.c,v 1.2 2006/09/29 21:51:07 rschaten Exp $
|
* \version $Id: main.c,v 1.3 2007/01/02 21:04:47 rschaten Exp $
|
||||||
*
|
*
|
||||||
* License: See documentation.
|
* License: See documentation.
|
||||||
*/
|
*/
|
||||||
@ -10,6 +10,7 @@
|
|||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
#include <avr/interrupt.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
#include "oddebug.h"
|
#include "oddebug.h"
|
||||||
@ -259,6 +260,14 @@ int main(void) {
|
|||||||
}
|
}
|
||||||
DDRD = ~USBMASK; /* all outputs except USB data */
|
DDRD = ~USBMASK; /* all outputs except USB data */
|
||||||
TCCR0 = 3; /* set prescaler to 1/64 */
|
TCCR0 = 3; /* set prescaler to 1/64 */
|
||||||
|
|
||||||
|
for (i = 0; i < 10; i++) { /* wait one second to prevent strange
|
||||||
|
effects when the USB-bus isn't
|
||||||
|
initialized (e. g. when the host system
|
||||||
|
is on standby. */
|
||||||
|
_delay_ms(100);
|
||||||
|
}
|
||||||
|
|
||||||
usbInit();
|
usbInit();
|
||||||
sei();
|
sei();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user