forked from espressif/esp-modbus
modbus slave expose registration of func handlers
This commit is contained in:
1 parent
5fa0b710d1
commit
087909c26e
6 files changed
+28
-5
No files matched your search
@@ -292,11 +292,23 @@ static esp_err_t master_init(void)
|
||||
return err;
|
||||
}
|
||||
|
||||
//#include "port.h"
|
||||
#include "mb_m.h"
|
||||
|
||||
eMBException functionHandler( UCHAR * pucFrame, USHORT * pusLength )
|
||||
{
|
||||
return MB_EX_GATEWAY_PATH_FAILED;
|
||||
}
|
||||
|
||||
extern eMBErrorCode eMBRegisterCB( UCHAR ucFunctionCode, pxMBFunctionHandler pxHandler );
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Initialization of device peripheral and objects
|
||||
ESP_ERROR_CHECK(master_init());
|
||||
vTaskDelay(10);
|
||||
|
||||
eMBRegisterCB(10, &functionHandler);
|
||||
|
||||
master_operation_func(NULL);
|
||||
}
|
||||
Reference in new issue
Block a user