Skip to content
Snippets Groups Projects
Commit ca3f5280 authored by developer3's avatar developer3
Browse files

Implement and register call back for information

Minimal library version: 4.2

Use TWR_registerCB_Info()
parent f6e3921d
Branches
No related merge requests found
......@@ -72,6 +72,13 @@ int fCB_OK(c_string sn, u8 uid[], int uid_len, int control_info)
return 0;
}
int fCB_Info(c_string info)
{
printf("*** Information ***: %s\n", info);
return 0;
}
int fCB_Error(int err_id, const char *err_msg)
{
printf("ERROR happens: id= %d | msg= %s\n", err_id, err_msg);
......@@ -86,9 +93,13 @@ int main(void)
printf("Tester for TWR-comm library version: ");
puts(TWR_GetLibraryVersionStr());
//---
e = TWR_registerCB_Error((void *) fCB_Error);
printf("TWR_registerCB_Error(fCB_Error) : %s\n", TWR_Status2Str(e));
e = TWR_registerCB_Info((void *) fCB_Info);
printf("TWR_registerCB_Info(fCB_Info) : %s\n", TWR_Status2Str(e));
e = TWR_registerCB_OK((void *) fCB_OK);
printf("TWR_registerCB_OK(fCB_OK) : %s\n", TWR_Status2Str(e));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment