Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Nevyn's Content

There have been 27 items by Nevyn (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#65199 ND3 cannot seem to create an interrupt handler

Posted by Nevyn on 14 June 2016 - 07:17 PM in Netduino 3

That old chestnut.

 

Regards,

Mark




#65192 ND3 cannot seem to create an interrupt handler

Posted by Nevyn on 14 June 2016 - 06:15 AM in Netduino 3

I think you need you application to look something like this:

public static InterruptPort button = new InterruptPort(Pins.GPIO_PIN_D0, false, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLevelHigh);

public static void Main()
{
    button.OnInterrupt += Button_OnInterrupt;
}

private static void Button_OnInterrupt(uint data1, uint data2, DateTime time)
{
    throw new NotImplementedException();
}

The IDE generated the code for the interrupt and the attachment when I pressed the tab key following the +=.

 

Regards,

Mark





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.