prepinani

Dependencies:   BSP_DISCO_F746NG

Files at this revision

API Documentation at this revision

Comitter:
iliatumash
Date:
Fri Nov 13 17:35:37 2020 +0000
Commit message:
uloha_4;

Changed in this revision

.hgignore Show annotated file Show diff for this revision Revisions of this file
BSP_DISCO_F746NG.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Fri Nov 13 17:35:37 2020 +0000
@@ -0,0 +1,2 @@
+BUILD
+mbed-os/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BSP_DISCO_F746NG.lib	Fri Nov 13 17:35:37 2020 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/teams/ST/code/BSP_DISCO_F746NG/#85dbcff443aa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Nov 13 17:35:37 2020 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "stm32746g_discovery_lcd.h"
+
+InterruptIn sw(USER_BUTTON);
+EventQueue queue(32 * EVENTS_EVENT_SIZE);
+Thread thread;
+
+void rise_handler(void)
+{
+    queue.call(BSP_LCD_SetTextColor,LCD_COLOR_RED);
+    queue.call(BSP_LCD_FillCircle,200, 100, 50);
+}  
+
+void fall_handler(void)
+{
+    queue.call(BSP_LCD_SetTextColor,LCD_COLOR_BLACK);
+    queue.call(BSP_LCD_FillCircle,200, 100, 50);
+     }
+
+int main()
+{   
+    BSP_LCD_Init();
+    BSP_LCD_LayerDefaultInit(LTDC_ACTIVE_LAYER, LCD_FB_START_ADDRESS);
+    BSP_LCD_SelectLayer(LTDC_ACTIVE_LAYER);
+    BSP_LCD_Clear(LCD_COLOR_BLACK);
+    
+    thread.start(callback(&queue, &EventQueue::dispatch_forever));
+    sw.rise(rise_handler);
+    sw.fall(fall_handler);
+       while (true) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Fri Nov 13 17:35:37 2020 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#699372421a3b388fe568e9be85b1a985749a438f