Search found 7 matches

by elektron314
Mon Nov 15, 2021 1:31 pm
Forum: ESP-IDF
Topic: va_list returns something wrong
Replies: 4
Views: 3168

Re: va_list returns something wrong

boarchuz wrote:
Mon Nov 15, 2021 12:39 pm
You can't forward the va_list to sprintf. Try vsprintf.
Thanks! It works, you are right!
by elektron314
Mon Nov 15, 2021 11:39 am
Forum: ESP-IDF
Topic: va_list returns something wrong
Replies: 4
Views: 3168

Re: va_list returns something wrong

Somebody help me.
  1. esp_log_set_vprintf(printf);
transforms arguments to int 12
usage:
  1. ESP_LOGE("TAG", "??? main -----------%d",999);
results in printing
??? main -----------12
by elektron314
Mon Nov 15, 2021 11:30 am
Forum: ESP-IDF
Topic: va_list returns something wrong
Replies: 4
Views: 3168

Re: va_list returns something wrong

UPDATE:
even this function being set as esp_log_set_vprintf(vprintf_like); always transform my args to int 12
  1. int vprintf_like(const char *format, va_list args)
  2. {
  3.     return printf(format, args);
  4. }
by elektron314
Mon Nov 15, 2021 8:25 am
Forum: ESP-IDF
Topic: va_list returns something wrong
Replies: 4
Views: 3168

va_list returns something wrong

Hi! I have very strange behaviour of my code. I don't undestand where is the problem. Here I have vprintf-like function by wich I substitute output of in ESP_LOGe in esp_log_set_vprintf(vprintf_like_t_sw_uart_write); This is implementation int vprintf_like_t_sw_uart_write(const char *format, va_list...
by elektron314
Mon Nov 15, 2021 7:38 am
Forum: General Discussion
Topic: Redirect printf and Console to custom function
Replies: 5
Views: 52034

Re: Redirect printf and Console to custom function

But does anybody know how to exactly redirect printf to my own function?
by elektron314
Thu Oct 28, 2021 5:29 am
Forum: General Discussion
Topic: Redirect printf and Console to custom function
Replies: 5
Views: 52034

Re: Redirect printf and Console to custom function

username wrote:
Thu Oct 28, 2021 2:27 am
Search the forum, this has been asked a few times in the past.
Already done. I have found different solutions but not redirecting to SW UART or my own custom function.
by elektron314
Wed Oct 27, 2021 5:18 pm
Forum: General Discussion
Topic: Redirect printf and Console to custom function
Replies: 5
Views: 52034

Redirect printf and Console to custom function

Can I redirect/reroute printf functions and also all console messages to my own written functions? What exactly I need is to route them to my own software uart that I have written by myself. Why? 3 HW UARTS are very busy already doing their job and we need one more SW UART for getting messages from ...