Hola estoy intentando hacer la implementación del modbus en c y no sé porque me dice que los métodos no reconocen las variables globales ni los prototipos de las funciones y no sé porque.
MBSlave.cpp
#include "MBSlave.h"
UCHAR mFrame[BUFFER_SIZE];
UINT mHoldingRegsSize;
UINT *mRegs;
UCHAR mBroadcastFlag;
UCHAR mSlaveID;
UCHAR mFunction;
UINT errorCount;
UINT T1_5; //inter character time out
UINT T3_5; //frame delay
Serial *MBPort;
// function definitions
void exceptionResponse(UCHAR exception);
UINT calculateCRC(UCHAR bufferSize);
void sendPacket(UCHAR bufferSize);
void
mBInit( Serial *SerialPort,
int baud,
UCHAR _slaveID,
UINT _holdingRegsSize,
UINT *_regs)
{
//implementación
}
metodos de las funciones.
MBSlave.h
#ifndef MBSlave_H
#define MBSlave_H
//definitions of types
typedef unsigned char UCHAR;
typedef unsigned int UINT;
#include "mbed.h"
#define BUFFER_SIZE 64
#define MBdebug 1
UINT mBPoll( void );
void mBInit(Serial *SerialPort,
int baud,
UCHAR _slaveID,
UINT _holdingRegsSize,
UINT *_regs)
#endif