Skip to main content
5 events
when toggle format what by license comment
Aug 31, 2015 at 20:58 comment added Igor Stoppa To be fair, the library does more than what is accomplished by those 4 lines. Replicating the same functionality would take a similar amount of code. But it could be done without abusing the header.
Aug 31, 2015 at 20:41 comment added Nick Gammon On my Interrupts I show how you can use pin-change interrupts in about 4 lines of code. My personal view is that if you are targeting a particular processor it is easier to just write those four lines. By the looks of it you have already spent a number of days to "save the effort" of writing those few lines. The problem is, that both libraries lack .c/.cpp files entirely. - so? Split the file into two files. ... it is not possiple to declare it extern - anything is possible.
Aug 30, 2015 at 18:47 comment added Igor Stoppa Indeed, what should be done is to split the library into .h and .cpp, so that it can work in a sane way. FWIW, though, using PCINT is trivial, if done without the library, assuming that you only care about one specific platform (say ATMega328p). The library bends backwards several times to cope with the different layout of AVR ports across various ATMega chips. But if all you care about is one chip, you can write much simpler code.
Aug 30, 2015 at 18:44 comment added Ariser The problem is, that both libraries lack .c/.cpp files entirely. Hence the real declaration is in the header and it is not possiple to declare it extern. The compiler takes the header guards correctly. But the linker throws the double declaration errors afterwards.
Aug 30, 2015 at 18:03 history answered Igor Stoppa CC BY-SA 3.0