EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #651 background imageLoading...
Page #651 background image
Chapter 2. API Reference
PAR_PERMS_READ = 1 << BIT0
the characteristic of the device are readable
PAR_PERMS_WRITE = 1 << BIT1
the characteristic of the device are writable
PAR_PERMS_TRIGGER = 1 << BIT2
the characteristic of the device are triggerable
PAR_PERMS_READ_WRITE = PAR_PERMS_READ | PAR_PERMS_WRITE
the characteristic of the device are readable & writable
PAR_PERMS_READ_TRIGGER = PAR_PERMS_READ | PAR_PERMS_TRIGGER
the characteristic of the device are readable & triggerable
PAR_PERMS_WRITE_TRIGGER = PAR_PERMS_WRITE | PAR_PERMS_TRIGGER
the characteristic of the device are writable & triggerable
PAR_PERMS_READ_WRITE_TRIGGER = PAR_PERMS_READ_WRITE | PAR_PERMS_TRIGGER
the characteristic of the device are readable & writable & triggerable
Header File
• components/freemodbus/common/include/esp_modbus_slave.h
Functions
esp_err_t mbc_slave_init_tcp(void **handler)
Initialize Modbus Slave controller and stack for TCP port.
Return
• ESP_OK Success
• ESP_ERR_NO_MEM Parameter error
• ESP_ERR_NOT_SUPPORTED Port type not supported
• ESP_ERR_INVALID_STATE Initialization failure
Parameters
• [out] handler: handler(pointer) to master data structure
esp_err_t mbc_slave_init(mb_port_type_t port_type, void **handler)
Initialize Modbus Slave controller and stack for Serial port.
Return
• ESP_OK Success
• ESP_ERR_NO_MEM Parameter error
• ESP_ERR_NOT_SUPPORTED Port type not supported
• ESP_ERR_INVALID_STATE Initialization failure
Parameters
• [out] handler: handler(pointer) to master data structure
• [in] port_type: the type of port
void mbc_slave_init_iface(void *handler)
Initialize Modbus Slave controller interface handle.
Parameters
• [in] handler: - pointer to slave interface data structure
esp_err_t mbc_slave_destroy(void)
Destroy Modbus controller and stack.
Return
• ESP_OK Success
• ESP_ERR_INVALID_STATE Parameter error
esp_err_t mbc_slave_start(void)
Start Modbus communication stack.
Espressif Systems 640
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish