2
0
forked from Ivasoft/DSView

Code refactoring 6

This commit is contained in:
dreamsourcelabTAI
2022-08-01 10:40:29 +08:00
parent 092abdcc63
commit 2433d33b5b
9 changed files with 197 additions and 79 deletions

View File

@@ -1,8 +1,34 @@
#include <libsigrok.h>
#include "../log.h"
#include <stdio.h>
int main2()
#undef LOG_PREFIX
#define LOG_PREFIX "test_main: "
int main()
{
int ret = 0;
if ((ret = sr_lib_init()) != SR_OK)
{
return 0;
}
sr_info("%s", "start.");
char c = 0;
while (1)
{
c = getchar();
if (c == 'x'){
sr_lib_exit();
sr_info("%s", "exit.");
break;
}
}
return 0;
}