libpynq
(release 5EID0-2023 version 0.3.0 of 2024-04-25 09:42 )
|
Go to the documentation of this file.
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 color_leds_init_pwm(void)
Initialize the color LEDs for use with variable intensity. The LED intensity can range from 0....
void switchbox_set_pin(const pin_t pin_number, const uint8_t pin_type)
void gpio_set_level(const io_t pin, const gpio_level_t level)
Set the level of the output IO pin. If the pin is configured as input, this function does nothing.
@ IO_LD4B
The RGB adresses for IO_LD4 and IO_LD5.
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.
void green_led_off(const int led)
Same as green_led_onoff(led, LED_OFF). 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_on(void)
Set color LED 0 to white. Same as color_led_onoff(LED_ON, LED_ON, LED_ON).
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 color_led_green_onoff(const int onoff)
Switches on/off the green component of color LED 0.
void gpio_set_direction(const io_t pin, const gpio_direction_t direction)
Set the IO pin as in input or output.
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_onoff(const int led, const int onoff)
void color_led_off(void)
Set color LED 0 to black. Same as color_led_onoff(LED_OFF, LED_OFF, LED_OFF).
void pwm_init(const int pwm, const uint32_t period)
Initializes the PWM channel with the specified period.
void green_led_on(const int led)
Same as green_led_onoff(led, LED_ON). Works in all modes.
void color_led_red_onoff(const int onoff)
Switches on/off the red component of color LED 0.
void leds_init_onoff(void)
Initialize the green LEDs for on/off use.