#ifdef WIN32
#include <windows.h>
#define SER_PORT "\\\\.\\COM3" //COM43
#else
#define SER_PORT "/dev/ttyUSB0"
#endif
#define SAVE_CONFIG "./learned.txt"
#define LEARN_TIME_S 1
#include <stdio.h>
int main(int argc, const char* argv[])
{
(void)argc;
(void)argv;
printf("Opening Connection to USB300 \n");
{
printf("Failed to open USB300\n");
return 0;
}
printf("EnOcean-Link Gateway LearnMode\n");
uint16_t recv;
while(learnTime>time)
{
{
printf(
"Duplicated Teach IN receveid from %08", myGateway.
device->
ID);
}
{
{
printf(
"Device %08X Learned-In EEP: %02X-%02X-%02X\n", myGateway.
device->
ID, profile->
rorg, profile->
func, profile->
type );
{
}
}
}
}
printf("Storing the Config\n");
myStore.
Save(SAVE_CONFIG);
printf("EnOcean-Link Gateway FilterdMode\n");
while (1)
{
{
}
{
printf(
"Device %08X\n", myGateway.
device->
ID);
float f;
uint8_t t;
{
{
}
{
}
}
}
}
return 0;
}