samples/basic/fade_led: Add support for HiFive 1
Blinks the blue channel of the RGB LED Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
This commit is contained in:
parent
ee680a9ac6
commit
0ebb98ff1f
1 changed files with 4 additions and 0 deletions
|
@ -38,6 +38,10 @@
|
||||||
/* get the defines from dt (based on alias 'pwm-led0') */
|
/* get the defines from dt (based on alias 'pwm-led0') */
|
||||||
#define PWM_DRIVER PWM_LED0_PWM_CONTROLLER
|
#define PWM_DRIVER PWM_LED0_PWM_CONTROLLER
|
||||||
#define PWM_CHANNEL PWM_LED0_PWM_CHANNEL
|
#define PWM_CHANNEL PWM_LED0_PWM_CHANNEL
|
||||||
|
#elif defined(CONFIG_BOARD_HIFIVE1)
|
||||||
|
/* Blink the blue channel of the RGB LED */
|
||||||
|
#define PWM_DRIVER LED1_PWM_CONTROLLER
|
||||||
|
#define PWM_CHANNEL LED1_PWM_CHANNEL
|
||||||
#else
|
#else
|
||||||
#error "Choose supported PWM driver"
|
#error "Choose supported PWM driver"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue