char lcd
This commit is contained in:
+1
-1
Submodule components/blk_box_lib updated: 0b79eb8399...b3bcb4108d
+10
-1
@@ -10,12 +10,19 @@
|
|||||||
#include "blk_box_drivers/i2c.h"
|
#include "blk_box_drivers/i2c.h"
|
||||||
#include "blk_box_drivers/inputs.hpp"
|
#include "blk_box_drivers/inputs.hpp"
|
||||||
#include "blk_box_drivers/leds.hpp"
|
#include "blk_box_drivers/leds.hpp"
|
||||||
|
#include "blk_box_drivers/char_lcd.hpp"
|
||||||
|
#include "blk_box_drivers/helpers.hpp"
|
||||||
|
|
||||||
extern "C" void app_main(void) {
|
extern "C" void app_main(void) {
|
||||||
BlkBoxInitConfig blk_box_cfg = {};
|
BlkBoxInitConfig blk_box_cfg = {};
|
||||||
init_blk_box(blk_box_cfg);
|
init_blk_box(blk_box_cfg);
|
||||||
|
|
||||||
printf("Hello, Blk Box!\n");
|
LCDController::set_backlight(true);
|
||||||
|
|
||||||
|
lcd_do_splash();
|
||||||
|
|
||||||
|
LCDController::set_resting_cursor_mode(CursorMode::Show);
|
||||||
|
LCDController::set_resting_cursor_pos(0, 0);
|
||||||
|
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
|
|
||||||
@@ -31,8 +38,10 @@ extern "C" void app_main(void) {
|
|||||||
LEDController::flush();
|
LEDController::flush();
|
||||||
} else if (b == Button::RED) {
|
} else if (b == Button::RED) {
|
||||||
i = (i + 1) % LED_INDICATOR_COUNT;
|
i = (i + 1) % LED_INDICATOR_COUNT;
|
||||||
|
LCDController::set_resting_cursor_pos(0, i % 20);
|
||||||
} else if (b == Button::BLUE) {
|
} else if (b == Button::BLUE) {
|
||||||
i = (i + LED_INDICATOR_COUNT - 1) % LED_INDICATOR_COUNT;
|
i = (i + LED_INDICATOR_COUNT - 1) % LED_INDICATOR_COUNT;
|
||||||
|
LCDController::set_resting_cursor_pos(0, i % 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user