set USB_CONNECT high on bootup to not confuse usb host.

Also remove adcInit and pmuInit from main.c because systemInit already calls them.
This commit is contained in:
Stefan `Sec` Zehl 2011-06-13 23:09:37 +02:00
parent 572bf9439b
commit 94003362a4
3 changed files with 5 additions and 6 deletions

View File

@ -10,6 +10,9 @@ void rbInit() {
gpioSetDir(RB_PWR_GOOD, gpioDirection_Output); gpioSetDir(RB_PWR_GOOD, gpioDirection_Output);
gpioSetValue (RB_PWR_GOOD, 0); gpioSetValue (RB_PWR_GOOD, 0);
// Disable USB Connect (we don't want USB by default)
gpioSetDir(USB_CONNECT, gpioDirection_Output);
gpioSetValue(USB_CONNECT, 1);
// prepare buttons // prepare buttons
gpioSetDir(RB_BTN0, gpioDirection_Input); gpioSetDir(RB_BTN0, gpioDirection_Input);

View File

@ -114,6 +114,8 @@
#define RB_EEPROM_ADDR 0xA0 #define RB_EEPROM_ADDR 0xA0
#define USB_CONNECT 0,6
void rbInit(void); void rbInit(void);
// reinvoke_isp.c // reinvoke_isp.c

6
main.c
View File

@ -17,17 +17,11 @@ int main(void) {
// Configure cpu and mandatory peripherals // Configure cpu and mandatory peripherals
systemInit(); systemInit();
//enable clocks to adc and watchdog
pmuInit();
// initialise basic badge functions // initialise basic badge functions
rbInit(); rbInit();
lcdInit(); // display lcdInit(); // display
adcInit();
lcdFill(0); lcdFill(0);
lcdDisplay(0); lcdDisplay(0);