- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried to use bleprofile_LED functions in find_me example, but ther are not woring. First configured GPIO as
// Following structure defines GPIO configuration used by the application
const BLE_PROFILE_GPIO_CFG find_me_gpio_cfg =
{
{
GPIO_PIN_WP, // This need to be used to enable/disable NVRAM write protect
GPIO_PIN_LED, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // Other GPIOs are not used
},
/*.gpio_flag =*/
{
GPIO_SETTINGS_WP,
GPIO_SETTINGS_LED, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}
};
where the GPIO_SETTINGS_LED is
#define GPIO_SETTINGS_LED | (GPIO_OUTPUT | GPIO_INIT_HIGH | GPIO_LED) |
Then inside find_me_create function, added the following:
gpio_configurePinWithSingleBytePortPinNum(GPIO_PIN_LED, GPIO_OUTPUT_ENABLE, GPIO_PIN_OUTPUT_HIGH);
I am not sure the above step is required, because already configured in BLE_PROFILE_GPIO_CONFIG (but not as output).
After these configurations, the following functions, bleprofile_LEDOff(), bleprofile_LEDOn() and bleprofile_LEDBlink() have no effects on LED. However, LED can be turn on/off using gpio_setPinOutput(0, GPIO_PIN_LED, GPIO_PIN_OUTPUT_HIGH/GPIO_PIN_OUTPUT_LOW) and without using BLE_PROFILE_GPIO_CFG.
What was the wrong I did with BLE_PROFILE_GPIO_CFG?
Thanking You.
NV
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Niras,
I would suggest you to use gpio_setPinOutput function instead of bleprofile_LEDOn / Off functions. Seems like the bleprofile_LEDOn functions are not reliable when I tested at my side.
Please go through GPIO & LED section in the following blog : WICED Smart User's Guide
Thanks,
Anjana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Niras,
I would suggest you to use gpio_setPinOutput function instead of bleprofile_LEDOn / Off functions. Seems like the bleprofile_LEDOn functions are not reliable when I tested at my side.
Please go through GPIO & LED section in the following blog : WICED Smart User's Guide
Thanks,
Anjana