Skip to content

经过测试724ug可以直接使用,无需更改,感谢分享!如果我想实现esp32实现双卡或者多卡 要如何调整呢 #32

@aisshscd

Description

@aisshscd

是调整下面的文件么

我购买的是esp32c3

uart接口只有两路 uart0~uart1

如果我想接入连2个 724,可以共用一个uart1接口么?
如果不能共用同个uart1接口,是不是下面的 程序就要调整为

-- 使用UART 1接口与Air780E-1通信
-- ESP32 <--> Air780E-1
-- 02(UART1_TX) <--> 31(UART1_RXD)
-- 03(UART1_RX) <--> 30(UART1_TXD)

-- 使用UART 0接口与Air780E-2通信
-- ESP32 <--> Air780E-2
-- 08(UART0_TX) <--> 31(UART1_RXD)
-- 09(UART0_RX) <--> 30(UART1_TXD)

如果需要接入多卡 ,其他gpio口可以调用吗?

Image

local air780_helper = {}

local sys = require("sys")
local constants = require("constants")
local pdu_helper = require("pdu_helper")
local utils = require("utils")

local uart_timeout = 100

-- 使用UART 1接口与Air780E通信
-- ESP32 <--> Air780E
-- 02(UART1_TX) <--> 31(UART1_RXD)
-- 03(UART1_RX) <--> 30(UART1_TXD)
local uart_id = 1
local uart_setup_result = uart.setup(uart_id, 115200, 8, 1)
if uart_setup_result ~= 0 then
log.error("air780_helper", "UART初始化失败,返回值:"..uart_setup_result..",ESP32将重启")
sys.wait(1000)
rtos.reboot()
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions