diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-04-05 10:14:51 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-04-05 10:14:51 +0000 |
commit | 2381a7019072f8f6983f323a2bc0913ac115aed3 (patch) | |
tree | 86418ad601fa8bd20549736d93ea4b4fc46b537d /demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB | |
parent | 60d63e9970553058597fd78941a7fa0ecb4f374b (diff) | |
download | ChibiOS-2381a7019072f8f6983f323a2bc0913ac115aed3.tar.gz ChibiOS-2381a7019072f8f6983f323a2bc0913ac115aed3.tar.bz2 ChibiOS-2381a7019072f8f6983f323a2bc0913ac115aed3.zip |
Board files regenerated with the updated tool. Fixed some errors in demos.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7854 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB')
3 files changed, 5 insertions, 8 deletions
diff --git a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c index 0e38e87a1..fd5b942d1 100644 --- a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c +++ b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/main.c @@ -591,7 +591,7 @@ static void RemoveHandler(eventid_t id) { * Green LED blinker thread, times are in milliseconds. */ static THD_WORKING_AREA(waThread1, 128); -static msg_t Thread1(void *arg) { +static THD_FUNCTION(Thread1, arg) { (void)arg; chRegSetThreadName("blinker"); @@ -599,8 +599,6 @@ static msg_t Thread1(void *arg) { palTogglePad(GPIOC, GPIOC_LED); chThdSleepMilliseconds(fs_ready ? 125 : 500); } - - return MSG_OK; /* warning suppressor */ } /* diff --git a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c index 1c0ea7c03..46aac872f 100644 --- a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c +++ b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.c @@ -87,7 +87,7 @@ THD_WORKING_AREA(wa_http_server, WEB_THREAD_STACK_SIZE); /** * HTTP server thread. */ -msg_t http_server(void *p) { +THD_FUNCTION(http_server, p) { struct netconn *conn, *newconn; err_t err; @@ -96,7 +96,7 @@ msg_t http_server(void *p) { /* Create a new TCP connection handle */ conn = netconn_new(NETCONN_TCP); - LWIP_ERROR("http_server: invalid conn", (conn != NULL), return MSG_RESET;); + LWIP_ERROR("http_server: invalid conn", (conn != NULL), chThdExit(MSG_RESET);); /* Bind to port 80 (HTTP) with default IP address */ netconn_bind(conn, NULL, WEB_THREAD_PORT); @@ -107,14 +107,13 @@ msg_t http_server(void *p) { /* Goes to the final priority after initialization.*/ chThdSetPriority(WEB_THREAD_PRIORITY); - while(1) { + while (true) { err = netconn_accept(conn, &newconn); if (err != ERR_OK) continue; http_server_serve(newconn); netconn_delete(newconn); } - return MSG_OK; } #endif /* LWIP_NETCONN */ diff --git a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.h b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.h index 2764242d4..ed0fffd59 100644 --- a/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.h +++ b/demos/STM32/RT-STM32F407-OLIMEX_E407-LWIP-FATFS-USB/web/web.h @@ -41,7 +41,7 @@ extern THD_WORKING_AREA(wa_http_server, WEB_THREAD_STACK_SIZE); #ifdef __cplusplus extern "C" { #endif - msg_t http_server(void *p); + THD_FUNCTION(http_server, p); #ifdef __cplusplus } #endif |