Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I am trying to switch the pins on the buzzer and buttons for the hello sensor sample app. I was wondering if someone could tell me the exact lines to modify. I want to modify the buzzer to PIN26 and the button to PIN24.
I also have a question on the IRQ setup. Below I have some code to setup a IRQ handler. It works on PIN4 which I had previously set it up for but not for PIN24. This doesn't seem correct since a UINT16 could not handle 1<<24.
I will assume you mean the logical pin P24 (and not the physical pin on the SoC/Module/package).
The 40 logical GPIOs are in 3 ports - Port 0 has P0-P15, Port 1 has P16-P31 and Port 2 has P32-P39. The masks array is an array of the three ports and the corresponding GPIO on that port. In general, port = P#/16 and pin = P#%16. So what you really need is: