forked from test34/can_wizard
rename xvprintf to vxprintf
This commit is contained in:
parent
27c4f26f8f
commit
b3729cff92
2 changed files with 4 additions and 4 deletions
|
@ -9,12 +9,12 @@ RingbufHandle_t can_messages;
|
|||
|
||||
void init_tx_ringbuf() {
|
||||
can_messages = xRingbufferCreate(1028, RINGBUF_TYPE_NOSPLIT);
|
||||
esp_log_set_vprintf(&xvprintf);
|
||||
esp_log_set_vprintf(&vxprintf);
|
||||
}
|
||||
|
||||
// This function will be called by the ESP log library every time ESP_LOG needs to be performed.
|
||||
// @important Do NOT use the ESP_LOG* macro's in this function ELSE recursive loop and stack overflow! So use printf() instead for debug messages.
|
||||
int xvprintf(const char *fmt, va_list args) {
|
||||
int vxprintf(const char *fmt, va_list args) {
|
||||
char msg_to_send[200];
|
||||
size_t str_len;
|
||||
str_len = vsnprintf(msg_to_send, 199, fmt, args);
|
||||
|
@ -25,5 +25,5 @@ int xvprintf(const char *fmt, va_list args) {
|
|||
int xprintf(const char *fmt, ...) {
|
||||
va_list(args);
|
||||
va_start(args, fmt);
|
||||
return xvprintf(fmt, args);
|
||||
return vxprintf(fmt, args);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
extern RingbufHandle_t can_messages;
|
||||
|
||||
void init_tx_ringbuf();
|
||||
int xvprintf(const char *fmt, va_list args);
|
||||
int vxprintf(const char *fmt, va_list args);
|
||||
int xprintf(const char *fmt, ...);
|
||||
|
||||
// functions
|
||||
|
|
Loading…
Reference in a new issue