[Code Posted] Change Notification Interrupts

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: [Code Posted] Change Notification Interrupts

Post by majenko » Tue Jul 17, 2012 8:05 pm

My library now supports multiple interrupts per pin - one per direction type.

detachInterrupt(CN_x) will remove ALL interrupts from a pin.

attachInterrupt(CN_x,function,direction) will add the interrupt to that specific direction. You can add a function to multiple directions:

Code: Select all

attachInterrupt(CN_4,pressed,RISING);
attachInterrupt(CN_4,released,FALLING);
You can remove a single direction interrupt with:

Code: Select all

detachInterrupt(CN_x,direction);
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

woerr
Posts: 27
Joined: Thu Oct 09, 2014 7:48 am

Re: [Code Posted] Change Notification Interrupts

Post by woerr » Fri Jan 13, 2017 1:27 pm

I get the following errors from changenotification.h

using uecide 0.8.8alpha22

First plib.h was missing, so I added it from mpide.
Then adc10 was missing, So I added it from mpide.

Now I get the following when compiling.

Error at line 29 in file ChangeNotification.cpp:
‣ invalid conversion from 'volatile unsigned int*' to 'volatile uint32_t* {aka volatile long unsigned int*' [-fpermissive]}

I understand that maybe just copying files from mpide may not work. I am just looking for a workaround.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: [Code Posted] Change Notification Interrupts

Post by majenko » Fri Jan 13, 2017 1:39 pm

Where / how did you get changenotification.h et al? It could be you have the wrong version? plib.h should not be a requirement.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

woerr
Posts: 27
Joined: Thu Oct 09, 2014 7:48 am

Re: [Code Posted] Change Notification Interrupts

Post by woerr » Fri Jan 13, 2017 1:59 pm

I got it from http://sourceforge.net/projects/chipkitcn/

Removed that and installed it via uecide plugin manager and it works fine.

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: [Code Posted] Change Notification Interrupts

Post by majenko » Fri Jan 13, 2017 3:58 pm

I thought so. That one should not exist, but I cannot get rid of it. It should be telling you to go to github on the home page.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply