C
Build the generated library standalone:
cmake -S ./c -B ./c/build
cmake --build ./c/build
or embed it in your CMake project:
add_subdirectory(onewili/c)
target_link_libraries(app PRIVATE onewili)
Open a device and send a first command (examples/serial_pc.c implements the transport for Windows and POSIX):
serial_pc* sp = serial_pc_open("COM5"); /* find it with list_devices */
ow_transport t = serial_pc_transport(sp);
ow_device dev;
ow_open(&dev, &t);
/* ow_status ow_gui_set_led_color(ow_device* dev, int32_t ledindex, int32_t red, int32_t green, int32_t blue, int32_t duration, ow_ow_led_manager_led_mode mode); */
ow_status r = ow_gui_set_led_color(&dev, /* args */);
ow_close(&dev);
serial_pc_close(sp);
Full command list: GUI Functions - or start at the API index.