Skip to content

Commit

Permalink
Configure gpanel driver for Duinomite board.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergev committed Jan 31, 2018
1 parent a5d7f4e commit 9d8ad7c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sys/pic32/duinomite-emega/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PARAM += -DUSB_NUM_STRING_DESCRIPTORS=3
PARAM += -DUSB_MAX_EP_NUMBER=3
PARAM += -DCONS_MAJOR=UARTUSB_MAJOR
PARAM += -DBUS_DIV=1
PARAM += -DBUS_KHZ=40000
PARAM += -DBUS_KHZ=80000
PARAM += -DCPU_KHZ=80000
LDSCRIPT = "maximite/bootloader.ld"
#
Expand Down
17 changes: 17 additions & 0 deletions sys/pic32/duinomite/Config
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,20 @@ device adc

# PWM driver
device pwm

# TFT display driver with 8-bit parallel interface.
# Supported controllers: ST7781, ILI9341, NT35702
device gpanel
signal "LCD_RST" pin RB9 # arduino A4
signal "LCD_CS" pin RB7 # arduino A3
signal "LCD_RS" pin RB6 # arduino A2
signal "LCD_WR" pin RB4 # arduino A1
signal "LCD_RD" pin RB3 # arduino A0
signal "LCD_D2" pin RE2 # arduino D2
signal "LCD_D3" pin RE3 # arduino D3
signal "LCD_D4" pin RE4 # arduino D4
signal "LCD_D5" pin RE5 # arduino D5
signal "LCD_D6" pin RE6 # arduino D6
signal "LCD_D7" pin RE7 # arduino D7
signal "LCD_D0" pin RB11 # arduino D8
signal "LCD_D1" pin RB12 # arduino D9
31 changes: 30 additions & 1 deletion sys/pic32/duinomite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ PARAM += -DGPIO5_ENABLED
PARAM += -DGPIO6_ENABLED
PARAM += -DADC_ENABLED
PARAM += -DPWM_ENABLED
PARAM += -DGPANEL_ENABLED
PARAM += -DLCD_D1_PORT=TRISB -DLCD_D1_PIN=12
PARAM += -DLCD_D0_PORT=TRISB -DLCD_D0_PIN=11
PARAM += -DLCD_D7_PORT=TRISE -DLCD_D7_PIN=7
PARAM += -DLCD_D6_PORT=TRISE -DLCD_D6_PIN=6
PARAM += -DLCD_D5_PORT=TRISE -DLCD_D5_PIN=5
PARAM += -DLCD_D4_PORT=TRISE -DLCD_D4_PIN=4
PARAM += -DLCD_D3_PORT=TRISE -DLCD_D3_PIN=3
PARAM += -DLCD_D2_PORT=TRISE -DLCD_D2_PIN=2
PARAM += -DLCD_RD_PORT=TRISB -DLCD_RD_PIN=3
PARAM += -DLCD_WR_PORT=TRISB -DLCD_WR_PIN=4
PARAM += -DLCD_RS_PORT=TRISB -DLCD_RS_PIN=6
PARAM += -DLCD_CS_PORT=TRISB -DLCD_CS_PIN=7
PARAM += -DLCD_RST_PORT=TRISB -DLCD_RST_PIN=9
PARAM += -DSD0_ENA_PORT=TRISB -DSD0_ENA_PIN=13
PARAM += -DLED_DISK_PORT=TRISB -DLED_DISK_PIN=12
PARAM += -DLED_KERNEL_PORT=TRISB -DLED_KERNEL_PIN=15
Expand Down Expand Up @@ -65,6 +79,7 @@ OBJS = exec_aout.o exec_conf.o exec_elf.o exec_script.o exec_subr.o \
ufs_namei.o ufs_subr.o ufs_syscalls.o ufs_syscalls2.o \
vfs_vnops.o vm_sched.o vm_swap.o vm_swp.o clock.o cons.o devsw.o \
exception.o machdep.o mem.o signal.o swap.o sysctl.o adc.o \
gpanel.o gpanel-ili9341.o gpanel-nt35702.o gpanel-st7781.o \
gpio.o pwm.o sd.o spi.o spi_bus.o usb_device.o \
usb_function_cdc.o usb_uart.o

Expand All @@ -91,7 +106,9 @@ CFILES = $S/kernel/exec_aout.c $S/kernel/exec_conf.c $S/kernel/exec_elf.c \
$S/kernel/vm_swp.c $S/pic32/clock.c $S/pic32/cons.c \
$S/pic32/devsw.c $S/pic32/exception.c $S/pic32/machdep.c \
$S/pic32/mem.c $S/pic32/signal.c $S/pic32/swap.c \
$S/pic32/sysctl.c $S/pic32/adc.c $S/pic32/gpio.c $S/pic32/pwm.c \
$S/pic32/sysctl.c $S/pic32/adc.c $S/pic32/gpanel.c \
$S/pic32/gpanel-ili9341.c $S/pic32/gpanel-nt35702.c \
$S/pic32/gpanel-st7781.c $S/pic32/gpio.c $S/pic32/pwm.c \
$S/pic32/sd.c $S/pic32/spi.c $S/pic32/spi_bus.c \
$S/pic32/usb_device.c $S/pic32/usb_function_cdc.c \
$S/pic32/usb_uart.c swapunix.c
Expand Down Expand Up @@ -329,6 +346,18 @@ sysctl.o: $S/pic32/sysctl.c
adc.o: $S/pic32/adc.c
${COMPILE_C}

gpanel.o: $S/pic32/gpanel.c
${COMPILE_C}

gpanel-ili9341.o: $S/pic32/gpanel-ili9341.c
${COMPILE_C}

gpanel-nt35702.o: $S/pic32/gpanel-nt35702.c
${COMPILE_C}

gpanel-st7781.o: $S/pic32/gpanel-st7781.c
${COMPILE_C}

gpio.o: $S/pic32/gpio.c
${COMPILE_C}

Expand Down

0 comments on commit 9d8ad7c

Please sign in to comment.