You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mxe/src/libserialport-test.c

24 lines
407 B

/*
* This file is part of MXE. See LICENSE.md for licensing information.
*/
#include <stdio.h>
#include <libserialport.h>
int main(int argc, char *argv[])
{
int i;
struct sp_port **ports;
(void)argc;
(void)argv;
sp_list_ports(&ports);
for (i = 0; ports[i]; i++)
printf("Found port: '%s'.\n", sp_get_port_name(ports[i]));
sp_free_port_list(ports);
return 0;
}