(CYW43907) How to call own function when WICED printing is called

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HIUR_3769846
Level 3
Level 3
First like given Welcome!

Hi,

I would like to call our method to send printf data via wifi when the printf such as WPRINT_APP_INFO/ERROR/DEBUG is executed. Firstly, I tried to used wiced_log_init in reference to Logs ,a simple introduce in Wiced release . However, I cannot get have good result. This method is seemed not to support to switch WPRINT_APP_INFO to log output. Is there other solution?

BR, Hiroyuki

0 Likes
1 Solution

Hi, I resolve this issue. Thanks everyone for giving advice.

I show the fixed points.

・wwd_debug.h

From #define WPRINT_APP_INFO(args)   WPRINT_MACRO(args)

TO      #define WPRINT_APP_INFO(args) do {application_printf args;} while(0==1)

・my_app.c

int application_printf(const char *pcFormat, ...){

     //Some Task

}

BR,
Hiroyuki

View solution in original post

0 Likes
4 Replies