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: Adafruit_GFX Adafruit_ST7735 INA219 MODSERIAL MbedJSONValue mbed-rtos mbed
MailBoxes.h@6:196a63a3378d, 2017-04-30 (annotated)
- Committer:
- OHstin
- Date:
- Sun Apr 30 17:19:22 2017 +0000
- Revision:
- 6:196a63a3378d
- Parent:
- 4:c7b0670f96b2
Final Code for mbed operation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
OHstin | 4:c7b0670f96b2 | 1 | #ifndef MAILBOXES_H |
OHstin | 4:c7b0670f96b2 | 2 | #define MAILBOXES_H |
OHstin | 4:c7b0670f96b2 | 3 | |
OHstin | 4:c7b0670f96b2 | 4 | |
OHstin | 4:c7b0670f96b2 | 5 | // this is file defines all mail boxes for inter thread comminication |
OHstin | 4:c7b0670f96b2 | 6 | |
OHstin | 4:c7b0670f96b2 | 7 | //////////////// data transfer from User Interface to Serial Port /////////////////////// |
OHstin | 4:c7b0670f96b2 | 8 | typedef struct{ |
OHstin | 4:c7b0670f96b2 | 9 | |
OHstin | 4:c7b0670f96b2 | 10 | bool activateSerial; // this allows the user interface to start/stop serial comms |
OHstin | 4:c7b0670f96b2 | 11 | |
OHstin | 4:c7b0670f96b2 | 12 | } ui_serial_letter; |
OHstin | 4:c7b0670f96b2 | 13 | ////////////////////////////////////////////////////////////////////////////////////// |
OHstin | 4:c7b0670f96b2 | 14 | |
OHstin | 4:c7b0670f96b2 | 15 | /////////////////// data transfer from Serial Port to User Interface ///////////////// |
OHstin | 4:c7b0670f96b2 | 16 | Mail<ui_serial_letter,2> ui_serial_mail; |
OHstin | 4:c7b0670f96b2 | 17 | |
OHstin | 4:c7b0670f96b2 | 18 | typedef struct{ |
OHstin | 4:c7b0670f96b2 | 19 | |
OHstin | 4:c7b0670f96b2 | 20 | bool piStat; // status of the serial connection |
OHstin | 4:c7b0670f96b2 | 21 | bool camStat; // determines whether the camera is active |
OHstin | 4:c7b0670f96b2 | 22 | bool cloudStat; // detemines when the pi is connected to the cloud |
OHstin | 4:c7b0670f96b2 | 23 | bool detectionStat; // determines whether the object detection system is functional |
OHstin | 4:c7b0670f96b2 | 24 | } serial_ui_letter; |
OHstin | 4:c7b0670f96b2 | 25 | |
OHstin | 4:c7b0670f96b2 | 26 | Mail<serial_ui_letter,2> serial_ui_mail; |
OHstin | 4:c7b0670f96b2 | 27 | |
OHstin | 4:c7b0670f96b2 | 28 | ////////////////////////////////////////////////////////////////////////////////// |
OHstin | 4:c7b0670f96b2 | 29 | |
OHstin | 4:c7b0670f96b2 | 30 | #endif |