#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;
}

