Anonymous
Not applicable
Dec 27, 2013
07:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 27, 2013
07:59 AM
In hello_sensor.c, it says hello_sensor_interrupt_handler allows for three interrupt inputs where the buttons are defined as.. Button1 : value&0x01 Button2 : (value&0x02)>>1 Button3 : (value&0x04)>>2When I press SW1 on the TAG board, this registers as Button1. If I were to add more buttons, how would I configure them as Button2 and Button3? I do realize I have to initialize as buttons/inputs/low/interrupt, but I am guessing there is more to it than that.Thanks
Solved! Go to Solution.
- Tags:
- board
- button1
- button2
- button3
- buttons
- buttonsinputslowinterrupt
- configure
- defined
- guessing
- hello_sensor.c
- hello_sensor_interrupt_handler
- initialize
- inputs
- interrupt
- press
- realize
- registers
- value&0x01
- value&0x021
- value&0x042
1 Solution
Dec 27, 2013
12:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 27, 2013
12:30 PM
The Tag board which is provided with SDK has only 1 button exposed. If you can wire GPIO pins, any unused GPIO can be used as buttons 2 or 3. You will need to modify hello_sensor_gpio_cfg to add the pin number and the flags. Check the button definition in WICED_Smart_SdkInlcudePlatformsBCM920732TAG_Q32platform.h. For button 2 flags would look something like that#define GPIO_SETTINGS_BUTTON2 (GPIO_INPUT | GPIO_INIT_LOW | GPIO_BUTTON2 | GPIO_INT)
20 Replies