I have some bitmaps uploaded on the uC and the thing is as soon as I display the 7th bitmap on screen the thread is not created and the thread code does not execute at all!
<<code>>display.FullScreenBMP(brew1);<</code>>
this is the culprit as soon as I add it the LCD_thread does not execute!!
what could be the case?
#include "mbed.h"
#include "KS0108.h"
#include "Arial12.h"
#include "SystemFont5x7.h"
#include "image.h"
#include "brew.h"
#include "rtos.h"
#include "menu_stop.h"
#include "menu_alert.h"
#include "menu_status.h"
#include "menu_realview.h"
#include "menu_temp.h"
#include "ReceiverIR.h"
// KS0108 (PinName _RST,PinName _DI, PinName _RW, PinName _E, PinName _CS1, PinName _CS2, PinName DB0, PinName DB1, PinName DB2, PinName DB3, PinName DB4, PinName DB5, PinName DB6, PinName DB7);
KS0108 display(PTC3,PTD6, PTE31, PTA17, PTC5, PTC4, PTA16, PTC17, PTC16, PTC13, PTC12, PTC11, PTC10, PTC6);
ReceiverIR ir_rx(PTA13);
Serial pc(USBTX, USBRX); // tx, rx
bool menu_alert = false, menu_realview = false, menu_status = false, menu_temp = false, menu_stop = false, HERMSbrew = false;
uint8_t buf[16];
void LCD_thread(void const *args)
{
while (true) {
display.FullScreenBMP(Menu_trial_startbut_Stop);
Thread::wait(2);
display.FullScreenBMP(Menu_trial_startbut_Temp);
Thread::wait(2);
display.FullScreenBMP(Menu_trial_startbut_RealTimeView);
Thread::wait(2);
display.FullScreenBMP(Menu_trial_startbut_Alert);
Thread::wait(2);
display.FullScreenBMP(Menu_trial_startbut_Status);
Thread::wait(2);
if(menu_alert){
}else if(menu_realview){
}else if(menu_status){
}else if(menu_temp){
}else if(menu_stop){
}
}
}
void led3_thread(void const *args)
{
while (true) {
//Thread::wait(0.5);
}
}
int main()
{
display.ClearScreen();
display.FullScreenBMP(pic);
wait(2);
display.FullScreenBMP(brew1);
wait(2);
Thread thread(LCD_thread);
Thread thread1(led3_thread);
HERMSbrew = true;
RemoteIR::Format format;
memset(buf, 0x00, sizeof(buf));
while(1) {
if (ir_rx.getState() == ReceiverIR::Received) {
ir_rx.getData(&format, buf, sizeof(buf) * 8);
pc.printf("\n\rgot>> ");
//for (int i=0; i<sizeof(buf); i++) {
pc.printf("0x%02X, ", buf[0]);
//pc.printf("%i",i);
//}
switch (format) {
case RemoteIR::UNKNOWN:
pc.printf("????");
break;
case RemoteIR::NEC:
pc.printf("NEC");
break;
case RemoteIR::AEHA:
pc.printf("AEHA");
break;
case RemoteIR::SONY:
pc.printf("SONY");
break;
}
}
}
}
I have some bitmaps uploaded on the uC and the thing is as soon as I display the 7th bitmap on screen the thread is not created and the thread code does not execute at all!
<<code>>display.FullScreenBMP(brew1);<</code>>
this is the culprit as soon as I add it the LCD_thread does not execute!! what could be the case?