#ifndef __MODBUSRTUSLAVE_H
#define __MODBUSRTUSLAVE_H

#include "modbusCRC.h"



void Modbus_RTU_Init(uchar *rxbuf,uchar *txbuf,void (*f)(uchar len));
void ModBusRtuSlave_Service(uchar framelen);
void Modbus_HoldRegMap(uint index,uint* databuf);
void Set_InputIO_Value(u16 index,bit value);
extern uchar ModBus_Addr;
extern u8 Modbus_OutputIO[3],Modubs_InputIO[38];
extern u16 Modbus_HoldReg[243],HoldReg_new_value;
extern bit HoldReg_Changed;
extern u8 HoldReg_BoardId, HoldReg_Board_stationId,HoldReg_Board_addr;
#endif
