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.
Dependents: inte_mod_test test_irm2121 BallCheck_IRM2121_InterrputInAdd CatPot_SensorRight
Revision 0:fa2477ffef50, committed 2014-11-13
- Comitter:
- bousiya03
- Date:
- Thu Nov 13 10:27:52 2014 +0000
- Child:
- 1:c63d872cfdb7
- Commit message:
- first-commit
Changed in this revision
| interruptin_mod.cpp | Show annotated file Show diff for this revision Revisions of this file |
| interruptin_mod.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/interruptin_mod.cpp Thu Nov 13 10:27:52 2014 +0000
@@ -0,0 +1,19 @@
+
+#include"mbed.h"
+#include"interruptin_mod.h"
+
+
+ interruptin_mod::interruptin_mod(PinName pin) : InterruptIn(pin){}
+
+ void interruptin_mod::fall_disable(void (*fptr)(void)){
+ _rise.attach(fptr);
+ gpio_irq_set(&gpio_irq, IRQ_RISE, 0);
+
+ }
+
+ void interruptin_mod::rise_disable(void (*fptr)(void)) {
+
+ _fall.attach(fptr);
+ gpio_irq_set(&gpio_irq, IRQ_FALL, 0);
+
+ }
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/interruptin_mod.h Thu Nov 13 10:27:52 2014 +0000
@@ -0,0 +1,18 @@
+#ifndef INTE_MOD
+#define INTE_MOD
+
+
+#include"mbed.h"
+
+class interruptin_mod:InterruptIn{
+
+ public:
+
+ interruptin_mod(PinName pin);
+
+ void fall_disable(void (*fptr)(void));
+ void rise_disable(void (*fptr)(void));
+
+ };
+
+#endif
\ No newline at end of file