zephyr/boards/riscv32/zedboard_pulpino/board.h
David B. Kinder ac74d8b652 license: Replace Apache boilerplate with SPDX tag
Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.

Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.

Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file.  Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.

Jira: ZEP-1457

Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-01-19 03:50:58 +00:00

63 lines
1.7 KiB
C

/*
* Copyright (c) 2016 Jean-Paul Etienne <fractalclone@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __INC_BOARD_H
#define __INC_BOARD_H
#include <soc.h>
#include <gpio.h>
/* LEDS configuration */
#define LED0_GPIO_PORT "gpio0"
#define LED1_GPIO_PORT "gpio0"
#define LED2_GPIO_PORT "gpio0"
#define LED3_GPIO_PORT "gpio0"
#define LED4_GPIO_PORT "gpio0"
#define LED5_GPIO_PORT "gpio0"
#define LED6_GPIO_PORT "gpio0"
#define LED7_GPIO_PORT "gpio0"
#define LED0_GPIO_PIN 8
#define LED1_GPIO_PIN 9
#define LED2_GPIO_PIN 10
#define LED3_GPIO_PIN 11
#define LED4_GPIO_PIN 12
#define LED5_GPIO_PIN 13
#define LED6_GPIO_PIN 14
#define LED7_GPIO_PIN 15
/* Push buttons configuration */
#define SW0_GPIO_NAME "gpio0"
#define SW1_GPIO_NAME "gpio0"
#define SW2_GPIO_NAME "gpio0"
#define SW3_GPIO_NAME "gpio0"
#define SW4_GPIO_NAME "gpio0"
#define SW0_GPIO_PIN 16
#define SW1_GPIO_PIN 17
#define SW2_GPIO_PIN 18
#define SW3_GPIO_PIN 19
#define SW4_GPIO_PIN 20
/*
* GPIO PULL-UP config does not exist in pulpino
* set all to 1 for buttons to compile against apps.
*/
#define SW0_GPIO_PULL_UP 1
#define SW1_GPIO_PULL_UP 1
#define SW2_GPIO_PULL_UP 1
#define SW3_GPIO_PULL_UP 1
#define SW4_GPIO_PULL_UP 1
/* Interrupt config for push buttons */
#define SW0_GPIO_INT_CONF (GPIO_INT_EDGE | GPIO_INT_ACTIVE_HIGH)
#define SW1_GPIO_INT_CONF SW0_GPIO_INT_CONF
#define SW2_GPIO_INT_CONF SW0_GPIO_INT_CONF
#define SW3_GPIO_INT_CONF SW0_GPIO_INT_CONF
#define SW4_GPIO_INT_CONF SW0_GPIO_INT_CONF
#endif /* __INC_BOARD_H */