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: lcd neoPixelRing12 view2 BSP_DISCO_F746NG view1 button
main.cpp
- Committer:
- Rhamao
- Date:
- 2020-06-17
- Revision:
- 13:0708365334c4
- Parent:
- 9:89d39fc98b17
- Child:
- 14:7b74ad030896
File content as of revision 13:0708365334c4:
#include "mbed.h"
#include "Thread.h"
#include "rtos_idle.h"
#include "mbed_critical.h"
#include "neoPixelRing12.h"
#include "view.h"
#include "stm32746g_discovery_lcd.h"
#include "stm32746g_discovery_ts.h"
#include "lcd/lcd.h"
#include <list>
#define SCREENWIDTH 480
#define SCREENHEIGHT 272
#define USE_CRITICAL_SECTION_LOCK 1 // Set 0 to see race condition
uint8_t text[30];
DigitalOut myled(D8);
DigitalOut led1(LED1);
NeoPixelRing12 npr(D8);
LCD disco;
View v;
int main()
{
disco.initLCD();
v.initView();
//lcd->initLCD();
while(1){
v.updateLCD();
}
//*************************************************
int i=0;
//CriticalSectionLock lock;
//bit0();
//CriticalSectionLock unlock;
//Une led à 0 avant d'envoyer la trame pour éviter
//le bug de trame
npr.setLights(1, "ff0000");
npr.rst();
//la trame
npr.setLights(5, "00ff00");
npr.setLights(2, "ff0000");
npr.setLights(4, "0000ff");
npr.rst();
wait(100.0);
}