We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8561f4a commit bcc8fffCopy full SHA for bcc8fff
targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/us_ticker.c
@@ -50,18 +50,18 @@ void us_ticker_init(void)
50
{
51
/* Common for ticker/timer. */
52
uint32_t busClock;
53
- /* Structure to initialize PIT. */
54
- pit_config_t pitConfig;
55
56
us_ticker_setup_clock();
57
58
- PIT_GetDefaultConfig(&pitConfig);
59
- PIT_Init(PIT, &pitConfig);
60
-
61
busClock = us_ticker_get_clock();
62
63
/* Let the timer to count if re-init. */
64
if (!us_ticker_inited) {
+ /* Structure to initialize PIT. */
+ pit_config_t pitConfig;
+
+ PIT_GetDefaultConfig(&pitConfig);
+ PIT_Init(PIT, &pitConfig);
65
66
PIT_SetTimerPeriod(PIT, kPIT_Chnl_0, busClock / 1000000 - 1);
67
PIT_SetTimerPeriod(PIT, kPIT_Chnl_1, 0xFFFFFFFF);
0 commit comments