-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update dashboard validation * Add conversion factor, fix private function * lint * update lint --------- Co-authored-by: Mitchell Ostler <[email protected]>
- Loading branch information
1 parent
737ff7d
commit 7289afd
Showing
6 changed files
with
184 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
#pragma once | ||
#include "gpio.h" | ||
|
||
// Functions interact with 7 segment display | ||
// Initializes all the gpios necessary for 7 segment display operation and sets both integers and | ||
// floats to the display | ||
// Functions interact with three 7 segment displays | ||
// Initializes all the gpios necessary for three 7 segment displays operation and sets both integers | ||
// and floats to the displays | ||
|
||
typedef struct SegDisplay { | ||
const GpioAddress A; | ||
const GpioAddress B; | ||
const GpioAddress C; | ||
const GpioAddress D; | ||
const GpioAddress DP; | ||
const GpioAddress A1; | ||
const GpioAddress B1; | ||
const GpioAddress C1; | ||
const GpioAddress D1; | ||
const GpioAddress A2; | ||
const GpioAddress B2; | ||
const GpioAddress C2; | ||
const GpioAddress D2; | ||
const GpioAddress A3; | ||
const GpioAddress B3; | ||
const GpioAddress C3; | ||
const GpioAddress D3; | ||
const GpioAddress DP; | ||
const GpioAddress Digit1; | ||
const GpioAddress Digit2; | ||
const GpioAddress Digit3; | ||
} SegDisplay; | ||
|
||
// Initializes input and display GPIOs | ||
StatusCode seg_display_init(SegDisplay *display); | ||
StatusCode seg_displays_init(SegDisplay *display); | ||
|
||
// Sets an integer value onto the display with a max value of 999 | ||
StatusCode seg_display_set_int(SegDisplay *display, uint16_t val); | ||
StatusCode seg_displays_set_int(SegDisplay *display, uint16_t val1, uint16_t val2, uint16_t val3); | ||
|
||
// Sets a single digit decimal value onto the display with a max value of 99.9 | ||
StatusCode seg_display_set_float(SegDisplay *display, float val); | ||
// Sets a decimal value onto the display for val1, and integer value for val2 and val3 | ||
StatusCode seg_displays_set_float(SegDisplay *display, float val1, uint16_t val2, uint16_t val3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.