成功导入freemodbus模块
This commit is contained in:
parent
bfd67f8f00
commit
753b9760f0
@ -44,10 +44,17 @@ dependencies:
|
|||||||
registry_url: https://components.espressif.com/
|
registry_url: https://components.espressif.com/
|
||||||
type: service
|
type: service
|
||||||
version: 8.4.0
|
version: 8.4.0
|
||||||
|
mb_example_common:
|
||||||
|
dependencies: []
|
||||||
|
source:
|
||||||
|
path: C:\Espressif\frameworks\esp-idf-v5.3.1\examples\protocols\modbus\mb_example_common
|
||||||
|
type: local
|
||||||
|
version: '*'
|
||||||
direct_dependencies:
|
direct_dependencies:
|
||||||
- espressif/esp-modbus
|
- espressif/esp-modbus
|
||||||
- espressif/esp_lcd_touch_ft5x06
|
- espressif/esp_lcd_touch_ft5x06
|
||||||
- lvgl/lvgl
|
- lvgl/lvgl
|
||||||
manifest_hash: 9636c39d052f12d7135da1a3705d24d168ae364c70341a0025805a1ae0dc5019
|
- mb_example_common
|
||||||
|
manifest_hash: 7bd740372f78c1d25e695e2a8ee35357efb49480f45dbadc74e6e9ffc63cb2ee
|
||||||
target: esp32s3
|
target: esp32s3
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
|
|||||||
7
main/FreeBus.h
Normal file
7
main/FreeBus.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include "modbus_params.h" // for modbus parameters structures
|
||||||
|
#include "mbcontroller.h"
|
||||||
|
|
||||||
|
#define MB_PORT_NUM (CONFIG_MB_UART_PORT_NUM) // Number of UART port used for Modbus connection
|
||||||
|
#define MB_DEV_SPEED (CONFIG_MB_UART_BAUD_RATE) // The communication speed of the UART
|
||||||
|
|
||||||
|
|
||||||
@ -18,6 +18,9 @@
|
|||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
#include "lvgl.h"
|
#include "lvgl.h"
|
||||||
|
|
||||||
|
/*导入Modbus控制头文件*/
|
||||||
|
#include "FreeBus.h"
|
||||||
|
|
||||||
//新增触摸屏驱动头文件
|
//新增触摸屏驱动头文件
|
||||||
#include "driver/i2c.h"
|
#include "driver/i2c.h"
|
||||||
#include "esp_lcd_touch_ft5x06.h"
|
#include "esp_lcd_touch_ft5x06.h"
|
||||||
|
|||||||
@ -2,3 +2,5 @@ dependencies:
|
|||||||
lvgl/lvgl: ~8.4.0
|
lvgl/lvgl: ~8.4.0
|
||||||
esp_lcd_touch_ft5x06: ^1.0
|
esp_lcd_touch_ft5x06: ^1.0
|
||||||
espressif/esp-modbus: ^1.0.13
|
espressif/esp-modbus: ^1.0.13
|
||||||
|
mb_example_common:
|
||||||
|
path: ${IDF_PATH}/examples/protocols/modbus/mb_example_common
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user