SAML21: Add missing support for GCLK8

This commit is contained in:
Gregory Nutt 2015-05-23 17:02:13 -06:00
parent d495834882
commit 8e71f90d84
2 changed files with 18 additions and 1 deletions

View File

@ -977,9 +977,9 @@ void up_earlyserialinit(void)
sam_disableallints(TTYS5_DEV.priv);
#endif
#ifdef HAVE_SERIAL_CONSOLE
/* Mark the serial console (if any) */
#ifdef HAVE_SERIAL_CONSOLE
CONSOLE_DEV.isconsole = true;
#endif
}

View File

@ -277,6 +277,23 @@ static const struct sam_gclkconfig_s g_gclkconfig[] =
.clksrc = (uint8_t)(BOARD_GCLK7_CLOCK_SOURCE >> GCLK_GENCTRL_SRC_SHIFT),
}
#endif
/* GCLK generator 8 */
#ifdef BOARD_GCLK8_ENABLE
,
{
.gclk = 8,
#ifdef BOARD_GCLK8_RUN_IN_STANDBY
.runstandby = true;
#endif
#ifdef BOARD_GCLK8_OUTPUT_ENABLE
.output = true;
#endif
.prescaler = BOARD_GCLK8_PRESCALER,
.clksrc = (uint8_t)(BOARD_GCLK8_CLOCK_SOURCE >> GCLK_GENCTRL_SRC_SHIFT),
}
#endif
};
#define NGCLKS_ENABLED (sizeof(g_gclkconfig) / sizeof(struct sam_gclkconfig_s))