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.
Revision 1:4b541496f679, committed 2021-11-11
- Comitter:
- tzwell
- Date:
- Thu Nov 11 19:17:33 2021 +0000
- Parent:
- 0:bda289aee5eb
- Commit message:
- Added interrupt priority demonstration;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 11 19:08:01 2021 +0000
+++ b/main.cpp Thu Nov 11 19:17:33 2021 +0000
@@ -18,6 +18,14 @@
/*
* Definisanje makroa:
*/
+
+// Sledeci kod otkomentarisati
+// da bi se videla demonstracija prioriteta prekida.
+ /*
+#define ON_TIME 2
+#define LED_ON 1
+#define LED_OFF 0
+*/
/*
* Globalne promenljive:
@@ -57,8 +65,22 @@
void ISR_button_sw1()
{
led1_mb = !led1_mb;
+ // Prethodnu liniju zakomentarisati, a sledeci kod otkomentarisati
+ // da bi se videla demonstracija prioriteta prekida.
+ /*
+ led1_mb.write(LED_ON);
+ wait(ON_TIME);
+ led1_mb.write(LED_OFF);
+ */
}
void ISR_button_sw2()
{
led2_mb = !led2_mb;
+ // Prethodnu liniju zakomentarisati, a sledeci kod otkomentarisati
+ // da bi se videla demonstracija prioriteta prekida.
+ /*
+ led2_mb.write(LED_ON);
+ wait(ON_TIME);
+ led2_mb.write(LED_OFF);
+ */
}
\ No newline at end of file