public inbox for ecos-bugs@sourceware.org help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1001787] GPIO Interrupt Support for Kinetis Date: Sun, 17 Mar 2013 14:00:00 -0000 [thread overview] Message-ID: <bug-1001787-777-rxGkDJ4Bx4@http.bugs.ecos.sourceware.org/> (raw) In-Reply-To: <bug-1001787-777@http.bugs.ecos.sourceware.org/> Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001787 Ilija Kocho <ilijak@siva.com.mk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ilijak@siva.com.mk Assignee|unassigned@bugs.ecos.source |ilijak@siva.com.mk |ware.org | --- Comment #1 from Ilija Kocho <ilijak@siva.com.mk> --- Hi Mike Thank you for your contribution. Now I have a little time to see your macros and functions, but my ability for testing is limited. Interrupt support: To begin with, I should have added __irqc parameter to CYGHWR_HAL_KINETIS_PIN() from the beginning. CYGHWR_HAL_KINETIS_SETUP_PIN() corrects my mistake but I would avoid the assignment operation in this macro in order to allow it's usage in arrays. It is usually necesary to set several pins at once. Than we can define an array and call macro HAL_SET_PINS() (See Ethernet, Flexbus and DDRAM drivers for use cases). Therefore I propose following modification of your macro (then my original macro will be a special case with __irqc = 0): // Pin configuration descriptor PinCD // PinCD is a 32 bit unsigned integer which contains configuration information // for one pin. This macro produces PinCD based on following parameters: // __port - Port name, [A, F] // __bit - Port bit [0, 31] // __mux - Multiplexer index [0, 7] // __irqc - Interrupt configuration [0, F] // __cnf - Configuration options #define CYGHWR_HAL_KINETIS_PINCD(__port, __bit, __mux, __irqc, __cnf) \ ((CYGHWR_HAL_KINETIS_PORT##__port << 20) | ((__bit) << 27) \ | CYGHWR_HAL_KINETIS_PORT_PCR_IRQC(__irqc) \ | CYGHWR_HAL_KINETIS_PORT_PCR_MUX(__mux) | (__cnf)) // PinCD with disabled interrupts. (For backward compatibility) #define CYGHWR_HAL_KINETIS_PIN(__port, __bit, __mux, __cnf) \ CYGHWR_HAL_KINETIS_PIN_CNF(__port, __bit, __mux, 0, __cnf) The interrupt acknowledge function should be designed with efficiency in mind so I would avoid switch even though it requires direct coding instead of using macros. Bit manipulation functions: Having such macros already, bit manipulation functions seem redundant to me. Is there a use case where we must use function (rather than macro)? This is all for now. Ilija -- You are receiving this mail because: You are the assignee for the bug.
prev parent reply other threads:[~2013-03-17 14:00 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-03-02 18:25 [Bug 1001787] New: " bugzilla-daemon 2013-03-02 20:03 ` [Bug 1001787] " bugzilla-daemon 2013-03-17 14:00 ` bugzilla-daemon [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-1001787-777-rxGkDJ4Bx4@http.bugs.ecos.sourceware.org/ \ --to=bugzilla-daemon@bugs.ecos.sourceware.org \ --cc=unassigned@bugs.ecos.sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).