Hello,
I am writing a Legato application that opens a USB port and communicates with another device connected to it.
I use Legato 16.07 on Ubuntu 16.04.
I want to use le_tty functions to do so (see tty api at tty API - Legato Docs).
My component source file looks like this:
include “legato.h”
include “interfaces.h”
COMPONENT_INIT
{
int fd;
LE_INFO("tty test started");
fd = le_tty_Open("/dev/ttyUSB0", O_RDWR | O_NOCTTY | O_NDELAY);
if (fd != -1) {
LE_INFO("ttyUSB0 port successfully opened");
}
}
When I compile the application that uses this component I get an error saying that the function le_tty_Open is not declared (implicit declaration).
I understand that I need to “inform” the system about le_tty.h interface file but I cannot find it in my $LEGATO_ROOT folder and its subdirectories. I do not find any le_tty.api either.
Is there a way to configure the component so that the le_tty.h is created and linked?
Or is there a problem with my host environment?
thanks
BR
Luigi