Conflict between "uart.c" and "user_interface.h"

Stational
Posts: 42
Joined: Sat Jul 02, 2016 10:54 pm

Conflict between "uart.c" and "user_interface.h"

Postby Stational » Fri Dec 16, 2016 6:15 am

Hi,

if i import both "uart.c" and "user_interface.h" in my project i get this error messages:

In file included from sensor.c:12:0:
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/include/user_interface.h:92:6: error: conflicting types for 'system_os_task'
bool system_os_task(os_task_t task, uint8 prio, os_event_t *queue, uint8 qlen);
^
In file included from sensor.c:9:0:
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/include/uart.c:321:5: note: previous implicit declaration of 'system_os_task' was here
system_os_task(uart_recvTask, uart_recvTaskPrio, uart_recvTaskQueue, uart_recvTaskQueueLen); //demo with a task to process the uart data
^
In file included from sensor.c:12:0:
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/include/user_interface.h:93:6: error: conflicting types for 'system_os_post'
bool system_os_post(uint8 prio, os_signal_t sig, os_param_t par);
^
In file included from sensor.c:9:0:
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/include/uart.c:244:9: note: previous implicit declaration of 'system_os_post' was here
system_os_post(uart_recvTaskPrio, 0, 0);
...


But i need both files. I want to send status messages over uart and i also want to send GET requests via wifi (i need user_interface.h because some important structs and functions are defined there). This is how my import sequence looks like:

#include "include/osapi.h"
#include "include/ets_sys.h"
#include "include/gpio.h"
#include "include/os_type.h"
#include "include/eagle_soc.h"
#include "include/ip_addr.h"
#include "include/espconn.h"
#include "include/stdio.h"
#include "include/uart.c"
#include "include/user_interface.h"

ESP_Xutao
Posts: 134
Joined: Tue Sep 27, 2016 5:42 pm

Re: Conflict between "uart.c" and "user_interface.h"

Postby ESP_Xutao » Thu Dec 22, 2016 2:13 pm

Hi:
I copy uart.c in my IoT/user folder and compile is OK,which version you user?

Who is online

Users browsing this forum: MSN [Bot] and 8 guests