- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Cypress,
Referring to the GPIODriver section in the WICED Studio 5.0.1 API Reference Guide, is there a way to have a GPIO (set as an output) toggle it's current state?
I am looking to do something equivalent to something like this:
In Arduino: digitalWrite(11, !digitalRead(11));
In PIC X32: PORTCbits.RC13 = !PORTCbits.RC13;
In STM EFM 32: GPIO_PinOutToggle(MY_DATA_PORT, MY_DATA_PIN)
In NXP MCUXpresso: GPIO_PortToggle(BOARD_INITPINS_GPIO, 1u << BOARD_INITPINS_PIN);
If not, is there some macro I could use to set the pin to an input, read the state and save it to a variable, change the pin back to an output, and write the variable?
Thank you,
Michael
Solved! Go to Solution.
- Tags:
- gpio state
- toggle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
For using CYBT-343026-01 module, you will need to use WICED Studio 6.2 or later.
We do not have a 'GPIO toggle' function as such, you will have to manually toggle the pin with ON-OFF functions. Please check /20706-A2_Bluetooth/include/wiced_hal_gpio.h and also, /20706-A2_Bluetooth/apps/snip/hal/gpio demo app for more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Michael,
Would you please let us know the Cypress product/chip you are using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Sheetalj_96,
I am using the CYBT-343026-01.
Thank you,
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mike,
For using CYBT-343026-01 module, you will need to use WICED Studio 6.2 or later.
We do not have a 'GPIO toggle' function as such, you will have to manually toggle the pin with ON-OFF functions. Please check /20706-A2_Bluetooth/include/wiced_hal_gpio.h and also, /20706-A2_Bluetooth/apps/snip/hal/gpio demo app for more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunate news, but thank you for your reply.
Mike