Files
OpenCellular/chip/host/gpio.c
Vic Yang eff7a1910a Support multi-bit mask in STM32L's GPIO functions
The definition of GPIO interface allows passing in multi-bit mask, and
this is what's done by gpio_config_module(). Fix STM32L's function so
that it doesn't accidentally set incorrect GPIO register values.

BUG=chrome-os-partner:22605
TEST=On Kirby, do 'led r 0' and check the value of 0x40020800 is
0x01540000.
BRANCH=None

Change-Id: I9a1c8074aab7345485a590ecf138bf99d0742997
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/168739
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2013-09-11 19:45:38 +00:00

42 lines
794 B
C

/* Copyright (c) 2013 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.
*/
/* GPIO module for emulator */
#include "common.h"
#include "gpio.h"
test_mockable void gpio_pre_init(void)
{
/* Nothing */
}
test_mockable int gpio_get_level(enum gpio_signal signal)
{
return 0;
}
test_mockable void gpio_set_level(enum gpio_signal signal, int value)
{
/* Nothing */
}
test_mockable int gpio_enable_interrupt(enum gpio_signal signal)
{
return EC_SUCCESS;
}
test_mockable void gpio_set_flags_by_mask(uint32_t port, uint32_t mask,
uint32_t flags)
{
/* Nothing */
}
test_mockable void gpio_set_alternate_function(uint32_t port, uint32_t mask,
int func)
{
/* Nothing */
}