Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SolderStationMk2_SW
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Flax
SolderStationMk2_SW
Commits
25ef5649
Commit
25ef5649
authored
1 year ago
by
Flax
Browse files
Options
Downloads
Patches
Plain Diff
STM32L011K4 : Changed digit refresh delay management.
parent
c51c371b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SolderStationMk2_NucleoSTM32L011K4/Core/Src/display.c
+14
-3
14 additions, 3 deletions
SolderStationMk2_NucleoSTM32L011K4/Core/Src/display.c
with
14 additions
and
3 deletions
SolderStationMk2_NucleoSTM32L011K4/Core/Src/display.c
+
14
−
3
View file @
25ef5649
...
...
@@ -17,6 +17,8 @@
#define cDISPMaxDigit (3U)
#define cDISPValueMax (999U)
#define cDISPSegSwitchDelay (10U)
// Division-less decade separation : https://www.baghli.com/hex2dec.php
#define cDISPDecadeSeparation100Num ((uint32_t)5243) // m
#define cDISPDecadeSeparation100Denom ((uint32_t)65536*8) // 2^s * 2^W
...
...
@@ -50,6 +52,7 @@ const static uint8_t cDISPSevenSegmentTable_U8A[] =
static
uint8_t
DISPSevenSegBuffer_U8A
[
cDISPMaxDigit
];
static
uint8_t
DISPSevenSegSelect_U8
;
static
bool
DISPEnableDisplay_B
;
static
uint16_t
DISPSegSwitchDelayCnt_U16
;
// ===========================
// Local functions prototypes
...
...
@@ -146,13 +149,21 @@ char DISPNumberToChar (uint8_t number_u8)
void
DISPRefresh
(
void
)
{
// Switch active digit
if
(
DISPSe
venSegSelec
t_U
8
<
cDISP
MaxDigit
)
if
(
DISPSe
gSwitchDelayCn
t_U
16
<
cDISP
SegSwitchDelay
)
{
DISPSe
venSegSelec
t_U
8
++
;
DISPSe
gSwitchDelayCn
t_U
16
++
;
}
else
{
DISPSevenSegSelect_U8
=
0U
;
DISPSegSwitchDelayCnt_U16
=
0
;
if
(
DISPSevenSegSelect_U8
<
cDISPMaxDigit
)
{
DISPSevenSegSelect_U8
++
;
}
else
{
DISPSevenSegSelect_U8
=
0U
;
}
}
// Disable display before changing value
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment