aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/scripts/test_ports/vcpkg-ci-libmodbus/project/main.c
blob: aaffb06b36ded4643ce4cd9e1cdb89ce2a643862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
#include <modbus.h>

int main()
{
    modbus_t *ctx = modbus_new_rtu("/dev/ttyUSB0", 115200, 'N', 8, 1);
    if (ctx == NULL) {
        fprintf(stderr, "Unable to create the libmodbus context\n");
        return -1;
    }
    return 0;
}