syntax cleaning

This commit is contained in:
iceman1001 2017-10-17 22:05:52 +02:00
parent d46955e309
commit dc7473135c
2 changed files with 3 additions and 10 deletions

View file

@ -1134,9 +1134,6 @@ void __attribute__((noreturn)) AppMain(void) {
LEDsoff(); LEDsoff();
// Init USB device
usb_enable();
// The FPGA gets its clock from us from PCK0 output, so set that up. // The FPGA gets its clock from us from PCK0 output, so set that up.
AT91C_BASE_PIOA->PIO_BSR = GPIO_PCK0; AT91C_BASE_PIOA->PIO_BSR = GPIO_PCK0;
AT91C_BASE_PIOA->PIO_PDR = GPIO_PCK0; AT91C_BASE_PIOA->PIO_PDR = GPIO_PCK0;
@ -1155,6 +1152,9 @@ void __attribute__((noreturn)) AppMain(void) {
FpgaDownloadAndGo(FPGA_BITSTREAM_HF); FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
StartTickCount(); StartTickCount();
// Init USB device
usb_enable();
#ifdef WITH_LCD #ifdef WITH_LCD
LCDInit(); LCDInit();

View file

@ -191,7 +191,6 @@ static void flash_mode(int externally_entered) {
end_addr = 0; end_addr = 0;
bootrom_unlocked = 0; bootrom_unlocked = 0;
byte_t rx[sizeof(UsbCommand)]; byte_t rx[sizeof(UsbCommand)];
//size_t rx_len;
usb_enable(); usb_enable();
//for (volatile size_t i=0; i<0x100000; i++) {}; //for (volatile size_t i=0; i<0x100000; i++) {};
@ -203,12 +202,6 @@ static void flash_mode(int externally_entered) {
if ( cmd_receive( (UsbCommand*)rx ) ) if ( cmd_receive( (UsbCommand*)rx ) )
UsbPacketReceived(rx, sizeof(UsbCommand) ); UsbPacketReceived(rx, sizeof(UsbCommand) );
// if ( usb_poll_validate_length()) {
// rx_len = usb_read(rx, sizeof(UsbCommand));
// if (rx_len)
// UsbPacketReceived(rx, rx_len);
//}
if (!externally_entered && !BUTTON_PRESS()) { if (!externally_entered && !BUTTON_PRESS()) {
/* Perform a reset to leave flash mode */ /* Perform a reset to leave flash mode */
usb_disable(); usb_disable();