Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Götz
xmc4500-relax-linux
Commits
10705237
Commit
10705237
authored
Jan 09, 2017
by
Daniel Götz
Browse files
adjusting driver strength and setting pin for measurements
parent
14b8e467
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main.c
View file @
10705237
...
...
@@ -97,7 +97,7 @@ static void command_bch(char *arg) {
CDC_Device_SendString
(
&
VirtualSerial_CDC_Interface
,
"o:start
\r
"
);
CDC_Device_Flush
(
&
VirtualSerial_CDC_Interface
);
P1_0_toggle
();
//
P1_0_toggle();
uint32_t
old_basepri
=
__get_BASEPRI
();
__set_BASEPRI
(
1
<<
(
8
-
__NVIC_PRIO_BITS
));
...
...
@@ -109,14 +109,14 @@ static void command_bch(char *arg) {
XMC_PREFETCH_InvalidateInstructionBuffer
();
timer_reset
();
timer_start
();
P1_3_set
();
gene_main
(
val
);
P1_3_reset
();
timer_stop
();
uint64_t
cycles
=
timer_get
();
__set_BASEPRI
(
old_basepri
);
P1_
0
_toggle
();
//
P1_
1
_toggle();
CDC_Device_SendString
(
&
VirtualSerial_CDC_Interface
,
"o:end "
);
CDC_Device_USBTask
(
&
VirtualSerial_CDC_Interface
);
...
...
@@ -216,6 +216,8 @@ int main(void) {
P1_1_set_mode
(
OUTPUT_PP_GP
);
P1_1_set_driver_strength
(
STRONG
);
P1_3_set_mode
(
OUTPUT_PP_GP
);
P1_3_set_driver_strength
(
WEAK
);
#define BUFFER_SIZE 32
char
buffer
[
BUFFER_SIZE
+
1
];
...
...
@@ -291,4 +293,3 @@ int main(void) {
}
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment