![](/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-03-27
- Revision:
- 10:2b262d810c67
- Parent:
- 9:2fd97246b8f0
- Child:
- 11:d6d1583fc824
File content as of revision 10:2b262d810c67:
#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 Mutex simuXS; Mutex speedXS; Mutex carstateXS; int main() { 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 thread_1(task1readbrake); Thread thread_2(task2readaccel); Thread thread_3(task3enginestate); Thread thread_4(task4average); Thread thread_5(task5brakeLED); Thread thread_6(task6speedmonitor); Thread thread_7(task7displayvalues); Thread thread_8(task8sidelights); Thread thread_9(task9indLED); //Thread thread_10(taskXserialdump); // set up for the LCD while(1){ } }