summaryrefslogtreecommitdiff
path: root/chip/nrf51/hwtimer.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@chromium.org>2014-11-25 14:52:29 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2014-12-31 00:01:06 +0000
commit362bc01a172d5d123f30e4dd51b539a404375e06 (patch)
tree33494f18451e7c7665b61762b36db1dcb8039b14 /chip/nrf51/hwtimer.c
parentf0fe0160a589ed0e0553df42741d605092050354 (diff)
downloadchrome-ec-362bc01a172d5d123f30e4dd51b539a404375e06.tar.gz
hadoken: Update I/O configuration.
Add support for alternate functions for nrf51. Add more register definitions for the nrf51. Use assertions for conditions that should never happen. Use BUILD_ASSERT to keep the sources in sync. Add three more GPIOs to hadoken. BQ27621_GPOUT - Configurable output from the fuel gauge. LID_PRESENT_L - The input for the hall sensor. IND_CHRG_DISABLE - The output to control inductive charging. BUG=chrome-os-partner:34477 BRANCH=none TEST=Used gpioget and magnets for LID_PRESENT_L Used fuel gauge console commands to trigger BQ27621_GPOUT Tested the assertions with gdb Signed-off-by: Myles Watson <mylesgw@chromium.org> Change-Id: I508f79ae45127104fa14f9f75fbf545f226387e4 Reviewed-on: https://chromium-review.googlesource.com/234286 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Myles Watson <mylesgw@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Myles Watson <mylesgw@chromium.org>
Diffstat (limited to 'chip/nrf51/hwtimer.c')
-rw-r--r--chip/nrf51/hwtimer.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/chip/nrf51/hwtimer.c b/chip/nrf51/hwtimer.c
index b4a1453b95..79e3cf8b88 100644
--- a/chip/nrf51/hwtimer.c
+++ b/chip/nrf51/hwtimer.c
@@ -169,26 +169,3 @@ int __hw_clock_source_init(uint32_t start_t)
return NRF51_PERID_TIMER0;
}
-
-/* FIXME: for demo only. remove me later */
-#include "gpio.h"
-#include "timer.h"
-void blink_led(void)
-{
- gpio_set_level(GPIO_LED0, 0);
- gpio_set_level(GPIO_LED1, 1);
- usleep(250 * 1000);
- gpio_set_level(GPIO_LED0, 1);
- gpio_set_level(GPIO_LED1, 0);
- usleep(250 * 1000);
- gpio_set_level(GPIO_LED0, 0);
-}
-static void test_hook(void)
-{
- static int secs;
- secs++;
- if (!(secs % 100))
- CPRINTS("%s()", __func__);
- blink_led();
-}
-DECLARE_HOOK(HOOK_SECOND, test_hook, HOOK_PRIO_DEFAULT);