Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART_17-18
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
bbartels
MicroCART_17-18
Commits
0be267f4
Commit
0be267f4
authored
8 years ago
by
dawehr
Browse files
Options
Downloads
Patches
Plain Diff
Changed names of benchmark test macros
parent
c64e014c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
quad/sw/modular_quad_pid/src/communication.c
+12
-0
12 additions, 0 deletions
quad/sw/modular_quad_pid/src/communication.c
quad/sw/modular_quad_pid/src/main.c
+1
-1
1 addition, 1 deletion
quad/sw/modular_quad_pid/src/main.c
with
13 additions
and
1 deletion
quad/sw/modular_quad_pid/src/communication.c
+
12
−
0
View file @
0be267f4
...
...
@@ -14,6 +14,8 @@
#define MAX_PACKET_SIZE 256
#define UART_BUF_SIZE (((BAUD_RATE * (DESIRED_USEC_PER_LOOP / 1000) / 1000) / 10) + MAX_PACKET_SIZE + 128)
#define INTERRUPT_BENCHMARK
// Declaration of interrupt handler
void
Handler
(
void
*
CallBackRef
,
u32
Event
,
unsigned
int
EventData
);
...
...
@@ -144,12 +146,22 @@ void uart_interrupt_handler(XUartPs *InstancePtr) {
u32
CsrRegister
=
XUartPs_ReadReg
(
InstancePtr
->
Config
.
BaseAddress
,
XUARTPS_SR_OFFSET
);
#ifdef INTERRUPT_BENCHMARK
u32
start_time
=
timer_get_count
();
#endif
while
(
0
==
(
CsrRegister
&
XUARTPS_SR_RXEMPTY
)
&&
!
uart_buff_full
())
{
u8
byte
=
XUartPs_ReadReg
(
InstancePtr
->
Config
.
BaseAddress
,
XUARTPS_FIFO_OFFSET
);
uart_buff_put_byte
(
byte
);
CsrRegister
=
XUartPs_ReadReg
(
InstancePtr
->
Config
.
BaseAddress
,
XUARTPS_SR_OFFSET
);
}
#ifdef INTERRUPT_BENCHMARK
u32
end_time
=
timer_get_count
();
u32
duration
=
end_time
-
start_time
;
send_data
(
0
,
0
,
0
,
(
char
*
)
&
duration
,
8
);
#endif
// Clear the interrupt status.
XUartPs_WriteReg
(
InstancePtr
->
Config
.
BaseAddress
,
XUARTPS_ISR_OFFSET
,
IsrStatus
);
...
...
This diff is collapsed.
Click to expand it.
quad/sw/modular_quad_pid/src/main.c
+
1
−
1
View file @
0be267f4
...
...
@@ -17,7 +17,7 @@
#include
"update_gui.h"
#define BENCH_TEST
#define UART_BENCHMARK
//
#define UART_BENCHMARK
int
main
()
{
...
...
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