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:
parent
572bf9439b
commit
94003362a4
3 changed files with 5 additions and 6 deletions
|
@ -10,6 +10,9 @@ void rbInit() {
|
|||
gpioSetDir(RB_PWR_GOOD, gpioDirection_Output);
|
||||
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
|
||||
gpioSetDir(RB_BTN0, gpioDirection_Input);
|
||||
|
|
|
@ -114,6 +114,8 @@
|
|||
|
||||
#define RB_EEPROM_ADDR 0xA0
|
||||
|
||||
#define USB_CONNECT 0,6
|
||||
|
||||
void rbInit(void);
|
||||
|
||||
// reinvoke_isp.c
|
||||
|
|
6
main.c
6
main.c
|
@ -17,17 +17,11 @@ int main(void) {
|
|||
// Configure cpu and mandatory peripherals
|
||||
systemInit();
|
||||
|
||||
//enable clocks to adc and watchdog
|
||||
pmuInit();
|
||||
|
||||
|
||||
// initialise basic badge functions
|
||||
rbInit();
|
||||
|
||||
lcdInit(); // display
|
||||
|
||||
adcInit();
|
||||
|
||||
lcdFill(0);
|
||||
lcdDisplay(0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue