Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
src/OutputTask/OutputTask.cpp
- Committer:
- jmarkel44
- Date:
- 2016-09-15
- Revision:
- 63:0ded43237b22
- Parent:
- 56:225786c56315
- Child:
- 66:db1425574b58
File content as of revision 63:0ded43237b22:
#include "global.h" void OutputTask(void const *args) { UNUSED(args); while (true) { // wait for an event osEvent evt = OutputMasterMailBox.get(); if (evt.status == osEventMail) { OutputControlMsg_t *msg = (OutputControlMsg_t*) evt.value.p; printf("\r%s received message from someone...\n", __func__); printf("\rmsg->relay = %s\n", msg->output.c_str()); printf("\rmsg->state = %s\n", msg->state == ON ? "ON" : "OFF"); printf("\rmsg->priority = %u\n", msg->priority); switch ( msg->action ) { case ACTION_NEW: // read the file and and create an output entry break; case ACTION_CONTROL_REQ: default: break; } // free the message OutputMasterMailBox.free(msg); } } }