Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
portal-core
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
portal
portal-core
Commits
f9f7a7a3
Commit
f9f7a7a3
authored
13 years ago
by
da1l6
Browse files
Options
Downloads
Patches
Plain Diff
CardReader: Print human readable error message in case of Card ATR error.
CardReader: Change standby message.
parent
dafa7f0f
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
CardReader/main.c
+13
-5
13 additions, 5 deletions
CardReader/main.c
with
13 additions
and
5 deletions
CardReader/main.c
+
13
−
5
View file @
f9f7a7a3
...
@@ -28,7 +28,7 @@ volatile uint16_t host_timeout = HOST_TIMEOUT;
...
@@ -28,7 +28,7 @@ volatile uint16_t host_timeout = HOST_TIMEOUT;
volatile
uint8_t
host_ping
=
1
;
volatile
uint8_t
host_ping
=
1
;
volatile
uint8_t
host_dead
=
0
;
volatile
uint8_t
host_dead
=
0
;
#define DISPLAY_RESET_TIMEOUT
4
00
/*
4
00*10 = 4 sec */
#define DISPLAY_RESET_TIMEOUT
10
00
/*
10
00*10 = 4 sec */
volatile
uint16_t
display_reset_timeout
=
DISPLAY_RESET_TIMEOUT
;
volatile
uint16_t
display_reset_timeout
=
DISPLAY_RESET_TIMEOUT
;
volatile
uint8_t
display_reset
=
1
;
volatile
uint8_t
display_reset
=
1
;
...
@@ -209,7 +209,7 @@ void display_card_status(void){
...
@@ -209,7 +209,7 @@ void display_card_status(void){
return
;
return
;
}
}
lcd_write_string_sz_P
(
PSTR
(
"
PortalCardReader
"
));
lcd_write_string_sz_P
(
PSTR
(
"
Warpzone Portal
"
));
lcd_set_pos
(
0
,
1
);
lcd_set_pos
(
0
,
1
);
switch
(
card_status
){
switch
(
card_status
){
case
CARD_STATUS_REMOVED
:
case
CARD_STATUS_REMOVED
:
...
@@ -222,9 +222,17 @@ void display_card_status(void){
...
@@ -222,9 +222,17 @@ void display_card_status(void){
lcd_write_string_sz_P
(
PSTR
(
"Card Ready"
));
lcd_write_string_sz_P
(
PSTR
(
"Card Ready"
));
break
;
break
;
case
CARD_STATUS_ERROR
:
case
CARD_STATUS_ERROR
:
lcd_write_string_sz_P
(
PSTR
(
"Card Error 0x"
));
// lcd_write_string_sz_P(PSTR("Card Error 0x"));
lcd_write_byte_hex
(
card_atr_error
);
// lcd_write_byte_hex(card_atr_error);
lcd_write_char
(
' '
);
// lcd_write_char(' ');
switch
(
card_atr_error
){
case
ERR_ATR_TIMEOUT
:
lcd_write_string_sz_P
(
PSTR
(
"Card Mute"
));
break
;
case
ERR_TOO_MANY_ATR_INTERFACE_BYTES
:
lcd_write_string_sz_P
(
PSTR
(
"ATR too long"
));
break
;
case
ERR_ATR_CHECKSUM_FAIL
:
lcd_write_string_sz_P
(
PSTR
(
"ATR chksum fail"
));
break
;
case
ERR_PROTOCOL_NOT_SUPPORTED
:
lcd_write_string_sz_P
(
PSTR
(
"Card unspported"
));
break
;
case
ERR_ATR_CARD_REMOVED
:
lcd_write_string_sz_P
(
PSTR
(
"Card removed"
));
break
;
default:
lcd_write_string_sz_P
(
PSTR
(
"Unknown error "
));
lcd_write_byte_hex
(
card_atr_error
);
break
;
}
break
;
break
;
}
}
// lcd_write_char('C');
// lcd_write_char('C');
...
...
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