bleprofile_LED functions, how to change the o/p pin polarity?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiVa_4337911
Level 3
Level 3
First like received

Hi,

I am working with the find_me application provided in the users guide project ("Getting Started with EZ-BLE WICED Modules", https://www.cypress.com/file/396961/download).

How can we change the bleprofile_LEDOff() and bleprofile_LEDOn functions polarity (0 => OFF, 1 => ON) ?

I changed the following in profile.h

#define GPIO_SETTINGS_LED  

(GPIO_OUTPUT | GPIO_INIT_LOW | GPIO_LED)

and in find_me.c

gpio_configurePinWithSingleBytePortPinNum(GPIO_PIN_LED, GPIO_OUTPUT_ENABLE, GPIO_PIN_OUTPUT_LOW);

but I guess it only changes the initialization value.

Another problem is the LED is not turning on or blinking even though the On/Off functions are called (use ble_trace functions to confirm this). I used "clean" make target after changing the platform header files.

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Niras ,

Could you please confirm why you want to change the polarity?

The functions are hard coded as bleprofile_LEDOff() to turn OFF LED & vice versa.

You can set the pin values with API gpio_setPortOutput API

Thanks,

Anjana

View solution in original post

0 Likes
1 Reply
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Niras ,

Could you please confirm why you want to change the polarity?

The functions are hard coded as bleprofile_LEDOff() to turn OFF LED & vice versa.

You can set the pin values with API gpio_setPortOutput API

Thanks,

Anjana

0 Likes