Rename swtft -> gpanel.
This commit is contained in:
@@ -130,8 +130,8 @@ device picga0 at spi1 pin RA4 # chip select signal
|
|||||||
options "PICGA_BUS=SPI1CON" # TODO: delete this option
|
options "PICGA_BUS=SPI1CON" # TODO: delete this option
|
||||||
signal "PICGA_CS" pin RA4 # TODO: delete
|
signal "PICGA_CS" pin RA4 # TODO: delete
|
||||||
|
|
||||||
# ST7781 TFT display driver
|
# TFT display driver: ST7781
|
||||||
device swtft
|
device gpanel
|
||||||
signal "LCD_RST" pin RB10
|
signal "LCD_RST" pin RB10
|
||||||
signal "LCD_CS" pin RB0
|
signal "LCD_CS" pin RB0
|
||||||
signal "LCD_RD" pin RB2
|
signal "LCD_RD" pin RB2
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ pic32/sysctl.c standard
|
|||||||
#
|
#
|
||||||
pic32/adc.c optional adc
|
pic32/adc.c optional adc
|
||||||
pic32/glcd.c optional glcd
|
pic32/glcd.c optional glcd
|
||||||
|
pic32/gpanel.c optional gpanel
|
||||||
pic32/gpio.c optional gpio
|
pic32/gpio.c optional gpio
|
||||||
pic32/hx8357.c optional hxtft
|
pic32/hx8357.c optional hxtft
|
||||||
pic32/picga.c optional picga
|
pic32/picga.c optional picga
|
||||||
@@ -81,7 +82,6 @@ pic32/sdramp.c optional dr
|
|||||||
pic32/sdram.S optional dr
|
pic32/sdram.S optional dr
|
||||||
pic32/spirams.c optional sr
|
pic32/spirams.c optional sr
|
||||||
pic32/sramc.c optional rc
|
pic32/sramc.c optional rc
|
||||||
pic32/st7781.c optional swtft
|
|
||||||
pic32/skel.c optional skel
|
pic32/skel.c optional skel
|
||||||
pic32/spi.c optional spi
|
pic32/spi.c optional spi
|
||||||
pic32/spi_bus.c optional spi
|
pic32/spi_bus.c optional spi
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ST7781 TFT LCD driver for PIC32.
|
* Generic TFT LCD driver for PIC32.
|
||||||
|
* Supported chips: ST7781.
|
||||||
*
|
*
|
||||||
* Based on code provided by Smoke And Wires
|
* Based on code provided by Smoke And Wires
|
||||||
* https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code
|
* https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code
|
||||||
@@ -314,7 +315,7 @@ static int initDisplay()
|
|||||||
_chip_id = readDeviceId();
|
_chip_id = readDeviceId();
|
||||||
switch (_chip_id) {
|
switch (_chip_id) {
|
||||||
case 0x7783:
|
case 0x7783:
|
||||||
printf("swtft0: <Sitronix ST7781>\n");
|
printf("gpanel0: <Sitronix ST7781>\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -325,7 +326,7 @@ static int initDisplay()
|
|||||||
TRIS_SET(LCD_WR_PORT) = 1 << LCD_WR_PIN;
|
TRIS_SET(LCD_WR_PORT) = 1 << LCD_WR_PIN;
|
||||||
TRIS_SET(LCD_RD_PORT) = 1 << LCD_RD_PIN;
|
TRIS_SET(LCD_RD_PORT) = 1 << LCD_RD_PIN;
|
||||||
TRIS_SET(LCD_RST_PORT) = 1 << LCD_RST_PIN;
|
TRIS_SET(LCD_RST_PORT) = 1 << LCD_RST_PIN;
|
||||||
printf("swtft0: Unknown chip ID = 0x%x\n", _chip_id);
|
printf("gpanel0: Unknown chip ID = 0x%x\n", _chip_id);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -895,18 +896,17 @@ int gpanel_ioctl(dev_t dev, register u_int cmd, caddr_t addr, int flag)
|
|||||||
* Test to see if device is present.
|
* Test to see if device is present.
|
||||||
* Return true if found and initialized ok.
|
* Return true if found and initialized ok.
|
||||||
*/
|
*/
|
||||||
static int
|
static int probe(config)
|
||||||
swtftprobe(config)
|
|
||||||
struct conf_device *config;
|
struct conf_device *config;
|
||||||
{
|
{
|
||||||
if (initDisplay() < 0)
|
if (initDisplay() < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
printf("swtft0: display %ux%u\n", HEIGHT, WIDTH);
|
printf("gpanel0: display %ux%u\n", WIDTH, HEIGHT);
|
||||||
setAddrWindow(0, 0, WIDTH-1, HEIGHT-1);
|
setAddrWindow(0, 0, WIDTH-1, HEIGHT-1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct driver swtftdriver = {
|
struct driver gpaneldriver = {
|
||||||
"swtft", swtftprobe,
|
"gpanel", probe,
|
||||||
};
|
};
|
||||||
@@ -683,7 +683,7 @@ hxtftprobe(config)
|
|||||||
{
|
{
|
||||||
initDisplay();
|
initDisplay();
|
||||||
setRotation(1);
|
setRotation(1);
|
||||||
printf("hxtft0: display %ux%u\n", _height, _width);
|
printf("hxtft0: display %ux%u\n", _width, _height);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ device adc
|
|||||||
# PWM driver
|
# PWM driver
|
||||||
device pwm
|
device pwm
|
||||||
|
|
||||||
# ST7781 TFT display driver
|
# TFT display driver: ST7781
|
||||||
device swtft
|
device gpanel
|
||||||
signal "LCD_RST" pin RB10
|
signal "LCD_RST" pin RB10
|
||||||
signal "LCD_CS" pin RB0
|
signal "LCD_CS" pin RB0
|
||||||
signal "LCD_RD" pin RB2
|
signal "LCD_RD" pin RB2
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ PARAM += -DGPIO5_ENABLED
|
|||||||
PARAM += -DGPIO6_ENABLED
|
PARAM += -DGPIO6_ENABLED
|
||||||
PARAM += -DADC_ENABLED
|
PARAM += -DADC_ENABLED
|
||||||
PARAM += -DPWM_ENABLED
|
PARAM += -DPWM_ENABLED
|
||||||
PARAM += -DSWTFT_ENABLED
|
PARAM += -DGPANEL_ENABLED
|
||||||
PARAM += -DLCD_D7_PORT=TRISE -DLCD_D7_PIN=9
|
PARAM += -DLCD_D7_PORT=TRISE -DLCD_D7_PIN=9
|
||||||
PARAM += -DLCD_D6_PORT=TRISD -DLCD_D6_PIN=2
|
PARAM += -DLCD_D6_PORT=TRISD -DLCD_D6_PIN=2
|
||||||
PARAM += -DLCD_D5_PORT=TRISD -DLCD_D5_PIN=1
|
PARAM += -DLCD_D5_PORT=TRISD -DLCD_D5_PIN=1
|
||||||
@@ -79,7 +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 \
|
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 \
|
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 \
|
exception.o machdep.o mem.o signal.o swap.o sysctl.o adc.o \
|
||||||
gpio.o pwm.o sd.o st7781.o spi.o spi_bus.o uart.o
|
gpanel.o gpio.o pwm.o sd.o spi.o spi_bus.o uart.o
|
||||||
|
|
||||||
CFILES = $S/kernel/exec_aout.c $S/kernel/exec_conf.c $S/kernel/exec_elf.c \
|
CFILES = $S/kernel/exec_aout.c $S/kernel/exec_conf.c $S/kernel/exec_elf.c \
|
||||||
$S/kernel/exec_script.c $S/kernel/exec_subr.c \
|
$S/kernel/exec_script.c $S/kernel/exec_subr.c \
|
||||||
@@ -104,8 +104,8 @@ 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/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/devsw.c $S/pic32/exception.c $S/pic32/machdep.c \
|
||||||
$S/pic32/mem.c $S/pic32/signal.c $S/pic32/swap.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/sd.c $S/pic32/st7781.c $S/pic32/spi.c \
|
$S/pic32/gpio.c $S/pic32/pwm.c $S/pic32/sd.c $S/pic32/spi.c \
|
||||||
$S/pic32/spi_bus.c $S/pic32/uart.c swapunix.c
|
$S/pic32/spi_bus.c $S/pic32/uart.c swapunix.c
|
||||||
|
|
||||||
# load lines for config "xxx" will be emitted as:
|
# load lines for config "xxx" will be emitted as:
|
||||||
@@ -341,6 +341,9 @@ sysctl.o: $S/pic32/sysctl.c
|
|||||||
adc.o: $S/pic32/adc.c
|
adc.o: $S/pic32/adc.c
|
||||||
${COMPILE_C}
|
${COMPILE_C}
|
||||||
|
|
||||||
|
gpanel.o: $S/pic32/gpanel.c
|
||||||
|
${COMPILE_C}
|
||||||
|
|
||||||
gpio.o: $S/pic32/gpio.c
|
gpio.o: $S/pic32/gpio.c
|
||||||
${COMPILE_C}
|
${COMPILE_C}
|
||||||
|
|
||||||
@@ -350,9 +353,6 @@ pwm.o: $S/pic32/pwm.c
|
|||||||
sd.o: $S/pic32/sd.c
|
sd.o: $S/pic32/sd.c
|
||||||
${COMPILE_C}
|
${COMPILE_C}
|
||||||
|
|
||||||
st7781.o: $S/pic32/st7781.c
|
|
||||||
${COMPILE_C}
|
|
||||||
|
|
||||||
spi.o: $S/pic32/spi.c
|
spi.o: $S/pic32/spi.c
|
||||||
${COMPILE_C}
|
${COMPILE_C}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user