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.
collector.cpp
- Committer:
- passelin
- Date:
- 2014-01-28
- Revision:
- 4:7d6b46b40fba
- Parent:
- 3:cd25d0efe0e1
File content as of revision 4:7d6b46b40fba:
#include "main.h" Serial pc(USBTX, USBRX); extern Queue<Event_t, 16> eventQueue; const char* eventType[4] = {"Switch 1", "Switch 2", "Pot 1", "Pot 2 "}; void Collector_thread(void const *args) { Event_t *event; osEvent evt; while(true) { evt = eventQueue.get(); if (evt.status == osEventMessage) { event = (Event_t*)evt.value.p; } pc.printf("Event Type = %s Time = %s \n\r", eventType[event->type], ctime(&event->time)); delete event; } }