drivers/display: mb_display: Move gpio defines to driver

Since the mb_display driver is specific to the microbit we can move
the GPIO pin defines from board.h into the driver.  This lets us remove
one of the few remaining drivers that is including board.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2018-11-01 08:25:44 -05:00 committed by Maureen Helm
commit 95776d945c
2 changed files with 49 additions and 49 deletions

View file

@ -9,54 +9,6 @@
#include <soc.h> #include <soc.h>
/* Onboard LED Row 1 */
#define LED_ROW1_GPIO_PIN 13
#define LED_ROW1_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Row 2 */
#define LED_ROW2_GPIO_PIN 14
#define LED_ROW2_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Row 3 */
#define LED_ROW3_GPIO_PIN 15
#define LED_ROW3_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 1 */
#define LED_COL1_GPIO_PIN 4
#define LED_COL1_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 2 */
#define LED_COL2_GPIO_PIN 5
#define LED_COL2_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 3 */
#define LED_COL3_GPIO_PIN 6
#define LED_COL3_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 4 */
#define LED_COL4_GPIO_PIN 7
#define LED_COL4_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 5 */
#define LED_COL5_GPIO_PIN 8
#define LED_COL5_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 6 */
#define LED_COL6_GPIO_PIN 9
#define LED_COL6_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 7 */
#define LED_COL7_GPIO_PIN 10
#define LED_COL7_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 8 */
#define LED_COL8_GPIO_PIN 11
#define LED_COL8_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 9 */
#define LED_COL9_GPIO_PIN 12
#define LED_COL9_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* External edge connector pin mappings to nRF51 GPIO pin numbers. /* External edge connector pin mappings to nRF51 GPIO pin numbers.
* More information: * More information:
* https://www.microbit.co.uk/device/pins * https://www.microbit.co.uk/device/pins

View file

@ -13,7 +13,6 @@
#include <zephyr.h> #include <zephyr.h>
#include <init.h> #include <init.h>
#include <board.h>
#include <gpio.h> #include <gpio.h>
#include <device.h> #include <device.h>
#include <string.h> #include <string.h>
@ -25,6 +24,55 @@
#define MODE_MASK BIT_MASK(16) #define MODE_MASK BIT_MASK(16)
/* Onboard LED Row 1 */
#define LED_ROW1_GPIO_PIN 13
#define LED_ROW1_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Row 2 */
#define LED_ROW2_GPIO_PIN 14
#define LED_ROW2_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Row 3 */
#define LED_ROW3_GPIO_PIN 15
#define LED_ROW3_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 1 */
#define LED_COL1_GPIO_PIN 4
#define LED_COL1_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 2 */
#define LED_COL2_GPIO_PIN 5
#define LED_COL2_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 3 */
#define LED_COL3_GPIO_PIN 6
#define LED_COL3_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 4 */
#define LED_COL4_GPIO_PIN 7
#define LED_COL4_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 5 */
#define LED_COL5_GPIO_PIN 8
#define LED_COL5_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 6 */
#define LED_COL6_GPIO_PIN 9
#define LED_COL6_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 7 */
#define LED_COL7_GPIO_PIN 10
#define LED_COL7_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 8 */
#define LED_COL8_GPIO_PIN 11
#define LED_COL8_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
/* Onboard LED Column 9 */
#define LED_COL9_GPIO_PIN 12
#define LED_COL9_GPIO_PORT CONFIG_GPIO_P0_DEV_NAME
#define DISPLAY_ROWS 3 #define DISPLAY_ROWS 3
#define DISPLAY_COLS 9 #define DISPLAY_COLS 9