Merge pull request #4 from jonathangjertsen/master

Support linking with C++ code
This commit is contained in:
Valerio De Benedetto 2022-05-11 12:20:14 +02:00 committed by GitHub
commit 452115ca89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,10 @@
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* nanoMODBUS errors. * nanoMODBUS errors.
* Values <= 0 are library errors, > 0 are modbus exceptions. * Values <= 0 are library errors, > 0 are modbus exceptions.
@ -375,5 +379,8 @@ nmbs_error nmbs_receive_raw_pdu_response(nmbs_t* nmbs, void* data_out, uint32_t
const char* nmbs_strerror(nmbs_error error); const char* nmbs_strerror(nmbs_error error);
#endif #endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif //NANOMODBUS_H #endif //NANOMODBUS_H