31#define LOG_DOMAIN "leds"
41 pynq_error(
"leds_init_onoff: mode=%d should be uninitialized\n", mode);
62 pynq_error(
"green_leds_init_pwm: mode=%d should be uninitialized\n", mode);
83 pynq_error(
"color_leds_init_pwm: mode=%d should be uninitialized\n", mode);
119 pynq_error(
"green_led_onoff: invalid led=%d, must be 0..%d-1\n",
140 pynq_error(
"green_led_onoff: LEDs have not been initialized with "
141 "green_leds_init_pwm\n");
167 pynq_error(
"color_led_red_onoff: LEDs have not been initialized with "
168 "color_leds_init_pwm\n");
190 pynq_error(
"color_led_green_onoff: LEDs have not been initialized with "
191 "color_leds_init_pwm\n");
213 pynq_error(
"color_led_blue_onoff: LEDs have not been initialized with "
214 "color_leds_init_pwm\n");
219 const int blue_onoff) {
void gpio_set_level(const gpio_t pin, const gpio_level_t level)
void gpio_set_direction(const gpio_t pin, const gpio_direction_t direction)
void switchbox_set_pin(const int32_t pin_number, const uint8_t pin_type)
void color_led_onoff(const int red_onoff, const int green_onoff, const int blue_onoff)
Switches on/off the red/green/blue components of color LED 0.
void leds_init_onoff(void)
Initialize the green LEDs for on/off use.
void green_leds_init_pwm(void)
Initialize the green LEDs for use with variable intensity. The LED intensity can range from 0....
void green_led_off(const int led)
Same as green_led_onoff(led, LED_OFF). Works in all modes.
void color_led_red_onoff(const int onoff)
Switches on/off the red component of color LED 0.
void color_led_off(void)
Set color LED 0 to black. Same as color_led_onoff(LED_OFF, LED_OFF, LED_OFF).
void color_led_on(void)
Set color LED 0 to white. Same as color_led_onoff(LED_ON, LED_ON, LED_ON).
void green_led_on(const int led)
Same as green_led_onoff(led, LED_ON). Works in all modes.
void color_led_blue_onoff(const int onoff)
Switches on/off the blue component of color LED 0.
void color_led_green_onoff(const int onoff)
Switches on/off the green component of color LED 0.
void color_leds_init_pwm(void)
Initialize the color LEDs for use with variable intensity. The LED intensity can range from 0....
void green_led_onoff(const int led, const int onoff)
@ SWB_LD0
LED output pins.
@ SWB_LD4B
The RGB adresses for SWB_LD4 and SWB_LD5.
void pwm_init(const int pwm, const uint32_t period)
Initializes the PWM channel with the specified period.
void pwm_destroy(const int pwm)
Removes the instantiated shared memory system of the PWM channel.
void pwm_set_duty_cycle(const int pwm, const uint32_t duty)
Sets the duty cycle for the specified PWM channel.