Commit e253d6b9 authored by Matthieu Cattin's avatar Matthieu Cattin

sw: Change blinky example for watch pcb v1.

parent 31416f18
......@@ -26,7 +26,7 @@ LST_DIR = lst
# Change path to the tools according to your system configuration
# DO NOT add trailing whitespace chars, they do matter !
WINDOWSCS ?= GNU Tools ARM Embedded\4.7 2012q4
LINUXCS ?= /opt/gcc-arm-none-eabi-4_8-2014q1
LINUXCS ?= /opt/gcc-arm-none-eabi-4_8-2014q2
RMDIRS := rm -rf
RMFILES := rm -rf
......
......@@ -73,20 +73,18 @@ int main(void)
/* Setup SysTick Timer for 1 msec interrupts */
if (SysTick_Config(CMU_ClockFreqGet(cmuClock_CORE) / 1000)) while (1);
// Enable clocks and configure pins
CMU_ClockEnable(cmuClock_HFPER, true);
CMU_ClockEnable(cmuClock_GPIO, true);
// Enable clocks and configure pins
for (i = 1; i < 5; ++i) {
GPIO_PinModeSet(gpioPortD, i, gpioModePushPull, 0);
}
GPIO_PinModeSet(gpioPortE, 11, gpioModePushPull, 0);
GPIO_PinModeSet(gpioPortE, 12, gpioModePushPull, 0);
/* Infinite blink loop */
while (1) {
for (i = 1; i < 5; ++i) {
GPIO_PinOutToggle(gpioPortD, i);
GPIO_PinOutToggle(gpioPortE, 11);
GPIO_PinOutToggle(gpioPortE, 12);
Delay(200);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment