Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zephyr Firmware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kestrel Collaboration
Kestrel Firmware
Zephyr Firmware
Commits
bccea670
Commit
bccea670
authored
Aug 22, 2022
by
Raptor Engineering Development Team
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display POST codes during IPL on Arctic Tern alphanumeric display instead of dot points
parent
db53e58d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
4 deletions
+58
-4
kestrel/src/kestrel.c
kestrel/src/kestrel.c
+58
-4
No files found.
kestrel/src/kestrel.c
View file @
bccea670
// © 2020 - 202
1
Raptor Engineering, LLC
// © 2020 - 202
2
Raptor Engineering, LLC
//
// Released under the terms of the GPL v3
// See the LICENSE file for full details
...
...
@@ -358,8 +358,11 @@ static void display_character(char character, int dp)
// Switch display into alphanumeric mode
gpio1_out_write
(
gpio1_out_read
()
|
(
0x1
<<
18
));
// Write character
gpio2_out_write
((
gpio2_out_read
()
&
~
0xff
)
|
(
character
&
0xff
));
if
(
host_power_status
!=
HOST_POWER_STATUS_IPLING
)
{
// Write character
gpio2_out_write
((
gpio2_out_read
()
&
~
0xff
)
|
(
character
&
0xff
));
}
}
static
void
host_power_status_changed
(
void
)
...
...
@@ -391,6 +394,47 @@ static void set_led_bank_display(uint8_t bitfield)
gpio1_out_write
((
gpio1_out_read
()
&
~
0xf
)
|
(
bitfield
&
0xf
));
}
static
void
set_led_post_code_alphanumeric_display
(
uint16_t
value
)
{
uint32_t
dword
;
// Convert POST code to string
unsigned
char
post_code_string
[
5
];
snprintf
(
post_code_string
,
5
,
"%02d%02d"
,
(
value
>>
8
)
&
0xff
,
value
&
0xff
);
if
((
host_power_status
==
HOST_POWER_STATUS_IPLING
)
&&
(
value
!=
0x0
))
{
// Display value on the alphanumeric LED display
dword
=
gpio2_out_read
();
dword
&=
~
0xffffffff
;
dword
|=
post_code_string
[
0
]
<<
24
;
dword
|=
post_code_string
[
1
]
<<
16
;
dword
|=
post_code_string
[
2
]
<<
8
;
dword
|=
post_code_string
[
3
];
gpio2_out_write
(
dword
);
// Set decimal point
gpio1_out_write
((
gpio1_out_read
()
&
~
0xf
)
|
0x2
);
}
else
{
// Clear middle two segments when IPL is not in progress
dword
=
gpio2_out_read
();
dword
&=
~
0xffffffff
;
dword
|=
(
' '
<<
24
)
|
(
' '
<<
16
)
|
(
' '
<<
8
)
|
' '
;
gpio2_out_write
(
dword
);
// Clear decimal point
gpio1_out_write
(
gpio1_out_read
()
&
~
0xf
);
// Ensure upper power status character is rewritten
host_power_status_changed
();
// Ensure lower host status character is rewritten
display_character
(
'0'
+
2
+
host_power_status
,
0
);
// STATUS CODE
}
}
static
void
display_post_code
(
uint16_t
post_code
)
{
uint8_t
host_status_led_post_code
;
...
...
@@ -401,12 +445,14 @@ static void display_post_code(uint16_t post_code)
{
// IPL complete!
set_led_bank_display
(
0
);
set_led_post_code_alphanumeric_display
(
0
);
i2c_write_register_byte
((
uint8_t
*
)
P9PS_I2C_MASTER_BASE_ADDR
,
HOST_PLATFORM_FPGA_I2C_ADDRESS
,
HOST_PLATFORM_FPGA_I2C_REG_STA_LED
,
0x00
);
}
else
if
(
post_code
==
0x0
)
{
// System offline
set_led_bank_display
(
0
);
set_led_post_code_alphanumeric_display
(
0
);
i2c_write_register_byte
((
uint8_t
*
)
P9PS_I2C_MASTER_BASE_ADDR
,
HOST_PLATFORM_FPGA_I2C_ADDRESS
,
HOST_PLATFORM_FPGA_I2C_REG_STA_LED
,
0x00
);
}
else
{
...
...
@@ -440,7 +486,15 @@ static void display_post_code(uint16_t post_code)
default:
host_status_led_post_code
=
0
;
}
set_led_bank_display
(
led_post_code
);
// Only one way to display the POST codes is strictly necessary...
if
(
0
)
{
set_led_bank_display
(
led_post_code
);
}
else
{
set_led_post_code_alphanumeric_display
(
post_code
);
}
i2c_write_register_byte
((
uint8_t
*
)
P9PS_I2C_MASTER_BASE_ADDR
,
HOST_PLATFORM_FPGA_I2C_ADDRESS
,
HOST_PLATFORM_FPGA_I2C_REG_STA_LED
,
0x80
|
host_status_led_post_code
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment