You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
621 B
14 lines
621 B
#include "light_ctrl_service.h"
|
|
zaf_gpio_t rlight;
|
|
zaf_gpio_t glight;
|
|
zaf_gpio_t blight;
|
|
|
|
void LightCtrlService_init() {
|
|
zaf_gpio_init_as_output(&rlight, LED_R_PIN, kxs_gpio_nopull, true, false);
|
|
zaf_gpio_init_as_output(&glight, LED_G_PIN, kxs_gpio_nopull, true, false);
|
|
zaf_gpio_init_as_output(&blight, LED_B_PIN, kxs_gpio_nopull, true, false);
|
|
}
|
|
|
|
void LightCtrlService_RedLight_setState(bool state) { zaf_gpio_write(&rlight, state); }
|
|
void LightCtrlService_BlueLight_setState(bool state) { zaf_gpio_write(&blight, state); }
|
|
void LightCtrlService_GreenLight_setState(bool state) { zaf_gpio_write(&glight, state); }
|