Best Answer kalio20, 19 April 2015 - 05:35 PM
DP09.Interrupt = Port.InterruptMode.InterruptEdgeHigh;
Go to the full post  | ||||||||||||||
Input events
Started by kalio20, Apr 19 2015 05:20 PM
Best Answer kalio20, 19 April 2015 - 05:35 PM
DP09.Interrupt = Port.InterruptMode.InterruptEdgeHigh; Go to the full post
1 reply to this topic
#1Posted 19 April 2015 - 05:20 PM Hi again,
is it possible to change the input event settings while code is runnin? For example if i try to set Digital Pin 9 as Input event, i need sometimes Port.InterruptMode.InterruptEdgeHigh, but sometimes i need to switch to Port.InterruptMode.InterruptEdgeLow or Port.InterruptMode.InterruptEdgeLevelHigh, i tried to fix my problem like this.
InterruptPort DP09 = new InterruptPort(Pins.GPIO_PIN_D9, false, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeHigh);
DP09.OnInterrupt += new NativeEventHandler(DP09_OnInterrupt);
InterruptPort DP091 = new InterruptPort(Pins.GPIO_PIN_D9, false, Port.ResistorMode.PullUp,
Port.InterruptMode.InterruptEdgeLow);
DP091.OnInterrupt += new NativeEventHandler(DP091_OnInterrupt);
DP09.DisableInterrupt();
DP091.DisableInterrupt();
I declared for 1 Input 2 events, and activate them when needed, but ofc i throws errors. Can u help me? Thanks in advance.
kalio #2Posted 19 April 2015 - 05:35 PM Best Answer DP09.Interrupt = Port.InterruptMode.InterruptEdgeHigh; 0 user(s) are reading this topic0 members, 0 guests, 0 anonymous users | ||||||||||||||
|
||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | ||||||||||||||