You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

17 lines
302 B
C

#include "modbus-master.h"
#include <stdint.h>
#define FIRMWARE_VERSION 120
uint16_t gtf_firmware_version(uint8_t address){
uint16_t val = 0;
readReg(address, FIRMWARE_VERSION, 1);
int8_t res = wait_receive(1, &val, 250);
if(!res)
return val;
else
return res;
}