summaryrefslogtreecommitdiff
path: root/shared/trace.c
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2018-07-17 15:43:26 +0200
committerjaseg <git@jaseg.net>2018-07-17 15:43:26 +0200
commit6df66b77ba5b27bce5630694742f2dac57b8d3eb (patch)
treefc14370fdea41b6d7a672758aa89886b9107f78c /shared/trace.c
parent90ce052d82daa86e1e86ab4dac7fbba0cdda8680 (diff)
downloadolsndot-6df66b77ba5b27bce5630694742f2dac57b8d3eb.tar.gz
olsndot-6df66b77ba5b27bce5630694742f2dac57b8d3eb.tar.bz2
olsndot-6df66b77ba5b27bce5630694742f2dac57b8d3eb.zip
Isolate usb-serial-rs485 tree
Diffstat (limited to 'shared/trace.c')
-rw-r--r--shared/trace.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/shared/trace.c b/shared/trace.c
deleted file mode 100644
index 9e05d9a..0000000
--- a/shared/trace.c
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <stdint.h>
-#include <libopencm3/cm3/common.h>
-#include <libopencm3/cm3/memorymap.h>
-#include <libopencm3/cm3/itm.h>
-#include "trace.h"
-
-void trace_send_blocking8(int stimulus_port, char c) {
- if (!(ITM_TER[0] & (1<<stimulus_port))) {
- return;
- }
- while (!(ITM_STIM8(stimulus_port) & ITM_STIM_FIFOREADY))
- ;
- ITM_STIM8(stimulus_port) = c;
-}
-
-void trace_send8(int stimulus_port, char val) {
- if (!(ITM_TER[0] & (1<<stimulus_port))) {
- return;
- }
- ITM_STIM8(stimulus_port) = val;
-}
-
-void trace_send_blocking16(int stimulus_port, uint16_t val) {
- if (!(ITM_TER[0] & (1<<stimulus_port))) {
- return;
- }
- while (!(ITM_STIM16(stimulus_port) & ITM_STIM_FIFOREADY))
- ;
- ITM_STIM16(stimulus_port) = val;
-}
-
-void trace_send16(int stimulus_port, uint16_t val) {
- if (!(ITM_TER[0] & (1<<stimulus_port))) {
- return;
- }
- ITM_STIM16(stimulus_port) = val;
-}
-
-
-void trace_send_blocking32(int stimulus_port, uint32_t val) {
- if (!(ITM_TER[0] & (1<<stimulus_port))) {
- return;
- }
- while (!(ITM_STIM32(stimulus_port) & ITM_STIM_FIFOREADY))
- ;
- ITM_STIM32(stimulus_port) = val;
-}
-
-void trace_send32(int stimulus_port, uint32_t val) {
- if (!(ITM_TER[0] & (1<<stimulus_port))) {
- return;
- }
- ITM_STIM32(stimulus_port) = val;
-}