diff options
author | Maël Gassmann <mael.gassmann@students.bfh.ch> | 2024-09-28 18:29:46 +0200 |
---|---|---|
committer | Maël Gassmann <mael.gassmann@students.bfh.ch> | 2024-09-28 18:29:46 +0200 |
commit | 62f508b029c4cc6d0819eb5b3e06353c902be2be (patch) | |
tree | 9fde7c2d47b7a59be9ae4edc2e64924bb456d969 /components/screen | |
parent | 129a2650c22915bc789b6bdbc9d360bd97059e2f (diff) |
[+] Using screen as progress indicator when booting
Diffstat (limited to 'components/screen')
-rw-r--r-- | components/screen/screen.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/components/screen/screen.c b/components/screen/screen.c index 45f89f7..92f55de 100644 --- a/components/screen/screen.c +++ b/components/screen/screen.c @@ -50,25 +50,25 @@ void configure_screen(struct Screen* screen) printf("I2C MCP Configured!\n"); - screen->nixies[0].digit = 0; + screen->nixies[0].digit = 9; screen->nixies[0].reg = REG_GPIOA; screen->nixies[0].C = N0_P0; screen->nixies[0].B = N0_P1; screen->nixies[0].D = N0_P2; screen->nixies[0].A = N0_P3; - screen->nixies[1].digit = 0; + screen->nixies[1].digit = 9; screen->nixies[1].reg = REG_GPIOA; screen->nixies[1].C = N1_P0; screen->nixies[1].B = N1_P1; screen->nixies[1].D = N1_P2; screen->nixies[1].A = N1_P3; - screen->nixies[2].digit = 0; + screen->nixies[2].digit = 9; screen->nixies[2].reg = REG_GPIOB; screen->nixies[2].C = N2_P0; screen->nixies[2].B = N2_P1; screen->nixies[2].D = N2_P2; screen->nixies[2].A = N2_P3; - screen->nixies[3].digit = 0; + screen->nixies[3].digit = 9; screen->nixies[3].reg = REG_GPIOB; screen->nixies[3].C = N3_P0; screen->nixies[3].B = N3_P1; @@ -180,6 +180,7 @@ void display(struct Screen* screen, char digits[4]) { for (uint8_t i = 0; i < 4; ++i) { uint8_t digit = digits[i] - '0'; + printf("%i", digit); if (screen->nixies[i].digit != digit){ screen->nixies[i].digit = digit; set_digit(screen->mcp, &(screen->nixies[i])); // Call set_digit function |