ESP8266 Developer Zone The Official ESP8266 Forum 2016-12-22T14:13:19+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=3195 2016-12-22T14:13:19+08:00 2016-12-22T14:13:19+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3195&p=10957#p10957 <![CDATA[Re: Conflict between "uart.c" and "user_interface.h"]]> I copy uart.c in my IoT/user folder and compile is OK,which version you user?

Statistics: Posted by ESP_Xutao — Thu Dec 22, 2016 2:13 pm


]]>
2016-12-16T06:15:38+08:00 2016-12-16T06:15:38+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3195&p=10903#p10903 <![CDATA[Conflict between "uart.c" and "user_interface.h"]]>
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"

Statistics: Posted by Stational — Fri Dec 16, 2016 6:15 am


]]>