![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
All tasks complete
Dependencies: mbed MCP23017 mbed-rtos WattBob_TextLCD
main.cpp
- Committer:
- aingks
- Date:
- 2019-04-03
- Revision:
- 16:b66cb760fb3b
- Parent:
- 14:25241ed5b056
File content as of revision 16:b66cb760fb3b:
#include "header.h" /* Embedded Software: Assignment 3 Description: Version 0.2 Aingkaran Suppiah */ SDATA speed = SDATA(); CARINFO info = CARINFO(); SIMU_DATA sim = SIMU_DATA(); MCP23017 *par_port; // pointer to 16-bit parallel I/O object **was = NULL WattBob_TextLCD *display; // pointer to 2*16 chacater LCD object **was = NULL Thread thread_1; Thread thread_2; Thread thread_3; Thread thread_4; Thread thread_5; Thread thread_6; Thread thread_7; Thread thread_8; Thread thread_9; Thread thread_10; Mutex simuXS; Mutex speedXS; Mutex carstateXS; int main() { // set up for the LCD par_port = new MCP23017(p9, p10, 0x40); // initialise 16-bit I/O chip display = new WattBob_TextLCD(par_port); // initialise 2*26 char display par_port->write_bit(1,BL_BIT); // turn LCD backlight ON thread_1.start(task1readbrake); thread_2.start(task2readaccel); thread_3.start(task3enginestate); thread_4.start(task4average); thread_5.start(task5brakeLED); thread_6.start(task6speedmonitor); thread_7.start(task7displayvalues); thread_8.start(task8sidelights); thread_9.start(task9indLED); thread_10.start(taskXserialdump); while(1){ } }