Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs452Trainee
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Tom Feng
cs452Trainee
Commits
31407fd8
There was an error fetching the commit references. Please try again later.
Commit
31407fd8
authored
6 years ago
by
Tom Feng
Browse files
Options
Downloads
Patches
Plain Diff
base program test
parent
b51a6616
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/event-itr.c
+9
-1
9 additions, 1 deletion
lib/event-itr.c
with
9 additions
and
1 deletion
lib/event-itr.c
+
9
−
1
View file @
31407fd8
...
...
@@ -67,14 +67,22 @@ int doAwaitEvent(KernelStruct* Colonel, int EventID) {
void
UART1Event
(
int
*
Uart1Status
,
char
*
bTX
,
char
*
bRX
){
int
*
Uart1Flag
=
(
int
*
)(
UART1_BASE
|
UART_FLAG_OFFSET
);
int
*
Uart1IDClr
=
(
int
*
)(
UART1_BASE
|
UART_INTR_OFFSET
);
int
intClr
=
*
Uart1IDClr
;
int
flagval
=
*
Uart1Flag
;
*
bTX
=
(
*
Uart1Status
&
(
1
<<
5
|
1
<<
3
));
*
bRX
=
(
*
Uart1Status
&
(
1
<<
4
));
// turn off whoever is on
bwprintf
(
COM2
,
"UART1E:
UART1Ctrl
%d
\n\r
"
,((
*
Uart1Status
)
<<
24
)
>>
24
);
bwprintf
(
COM2
,
"UART1E:
%d
%d
\n\r
"
,((
*
Uart1Status
)
<<
24
)
>>
24
,(
intClr
<<
28
)
>>
28
);
if
(
flagval
&
TXFE_MASK
)
*
Uart1Status
&=
~
(
1
<<
5
);
if
(
flagval
&
CTS_MASK
)
*
Uart1Status
&=
~
(
1
<<
3
);
if
(
flagval
&
RXFF_MASK
)
*
Uart1Status
&=
~
(
1
<<
4
);
/*
if(flagval & TXFE_MASK) *Uart1Status &= ~(1<<5);
if(flagval & CTS_MASK) *Uart1Status &= ~(1<<3);
if(flagval & RXFF_MASK) *Uart1Status &= ~(1<<4);
*/
bwprintf
(
COM2
,
"UART1E: %d %d
\n\r
"
,((
*
Uart1Status
)
<<
24
)
>>
24
,(
intClr
<<
28
)
>>
28
);
}
void
ProcessEvent
(
KernelStruct
*
Colonel
,
int
EventID
)
{
//TODOTODO when use this
...
...
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