diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2016-04-20 14:49:56 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-04-25 16:49:02 -0700 |
commit | 40c02e3ff2477df1aca7657a92905816e5a13d0c (patch) | |
tree | 57f05231828259506bf8bfdd2c494e533715e01f /board/stm32l476g-eval/board.c | |
parent | cb0d8108e5a5b630ec05a8d21a824cb601246bf5 (diff) | |
download | chrome-ec-40c02e3ff2477df1aca7657a92905816e5a13d0c.tar.gz |
Bring up STM32L476G-Eval
This patch adds initial set of files to bring up STM32L476G-Eval board.
BUG=none
BRANCH=tot
TEST=Tested console. make buildall && make tests
Change-Id: I0c0f73f31e84099746fced4214c5ed7f45468cef
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/340100
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/stm32l476g-eval/board.c')
-rw-r--r-- | board/stm32l476g-eval/board.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/board/stm32l476g-eval/board.c b/board/stm32l476g-eval/board.c new file mode 100644 index 0000000000..37ff088090 --- /dev/null +++ b/board/stm32l476g-eval/board.c @@ -0,0 +1,20 @@ +/* Copyright 2016 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "common.h" +#include "gpio.h" +#include "hooks.h" +#include "registers.h" +#include "gpio_list.h" + +void tick_event(void) +{ + static int count; + + gpio_set_level(GPIO_LED_GREEN, (count & 0x03) == 0); + + count++; +} +DECLARE_HOOK(HOOK_TICK, tick_event, HOOK_PRIO_DEFAULT); |