Bulb PWM Driver Callbacks#

These callbacks are contributed by the Bulb PWM Driver plugin.

Functions#

uint16_t

Configures the frequency of the PWM driver. Called by the bulb-pwm driver upon initialization to determine the frequency at which the PWM driver should be driven. It should return either the frequency, in Hz, or USE_DEFAULT_FREQUENCY to indicate that the plugin should use the default value. The default value is 1000 Hz, but can be overridden by a macro in the board header.

void

Indicates that the PWM driver has been initialized and the bulb should drive the initial LED PWM values at this time.

void

Generated during blinking behavior when it is time to turn the bulb on. While the plugin will determine when to blink the bulb on or off, it is up to this callback to determine how to turn the bulb on.

void

Generated during blinking behavior when it is time to turn the bulb off. While the plugin will determine when to blink the bulb on or off, it is up to this callback to determine how to turn the bulb off.

void

Generated when the application layer makes a call to initiate blinking behavior. It warns the application layer PWM code not to attempt to drive the LEDs directly and interfere with the blinking behavior.

void

Generated when the current blinking command finishes. The application layer PWM code must then determine what the bulb drive should be, based on the current application layer attributes (i.e., level, on/off, color XY, and so on.)

Function Documentation#

halBulbPwmDriverFrequencyCallback#

uint16_t halBulbPwmDriverFrequencyCallback (void )

Configures the frequency of the PWM driver. Called by the bulb-pwm driver upon initialization to determine the frequency at which the PWM driver should be driven. It should return either the frequency, in Hz, or USE_DEFAULT_FREQUENCY to indicate that the plugin should use the default value. The default value is 1000 Hz, but can be overridden by a macro in the board header.

Parameters
N/A

@appusage Should be implemented by an application layer configuration plugin.


Definition at line 123 of file ./app/ncp/doc/callback.doc

halBulbPwmDriverInitCompleteCallback#

void halBulbPwmDriverInitCompleteCallback (void )

Indicates that the PWM driver has been initialized and the bulb should drive the initial LED PWM values at this time.

Parameters
N/A

@appusage Should be implemented by an application layer configuration plugin.


Definition at line 135 of file ./app/ncp/doc/callback.doc

halBulbPwmDriverBlinkOnCallback#

void halBulbPwmDriverBlinkOnCallback (void )

Generated during blinking behavior when it is time to turn the bulb on. While the plugin will determine when to blink the bulb on or off, it is up to this callback to determine how to turn the bulb on.

Parameters
N/A

@appusage Should be implemented by an application layer configuration plugin.


Definition at line 148 of file ./app/ncp/doc/callback.doc

halBulbPwmDriverBlinkOffCallback#

void halBulbPwmDriverBlinkOffCallback (void )

Generated during blinking behavior when it is time to turn the bulb off. While the plugin will determine when to blink the bulb on or off, it is up to this callback to determine how to turn the bulb off.

Parameters
N/A

@appusage Should be implemented by an application layer configuration plugin.


Definition at line 176 of file ./app/ncp/doc/callback.doc

halBulbPwmDriverBlinkStartCallback#

void halBulbPwmDriverBlinkStartCallback (void )

Generated when the application layer makes a call to initiate blinking behavior. It warns the application layer PWM code not to attempt to drive the LEDs directly and interfere with the blinking behavior.

Parameters
N/A

@appusage Should be implemented by an application layer configuration plugin.


Definition at line 204 of file ./app/ncp/doc/callback.doc

halBulbPwmDriverBlinkStopCallback#

void halBulbPwmDriverBlinkStopCallback (void )

Generated when the current blinking command finishes. The application layer PWM code must then determine what the bulb drive should be, based on the current application layer attributes (i.e., level, on/off, color XY, and so on.)

Parameters
N/A

@appusage Should be implemented by an application layer configuration plugin.


Definition at line 217 of file ./app/ncp/doc/callback.doc