board/twinkie/simpletrace.c: Format with clang-format
BRANCH=none
TEST=none
@@ -55,14 +55,10 @@ static const char * const data_msg_name[] = {
};
static const char *const svdm_cmd_name[] = {
- [CMD_DISCOVER_IDENT] = "DISCID",
- [CMD_DISCOVER_SVID] = "DISCSVID",
- [CMD_DISCOVER_MODES] = "DISCMODE",
- [CMD_ENTER_MODE] = "ENTER",
- [CMD_EXIT_MODE] = "EXIT",
- [CMD_ATTENTION] = "ATTN",
- [CMD_DP_STATUS] = "DPSTAT",
- [CMD_DP_CONFIG] = "DPCFG",
+ [CMD_DISCOVER_IDENT] = "DISCID", [CMD_DISCOVER_SVID] = "DISCSVID",
+ [CMD_DISCOVER_MODES] = "DISCMODE", [CMD_ENTER_MODE] = "ENTER",
+ [CMD_EXIT_MODE] = "EXIT", [CMD_ATTENTION] = "ATTN",
+ [CMD_DP_STATUS] = "DPSTAT", [CMD_DP_CONFIG] = "DPCFG",
};
static const char *const svdm_cmdt_name[] = {
@@ -119,8 +115,8 @@ static void print_packet(int head, uint32_t *payload)
}
name = cnt ? data_msg_name[typ] : ctrl_msg_name[typ];
prole = head & (PD_ROLE_SOURCE << 8) ? "SRC" : "SNK";
- ccprintf("%pT %s/%d [%04x]%s",
- PRINTF_TIMESTAMP_NOW, prole, id, head, name);
+ ccprintf("%pT %s/%d [%04x]%s", PRINTF_TIMESTAMP_NOW, prole, id, head,
+ name);
if (!cnt) { /* Control message : we are done */
ccputs("\n");
return;
@@ -177,18 +173,19 @@ static void rx_event(void)
rx_edge_ts[i][rx_edge_ts_idx[i]].val = get_time().val;
next_idx = (rx_edge_ts_idx[i] ==
PD_RX_TRANSITION_COUNT - 1) ?
- 0 : rx_edge_ts_idx[i] + 1;
+ 0 :
+ rx_edge_ts_idx[i] + 1;
/*
* If we have seen enough edges in a certain amount of
* time, then trigger RX start.
*/
if ((rx_edge_ts[i][rx_edge_ts_idx[i]].val -
- rx_edge_ts[i][next_idx].val)
- < PD_RX_TRANSITION_WINDOW) {
+ rx_edge_ts[i][next_idx].val) <
+ PD_RX_TRANSITION_WINDOW) {
/* acquire the message only on the active CC */
- STM32_COMP_CSR &= ~(i ? STM32_COMP_CMP1EN
- : STM32_COMP_CMP2EN);
+ STM32_COMP_CSR &= ~(i ? STM32_COMP_CMP1EN :
+ STM32_COMP_CMP2EN);
/* start sampling */
pd_rx_start(0);
/*
