mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
This is a straightforward conversion of existing tables into X-Macro style definitions for the GPIO alternate functions. This change in itself, is not particularly powerful, but having all GPIO settings in a single file makes a board easier to understand. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=none TEST=make buildall -j Followed by manual testing of interrupt on change and UART functionality on STM32F0 based discovery board. Change-Id: Ib7f1f014f4bd289d7c0ac3100470ba2dc71ca579 Reviewed-on: https://chromium-review.googlesource.com/207987 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Anton Staaf <robotboy@chromium.org> Commit-Queue: Anton Staaf <robotboy@chromium.org>
35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
/* -*- mode:c -*-
|
|
*
|
|
* Copyright (c) 2014 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(H_LED0, A, 0, GPIO_ODR_HIGH)
|
|
GPIO(H_LED1, A, 1, GPIO_ODR_HIGH)
|
|
GPIO(H_LED2, A, 2, GPIO_ODR_HIGH)
|
|
GPIO(H_LED3, A, 3, GPIO_ODR_HIGH)
|
|
GPIO(H_LED4, A, 4, GPIO_ODR_HIGH)
|
|
GPIO(H_LED5, A, 5, GPIO_ODR_HIGH)
|
|
GPIO(H_LED6, A, 6, GPIO_ODR_HIGH)
|
|
GPIO(L_LED0, I, 0, GPIO_ODR_HIGH)
|
|
GPIO(L_LED1, I, 1, GPIO_ODR_HIGH)
|
|
GPIO(L_LED2, I, 2, GPIO_ODR_HIGH)
|
|
GPIO(L_LED3, I, 3, GPIO_ODR_HIGH)
|
|
GPIO(L_LED4, I, 4, GPIO_ODR_HIGH)
|
|
GPIO(L_LED5, I, 5, GPIO_ODR_HIGH)
|
|
GPIO(L_LED6, I, 6, GPIO_ODR_HIGH)
|
|
GPIO(BUSY_LED, J, 0, GPIO_OUT_LOW)
|
|
GPIO(GOOD_LED, J, 1, GPIO_OUT_HIGH)
|
|
GPIO(FAIL_LED, J, 2, GPIO_OUT_LOW)
|
|
GPIO(SW1, E, 0, GPIO_INPUT)
|
|
GPIO(SW2, E, 1, GPIO_INPUT | GPIO_PULL_DOWN)
|
|
GPIO(SW3, E, 2, GPIO_INPUT | GPIO_PULL_DOWN)
|
|
GPIO(SW4, E, 3, GPIO_INPUT | GPIO_PULL_DOWN)
|
|
GPIO(START_SW, E, 4, GPIO_INT_FALLING, test_interrupt)
|
|
|
|
/* Unimplemented signals which we need to emulate for now */
|
|
UNIMPLEMENTED(ENTERING_RW)
|
|
|
|
ALTERNATE(B, 0x03, 1, MODULE_UART, GPIO_PULL_UP) /* UART0 */
|