Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: Using hal_led.h and HalLedBlink to make LEDs blink on CC254X

$
0
0

I am trying to use the macros defined in hal.h, but have not been successful so far.  I have an LED on P1.0 and am able to make it blink using this code:

for (j=0;j<3;j++)
{
P1_0 = 1; // Antenna Stim On
for (i=0; i<12000; i++) asm("NOP"); //1.5ms delay
P1_0 = 0; //Antenna Stim Off;
for (i=0; i<12000; i++) asm("NOP"); //1.5ms delay
}

But I would like to use HalLedBlink.  I've tried these 2 blink commands (together and alone), but neither one seemed to have any effect:

HalLedBlink( HAL_LED_ALL, rrCharNumPulses, stimulationDutyCycle, stimulationPeriodInMilliseconds );

HalLedSet( HAL_LED_ALL, HAL_LED_MODE_BLINK);

//I even tried this, but the LED is still off.
HalLedSet( HAL_LED_ALL, HAL_LED_MODE_ON ); 

Am I missing something?  Do I need to enable LEDs first?  I added HalLedInit(); but that didn't help.

Greg


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>