离线
我不知道我要去哪裡哪裡,我把這段代碼保存為“ main.lua”,在Uart1或Uart2中我沒有任何答案。
僅在Uart0上進行Xboot調試
离线
我沒有做任何更改,我以為只是編譯和使用。
如何“解僱” Uart1?
离线
我相信我的Lichee Nano遇到麻煩了。
"uart-16550@0x01c25000": {
"clock-name": "link-uart0",
"reset": 84,
"txd-gpio": 129,
"txd-gpio-config": 5,
"rxd-gpio": 128,
"rxd-gpio-config": 5,
"baud-rates": 115200,
"data-bits": 8,
"parity-bits": 0,
"stop-bits": 1
},"uart-16550@0x01c25400": {
"clock-name": "link-uart1",
"reset": 85,
"txd-gpio": 3,
"txd-gpio-config": 5,
"rxd-gpio": 2,
"rxd-gpio-config": 5,
"baud-rates": 115200,
"data-bits": 8,
"parity-bits": 0,
"stop-bits": 1
},"uart-16550@0x01c25800": {
"clock-name": "link-uart2",
"reset": 86,
"txd-gpio": 135,
"txd-gpio-config": 3,
"rxd-gpio": 136,
"rxd-gpio-config": 3,
"baud-rates": 115200,
"data-bits": 8,
"parity-bits": 0,
"stop-bits": 1
},
一切都好
我嘗試了不同的組合 Lua:
-----------------------------------------
local uart1 = Uart.new("uart-16550.1", 115200, 8, 0, 1)
uart1.write("Hello World")
------------------------------------------
local uart1 = Uart.new("uart1", 115200, 8, 0, 1)
uart1.write("Hello World")
------------------------------------------
local uart1 = Uart.new("link-uart1", 115200, 8, 0, 1)
uart1.write("Hello World")
------------------------------------------
local uart1 = Uart.new("uart-16550@0x01c25400", 115200, 8, 0, 1)
uart1.write("Hello World")
E etc...
我想讓串行通訊(Uart)在 Lua no Xboot
离线