Skip to content

ZhukovWang/ModbusSlave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModbusSlave

C/C++ CI

ModbusSlave is a modbus slave libary.

Build by standard C11 and can be used in Windows/Linux/embedded.

Had been tested in Windows (msys gcc 9.3) and Linux (Ubuntu 18.04 gcc 7.5).

Support ascii and rtu mode. Can be used in serial or tcp.

Support Function code

  • 0x01
  • 0x03
  • 0x05
  • 0x06
  • 0x0F
  • 0x10

Build

Use Cmake to build.

$ cmake .
$ make

The unit testing suits is Unity.

Usage

The libary main function is frame_entry() in src/frame.c.

Test the libary:

$ ModbusSlave

Unit test the libary:

$ ModbusSlave test

LICENSE

MIT