Hi all,
I took igor's patch and moved forward from there. I have a first patch (against trunk) you can try. I tested the PCINT interrupts on an ATmega162 and it seems to work. I tried to support the ATmega328P and ATmega2560 as well but i can't test them. Maybe someone else can try this?
1) The driver now supports PCINT interrupts as if it is a normal INT interrupt. You don't have to check which bits have been changed in the PCINT interrupt handler. Instead, each PCINT pin has its own callback function so the source of the interrupt (INT or PCINT) is hidden from the user.
2) Unused INTs and PCINTs can be disabled in mcuconf. By default, all INTs and PCINTs are disabled. Set AVR_EXT_USE_INTx or AVR_EXT_USE_PCINTx to TRUE in mcuconf.h to overrule the defaults. This can save some memory if you have some unused INTs or PCINT ports.
3) EXT_CH_MODE_AUTOSTART is now also supported for PCINTs.
4) PCINT channel enable/disable is now working properly.
Let me know if you have any problems testing the driver.
Marco
[PATCH] AVR EXT Topic is solved
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [PATCH] AVR EXT
Hi Macro,
Thanks for your work and you feedback for the PCINT driver.
I'm going to make a test with the two others MCU and see if everything is working fine.
Thanks for your tips on how to use the driver is is very clear .
So I will make a feedback as soon as I can.
Thanks for your work and you feedback for the PCINT driver.
Marco wrote:
I tested the PCINT interrupts on an ATmega162 and it seems to work. I tried to support the ATmega328P and ATmega2560 as well but i can't test them. Maybe someone else can try this?
I'm going to make a test with the two others MCU and see if everything is working fine.
Thanks for your tips on how to use the driver is is very clear .
So I will make a feedback as soon as I can.
regards,
Theo.
Theo.
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [PATCH] AVR EXT
Hi Marco,
I'm running on some trouble when applaying the patch.
Here is what I have:
So I get .rej files for all files modify by the patch.
How did you apply your patch ? I have the same problem with the original patch made by Igor.
I'm running on some trouble when applaying the patch.
Here is what I have:
Code: Select all
patch -p1 < ../../avr_ext.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file hal/ports/AVR/avr_pins.h
Hunk #1 FAILED at 91 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file hal/ports/AVR/avr_pins.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file hal/ports/AVR/hal_ext_lld.c
Hunk #1 FAILED at 1 (different line endings).
Hunk #2 FAILED at 15 (different line endings).
Hunk #3 FAILED at 30 (different line endings).
Hunk #4 FAILED at 43 (different line endings).
Hunk #5 FAILED at 351 (different line endings).
5 out of 5 hunks FAILED -- saving rejects to file hal/ports/AVR/hal_ext_lld.c.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file hal/ports/AVR/hal_ext_lld.h
Hunk #1 FAILED at 1 (different line endings).
Hunk #2 FAILED at 15 (different line endings).
Hunk #3 FAILED at 32 (different line endings).
Hunk #4 FAILED at 81 (different line endings).
Hunk #5 FAILED at 106 (different line endings).
Hunk #6 FAILED at 112 (different line endings).
6 out of 6 hunks FAILED -- saving rejects to file hal/ports/AVR/hal_ext_lld.h.rej
So I get .rej files for all files modify by the patch.
How did you apply your patch ? I have the same problem with the original patch made by Igor.
regards,
Theo.
Theo.
-
- Posts: 359
- Joined: Sat Jan 07, 2012 6:22 pm
- Location: Brazil
- Has thanked: 1 time
- Been thanked: 20 times
- Contact:
Re: [PATCH] AVR EXT
I can only apply Marco's patches on Linux. Get the same errors as you on macOS. Looks like the patches are created from git with a non-standard auto.crlf configuration.
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [PATCH] AVR EXT
Utzig,
So if you are able to apply the patch, can you apply it to the trunk if it look ok for you?
I will then make some tests with the Arduino Mega and Arduino Uno after that.
So if you are able to apply the patch, can you apply it to the trunk if it look ok for you?
I will then make some tests with the Arduino Mega and Arduino Uno after that.
regards,
Theo.
Theo.
-
- Posts: 359
- Joined: Sat Jan 07, 2012 6:22 pm
- Location: Brazil
- Has thanked: 1 time
- Been thanked: 20 times
- Contact:
Re: [PATCH] AVR EXT
Applied. You can pass --binary to patch on Linux and it takes care of the line endings.
Re: [PATCH] AVR EXT
utzig wrote:I can only apply Marco's patches on Linux. Get the same errors as you on macOS. Looks like the patches are created from git with a non-standard auto.crlf configuration.
The patch is created using svn, but with files copied from another git repository. Probably that caused the problems with line endings. I'm sorry guys
I hope that except from the line endings everything is ok
- tfAteba
- Posts: 547
- Joined: Fri Oct 16, 2015 11:03 pm
- Location: Strasbourg, France
- Has thanked: 91 times
- Been thanked: 48 times
Re: [PATCH] AVR EXT
Hi all,
I just started to test the PCINTx implementation.
I then needed to update all the AVR/mcuconfig.h file because of alot of warning during the compilation.
Now the compilation of other demo or test file is done with no warning, i will write an application and test the AVR PCINTx part.
I just started to test the PCINTx implementation.
I then needed to update all the AVR/mcuconfig.h file because of alot of warning during the compilation.
Now the compilation of other demo or test file is done with no warning, i will write an application and test the AVR PCINTx part.
regards,
Theo.
Theo.
Who is online
Users browsing this forum: No registered users and 3 guests