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:
Nathaniel Graff 2018-12-07 10:26:43 -08:00 committed by Maureen Helm
commit 0ebb98ff1f

View file

@ -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