Typical controller demo program based on Seeed Arch Max. Features: - Multi-thread architecture - Inter-thread message communication - Independent command shell using thread - HTTPD with CGI, WS, RPC - Key & value pair configuration load/save

Dependencies:   CMDB EthernetInterface HTTPD dconfig mbed-rpc mbed-rtos mbed storage_on_flash

Committer:
hillkim7
Date:
Fri Jul 03 11:53:23 2015 +0000
Revision:
3:df8a882e33a6
Parent:
0:2ffd10976643
Fix stack overflow problem in console task.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hillkim7 0:2ffd10976643 1 /**
hillkim7 0:2ffd10976643 2 * @file main.h
hillkim7 0:2ffd10976643 3 *
hillkim7 0:2ffd10976643 4 * @brief message and interface for main task.
hillkim7 0:2ffd10976643 5 *
hillkim7 0:2ffd10976643 6 */
hillkim7 0:2ffd10976643 7 #pragma once
hillkim7 0:2ffd10976643 8
hillkim7 0:2ffd10976643 9 #include <stdint.h>
hillkim7 0:2ffd10976643 10 #include "MainConfig.h"
hillkim7 0:2ffd10976643 11
hillkim7 0:2ffd10976643 12 /**
hillkim7 0:2ffd10976643 13 * Command Message ID of main task.
hillkim7 0:2ffd10976643 14 */
hillkim7 0:2ffd10976643 15 typedef enum {
hillkim7 0:2ffd10976643 16 MSG_IFUP, /// Start Ethernet
hillkim7 0:2ffd10976643 17 MSG_IFDOWN, /// Stop Ethernet
hillkim7 0:2ffd10976643 18 MSG_IFSTAT, /// Print Ethernet status
hillkim7 0:2ffd10976643 19 } MainMessageId;
hillkim7 0:2ffd10976643 20
hillkim7 0:2ffd10976643 21 typedef struct {
hillkim7 0:2ffd10976643 22 MainMessageId msg_id;
hillkim7 0:2ffd10976643 23 uint32_t msg_p1;
hillkim7 0:2ffd10976643 24 uint32_t msg_p2;
hillkim7 0:2ffd10976643 25 } MainMessage_t;
hillkim7 0:2ffd10976643 26
hillkim7 0:2ffd10976643 27
hillkim7 0:2ffd10976643 28 /**
hillkim7 0:2ffd10976643 29 * Global configuration instance.
hillkim7 0:2ffd10976643 30 */
hillkim7 0:2ffd10976643 31 extern MainConfig _config;
hillkim7 0:2ffd10976643 32
hillkim7 0:2ffd10976643 33 /**
hillkim7 0:2ffd10976643 34 * Send message to main task.
hillkim7 0:2ffd10976643 35 */
hillkim7 0:2ffd10976643 36 bool send_main_message(MainMessageId msg_id, uint32_t msg_p1, uint32_t msg_p2);
hillkim7 0:2ffd10976643 37
hillkim7 0:2ffd10976643 38