arduino / arduino/ArduinoCore-avr
How to add variant configurations after initializing the USB stack
- Dominant language
- C
- Stars
- 1.5k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi all,
We're making the 3-party boards add-on package for Arduino 1.6.4. Our board need to be re-configured must after the USB stack being initialized, or our configuration will be overrided by the USB stack. Just like this:
``` C++
int main(void)
{
init();
initVariant();
#if defined(USBCON)
USBDevice.attach();
#endif
#if defined(BLEND_MICRO_8MHZ)
// As the F_CPU = 8000000UL, the USB core make the PLLCSR = 0x02
// But the external xtal is 16000000Hz, so correct it here.
PLLCSR |= 0x10; // Need 16 MHz xtal
while (!(PLLCSR & (1<
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.