libeismultiplexer/doc/mainpage.txt
2023-06-30 16:14:14 +02:00

45 lines
1 KiB
Plaintext

/*! \mainpage libeismultiplexer manual
libeismultiplexer is a shared library that allows you to control EISmultiplexer devices
An API reference can be found here: \subpage API
## Example usage:
_______
@code
#include <stdio.h>
#include "eismultiplexer.h"
int main(int argc, char* argv[])
{
// Each connection to a device is required to have a corresponding eismultiplexer struct
struct eismultiplexer multiplexer;
// Connect to the first device found
int ret = eismultiplexer_connect(&multiplexer, 0);
if(ret != 0)
{
printf("Can not connect to EISmultiplexer device\n");
return 1;
}
// Connect channels A and C to the common output
ret = eismultiplexer_connect_channel(&multiplexer, CHANNEL_A | CHANNEL_C);
if(ret != 0)
{
printf("Failure to communicate with the device\n");
return 1;
}
// Disconnect from device
eismultiplexer_disconnect(&multiplexer);
return 0;
}
@endcode
//-----------------------------------------------------------
libeismultiplexer is licensed to you under the Apache License, Version 2.0
*/