mbed_controller / Mbed 2 deprecated mbed_controller_demo

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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.h Source File

main.h

Go to the documentation of this file.
00001 /**
00002  * @file main.h
00003  *
00004  * @brief message and interface for main task.
00005  *
00006  */
00007 #pragma once
00008 
00009 #include <stdint.h>
00010 #include "MainConfig.h"
00011 
00012 /**
00013  * Command Message ID of main task.
00014  */
00015 typedef enum {
00016     MSG_IFUP,       /// Start Ethernet
00017     MSG_IFDOWN,     /// Stop Ethernet
00018     MSG_IFSTAT,     /// Print Ethernet status
00019 } MainMessageId;
00020 
00021 typedef struct {
00022     MainMessageId   msg_id;
00023     uint32_t        msg_p1;
00024     uint32_t        msg_p2;
00025 } MainMessage_t;
00026 
00027 
00028 /**
00029  * Global configuration instance.
00030  */
00031 extern MainConfig _config;
00032 
00033 /**
00034  * Send message to main task.
00035  */
00036 bool send_main_message(MainMessageId msg_id, uint32_t msg_p1, uint32_t msg_p2);
00037 
00038