Zigbee Module Examples

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Rgb_api

## Functions
void | RGBInit (unsigned long ulEnable)
void | RGBEnable (void)
void | RGBDisable (void)
void | RGBSet (volatile unsigned long *pulRGBColor, float fIntensity)
void | RGBColorSet (volatile unsigned long *pulRGBColor)
void | RGBIntensitySet (float fIntensity)
void | RGBColorGet (unsigned long *pulRGBColor)

## Detailed Description

## Function Documentation

void RGBColorGet | ( | unsigned long * | pulRGBColor | ) |

Get the output color.

Parameters:

  pulRGBColor | points to a three element array representing the relative intensity of each color. Red is element 0, Green is element 1, Blue is element 2. 0x0000 is off. 0xFFFF is fully on. Caller must allocate and pass a pointer to a three element array of unsigned longs.

This function should be called by the application to get the current color of the RGB LED.

Returns:
  None.

void RGBColorSet | ( | volatile unsigned long * | pulRGBColor | ) |

Set the output color.

Parameters:

  pulRGBColor | points to a three element array representing the relative intensity of each color. Red is element 0, Green is element 1, Blue is element 2. 0x0000 is off. 0xFFFF is fully on.

This function should be called by the application to set the color of the RGB LED.

Returns:
  None.

void RGBDisable | ( | void |  | ) |

Disable the RGB LED by configuring the GPIO's as inputs.

This function or RGBEnable should be called during application initialization to configure the GPIO pins to which the LEDs are attached. This function disables the timers and configures the GPIO pins as inputs for minimum current draw.

Returns:
  None.

void RGBEnable | ( | void |  | ) |

Enable the RGB LED with already configured timer settings

This function or RGBDisable should be called during application initialization to configure the GPIO pins to which the LEDs are attached. This function enables the timers and configures the GPIO pins as timer outputs.

Returns:
  None.

void RGBInit | ( | unsigned long | ulEnable | ) |

Initializes the Timer and GPIO functionality associated with the RGB LED

Parameters:

  ulEnable | enables RGB immediately if set.

This function must be called during application initialization to configure the GPIO pins to which the LEDs are attached. It enables the port used by the LEDs and configures each color's Timer. It optionally enables the RGB LED by configuring the GPIO pins and starting the timers.

Returns:
  None.

void RGBIntensitySet | ( | float | fIntensity | ) |

Set the current output intensity.

Parameters:

  fIntensity | is used to scale the intensity of all three colors by the same amount. fIntensity should be between 0.0 and 1.0. This scale factor is applied individually to all three colors.

This function should be called by the application to set the intensity of the RGB LED.

Returns:
  None.

void RGBSet | ( | volatile unsigned long * | pulRGBColor,
|  | float | fIntensity
| ) |  |

Set the output color and intensity.

Parameters:

  pulRGBColor | points to a three element array representing the relative intensity of each color. Red is element 0, Green is element 1, Blue is element 2. 0x0000 is off. 0xFFFF is fully on.
  fIntensity | is used to scale the intensity of all three colors by the same amount. fIntensity should be between 0.0 and 1.0. This scale factor is applied to all three colors.

This function should be called by the application to set the color and intensity of the RGB LED.

Returns:
  None.