本来打算使用linux的,可惜linux太难了(需要系统学习一下)
后来看见xboot不错,因为配置文件是用json的方式(老java程序员狂喜)
----------------
下线xboot
找到mach-f1c100s
在driver中没有发现st7789的驱动
但是在mach-h3/driver中有[fb-st7789v.c]便复制到mach-f1c100s/driver目录下
在[fb-st7789v.c]中发现有配置样例如下:
/*
* LCD - Sitronix ST7789V Lcd Driver
*
* Example:
* "fb-st7789v@0": {
* "spi-bus": "spi-h3.1",
* "chip-select": 0,
* "type": 0,
* "mode": 0,
* "speed": 50000000,
* "reset-gpio": 9,
* "reset-gpio-config": 1,
* "cd-gpio": 16,
* "cd-gpio-config": 1,
* "width": 240,
* "height": 320,
* "physical-width": 30,
* "physical-height": 40,
* "backlight": null
* }
*/
我照着改成了下面这样
"fb-st7789v@0": {
"spi-bus": "spi-f1c100s.1",
"chip-select": 0,
"type": 0,
"mode": 0,
"speed": 50000000,
"reset-gpio": 134,
"reset-gpio-config": 1,
"cd-gpio": 138,
"cd-gpio-config": 1,
"width": 240,
"height": 320,
"physical-width": 30,
"physical-height": 40,
"backlight": null
},
下面是仿照spi0弄的spi1的接线
PC0(sclk64) - PA2(sclk2)
PC1(cs65) - PA0(cs0)
PC2(miso66) - PA3(miso3)
PC3(mosi67) - PA1(mosi1)
我把第二个spi也改了下
"spi-f1c100s@0x01c06000": {
"clock-name": "link-spi1",
"reset": 21,
"sclk-gpio": 2,
"sclk-gpio-config": 4,
"mosi-gpio": 1,
"mosi-gpio-config": 4,
"miso-gpio": 3,
"miso-gpio-config": 4,
"cs-gpio": 0,
"cs-gpio-config": 4
},
然后屏幕啥也没有
就不知道咋搞了
离线