Adding an interrupt

Writing software that controls the system and peripherals such as displays, SD cards, Buttons, LEDs, Serial Ports etc.
Post Reply
Sourabh1986
User
Posts: 9
Joined: Wed 2018-05-30 1:39

Adding an interrupt

Post by Sourabh1986 » Mon 2018-06-18 0:28

Hi,
I want to add a small change in the attached code but couldn't get my head around it, i want to add an interrupt so that when GPIO0_0 is pressed it will override the playing file on GPIO0_1.
I will really appreciate any feedback or suggestion as this is only part we have to resolve before going into mass production.

Thank you
Sourabh Bansal

Sourabh1986
User
Posts: 9
Joined: Wed 2018-05-30 1:39

Re: Adding an interrupt

Post by Sourabh1986 » Mon 2018-06-18 0:29

Here's the code.
Attachments
Revision00.zip
Revision00
(571.5 KiB) Downloaded 24 times

User avatar
pasi
VLSI Staff
Posts: 1485
Joined: Thu 2010-07-15 16:04

Re: Adding an interrupt

Post by pasi » Mon 2018-06-18 17:11

in gpioctrl.c change line 166 to #if 0 like below:

Code: Select all

        	/* If different file (or no file) is playing,
        	   cancel play and start playing the new one. */
        	if (
#if 0 //def GPIO_RISING_EDGE
        	    (player.currentFile == -1) /* does not override */
#else
        	    player.currentFile != mask - 1
#endif
        	    ) {
So that GPIO0 going high is allowed to override play started by GPIO1.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Sourabh1986
User
Posts: 9
Joined: Wed 2018-05-30 1:39

Re: Adding an interrupt

Post by Sourabh1986 » Tue 2018-06-19 4:55

Thanx heaps Pasi,
Yup that solved the issue.
:D :D

Post Reply