This program consists of the software developed for the ELEC5870M Individual Project. It runs on the mbed LPC1768. It uses the mbed RTOS to perform the following tasks: - Implements intuitive GUI with buttons, LCD TFT Display and LEDs. - Serial Communication with the RPi - I2C communication with INA219 voltage current sensors - Power control at the USB ports
Dependencies: Adafruit_GFX Adafruit_ST7735 INA219 MODSERIAL MbedJSONValue mbed-rtos mbed
Diff: MailBoxes.h
- Revision:
- 4:c7b0670f96b2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MailBoxes.h Wed Mar 22 21:07:07 2017 +0000 @@ -0,0 +1,30 @@ +#ifndef MAILBOXES_H +#define MAILBOXES_H + + +// this is file defines all mail boxes for inter thread comminication + +//////////////// data transfer from User Interface to Serial Port /////////////////////// +typedef struct{ + + bool activateSerial; // this allows the user interface to start/stop serial comms + +} ui_serial_letter; +////////////////////////////////////////////////////////////////////////////////////// + +/////////////////// data transfer from Serial Port to User Interface ///////////////// +Mail<ui_serial_letter,2> ui_serial_mail; + +typedef struct{ + + bool piStat; // status of the serial connection + bool camStat; // determines whether the camera is active + bool cloudStat; // detemines when the pi is connected to the cloud + bool detectionStat; // determines whether the object detection system is functional +} serial_ui_letter; + +Mail<serial_ui_letter,2> serial_ui_mail; + +////////////////////////////////////////////////////////////////////////////////// + +#endif \ No newline at end of file