[Style] Stylefix sweep over the whole codebase.

This commit is contained in:
Piotr Esden-Tempski
2015-12-14 22:57:15 +01:00
parent 1f6fd11dd9
commit b1049f9a6f
39 changed files with 445 additions and 359 deletions

View File

@@ -4,32 +4,34 @@
#include <libopencm3/cm3/itm.h>
#include "trace.h"
void trace_send_blocking8(int stimulus_port, char c) {
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))
;
while (!(ITM_STIM8(stimulus_port) & ITM_STIM_FIFOREADY));
ITM_STIM8(stimulus_port) = c;
}
void trace_send8(int stimulus_port, char val) {
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) {
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))
;
while (!(ITM_STIM16(stimulus_port) & ITM_STIM_FIFOREADY));
ITM_STIM16(stimulus_port) = val;
}
void trace_send16(int stimulus_port, uint16_t val) {
void trace_send16(int stimulus_port, uint16_t val)
{
if (!(ITM_TER[0] & (1<<stimulus_port))) {
return;
}
@@ -37,16 +39,17 @@ void trace_send16(int stimulus_port, uint16_t val) {
}
void trace_send_blocking32(int stimulus_port, uint32_t 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))
;
while (!(ITM_STIM32(stimulus_port) & ITM_STIM_FIFOREADY));
ITM_STIM32(stimulus_port) = val;
}
void trace_send32(int stimulus_port, uint32_t val) {
void trace_send32(int stimulus_port, uint32_t val)
{
if (!(ITM_TER[0] & (1<<stimulus_port))) {
return;
}

View File

@@ -1,4 +1,4 @@
/*
/*
* File: trace.h
* Author: karlp
*