forked from espressif/esp-modbus
fix cpp compilation issues
This commit is contained in:
1 parent
5c0d66a8c0
commit
a2a16545fc
2 files changed
+12
-17
No files matched your search
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "driver/uart.h" // for UART types
|
||||
#include "sdkconfig.h"
|
||||
@@ -13,20 +14,12 @@
|
||||
#include "mb_endianness_utils.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "port_common.h"
|
||||
|
||||
#if __has_include("esp_check.h")
|
||||
#include "esp_check.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "mb_port_types.h"
|
||||
|
||||
#define MB_RETURN_ON_FALSE(a, err_code, tag, format, ...) ESP_RETURN_ON_FALSE(a, err_code, tag, format __VA_OPT__(,) __VA_ARGS__)
|
||||
|
||||
#else
|
||||
@@ -42,6 +35,10 @@ extern "C" {
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MB_SLAVE_ADDR_PLACEHOLDER (0xFF)
|
||||
#define MB_CONTROLLER_STACK_SIZE (CONFIG_FMB_CONTROLLER_STACK_SIZE) // Stack size for Modbus controller
|
||||
#define MB_CONTROLLER_PRIORITY (CONFIG_FMB_PORT_TASK_PRIO - 1) // priority of MB controller task
|
||||
|
||||
Reference in new issue
Block a user