Parcourir la source

Wait for USB starting up to make debug print available

keymap_in_eeprom
tmk il y a 10 ans
Parent
révision
9d40be1990
2 fichiers modifiés avec 9 ajouts et 1 suppressions
  1. 1
    0
      common/action_util.h
  2. 8
    1
      protocol/lufa/lufa.c

+ 1
- 0
common/action_util.h Voir le fichier

@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ACTION_UTIL_H

#include <stdint.h>
#include "report.h"

extern report_keyboard_t *keyboard_report;


+ 8
- 1
protocol/lufa/lufa.c Voir le fichier

@@ -539,11 +539,18 @@ int main(void)
{
SetupHardware();
sei();

/* wait for USB startup & debug output */
while (USB_DeviceState != DEVICE_STATE_Configured) {
#if defined(INTERRUPT_CONTROL_ENDPOINT)
while (USB_DeviceState != DEVICE_STATE_Configured) ;
;
#else
USB_USBTask();
#endif
}
print("USB configured.\n");

/* init modules */
keyboard_init();
host_set_driver(&lufa_driver);
#ifdef SLEEP_LED_ENABLE