/* * Copyright (c) 2016 Jean-Paul Etienne * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __INC_BOARD_H #define __INC_BOARD_H #include #include /* 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 */