216 Commits

Author SHA1 Message Date
Renz Christian Bagaporo b8781516c1 components: use new component registration api
* Original commit: espressif/esp-idf@9eccd7c082
2022-03-21 13:14:00 +01:00
chenjianqiang 0e98d546ec feat(uart): update uart driver for esp32s2beta
* Original commit: espressif/esp-idf@4cc962353c
2022-03-21 13:13:26 +01:00
suda-morris 365bddd919 build and link hello-world for esp32s2beta
* Original commit: espressif/esp-idf@84b2f9f14d
2022-03-21 13:13:26 +01:00
Konstantin Kondrashov 4b8c30f606 all: Using xxx_periph.h
Using xxx_periph.h in whole IDF instead of xxx_reg.h, xxx_struct.h, xxx_channel.h ... .

Cleaned up header files from unnecessary headers (releated to soc/... headers).


* Original commit: espressif/esp-idf@399d2d2605
2022-03-21 13:13:26 +01:00
Roland Dobai 786ade0c0d Rename Kconfig options (components/freemodbus)
* Original commit: espressif/esp-idf@976d2a4b7f
2022-03-21 13:13:26 +01:00
Renz Christian Bagaporo 3082ecdf6a components: update with build system changes
* Original commit: espressif/esp-idf@ffec9d4947
2022-03-21 13:13:26 +01:00
Alex Lisitsyn e039ae7acc freemodbus: Fix bug with incorrect coils read mask
Contains two different component folders per each implementation (serial_master and serial_slave) with concrete ports.
Added common public api for master and slave and common interface for master and slave implementation.
Add support of cmake system (added cmake files).
Added sdkconfig.defaults files for slave and master modbus examples.
Updated make file and KConfig for freemodbus component
Update according to review and fix doxygen warnings
Fix Doxyfile to pass documentation build
Update headers and change interface file names as per review comments
Merge  branch feature/freemodbus_move_rs485_mode_control
Update after review:
The stack modbus folder updated to support master and slave ports together and moved into freemodbus/modbus
Stack and port files updated to remove duplicated simbols
Make file, KConfig and CMakeLists.txt updated to compile master and slave stacks, common interface and concrete implementations of ports
Stack callback functions execute callbacks using interface pointer from concrete port implementation
User can instantiate any of concrete port using common API (only one concrete port at a time) and it does not require to select port by KConfig
Port pins and mode configuration moved into example files from port files to allow user select pins and port mode (customer request)
Changes tested using pymodbus, ModbusPoll and communication between two boards
Updated DoxyFile according to public include path
Fix maximum instance size for slave (merge from master of customer issue)
Fix critical section issue TW#28622 (change spin lock based critical section to semaphore)
Move serial port files into component port folder for master and slave accordingly
Fix example issue showed in the log when IO slave is not configured correctly
Fix conflicts while merging from origin/master
Fix errors handling in modbus controller interface + some final corrections according to review
Update maximum allowed number of slaves in the network segment
Fix bug with incorrect coils read mask

Closes https://github.com/espressif/esp-idf/issues/858


* Original commit: espressif/esp-idf@449d2a6367
2022-03-21 13:13:26 +01:00
aleks d9fae5d0ad freemodbus: fix incorrectly set coils read event
incorrect set of the MB_EVENT_COILS_WR event is changed while read coils in mbcontroller.c file
added read/write handling for appropriate registers in freemodbus.c example file

Closes https://github.com/espressif/esp-idf/issues/3289


* Original commit: espressif/esp-idf@eebbced5b6
2022-03-21 13:13:26 +01:00
aleks ce241e3ebd freemodbus: change critical sections to semaphore mutex
revert changes made in mbrtu.c, mbascii.c
change critical section type to semaphore mutex instead of spin lock

Closes: https://github.com/espressif/esp-idf/issues/3009


* Original commit: espressif/esp-idf@aaa1cb6eec
2022-03-21 13:13:26 +01:00
Konstantin Kondrashov a3fc6eb571 freemodbus: Fix remove critical_sections
Closes: https://github.com/espressif/esp-idf/issues/3009


* Original commit: espressif/esp-idf@1ef7d093e1
2022-03-21 13:13:26 +01:00
Roland Dobai 3e2a03d032 Correct Kconfigs according to the coding style
* Original commit: espressif/esp-idf@37126d3451
2022-03-21 13:13:26 +01:00
aleks 56838197f5 examples: change max register area size to maximum value
esp-idf/components/freemodbus/modbus_controller/modbus_controller.c: The MB_INST_MAX_SIZE is changed to max value=(65535*2);
Update support for coils read into freemodbus.c;

TW#28143
Closes https://github.com/espressif/esp-idf/issues/2884


* Original commit: espressif/esp-idf@e3a786f2cf
2022-03-21 13:13:26 +01:00
aleks 60286c82d3 examples: freemodbus port serial slave move uart mode settings into example
Update freemodbus component file esp-idf/components/freemodbus/port/portserial.c to remove UART mode settings;
Move UART mode settings into esp-idf/examples/protocols/modbus_slave/main/freemodbus.c
Move UART pin settings from Component config into example Kconfig.projbuild file
Move setup of UART port pins from freemodbus component into example file

TW#27721
Closes https://github.com/espressif/esp-idf/issues/2784#issuecomment-443600157


* Original commit: espressif/esp-idf@5379c941b8
2022-03-21 13:13:26 +01:00
Anton Maklakov 5f40771c1e modbus: Fix a typo in the docs
* Original commit: espressif/esp-idf@9dde91ce2b
2022-03-21 13:13:26 +01:00
Alex Lisitsyn a3ff5b55c9 examples: freemodbus port slave basic implementation
This example adds functionality to support basic communication in RS485 networks using Modbus protocol.
This example uses FreeModbus stack and regular UART driver API to communicate in RS485 half duplex mode.
Added initial support of modbus controller pure C api to access device parameters over Modbus transport.
Move freemodbus stack and port files into components folder
Move the modbus_controller interface into components idf folder
Source files updated after review.
Add modbus interface documentation docs/en/api-reference/protocols/modbus.rst
porttimer.c: fix bug with timer1 selected in the Kconfig
Add support of cmake system (added cmake files)

Closes https://github.com/espressif/esp-idf/issues/858


* Original commit: espressif/esp-idf@f0eb9985b9
2022-03-21 13:07:11 +01:00
Alex Lisitsyn eacef70af8 root commit 2021-11-11 09:15:06 +01:00