- Fixes '=' whitespace
[fw/openocd] / src / target / etb.c
index 633c5aa657929657502f249fd38c23d7557d14fe..979d7a70db87bc824e159628d0d5ae74531faa40 100644 (file)
@@ -49,7 +49,7 @@ static int etb_set_instr(etb_t *etb, uint32_t new_instr)
        jtag_tap_t *tap;
 
        tap = etb->tap;
-       if (tap==NULL)
+       if (tap == NULL)
                return ERROR_FAIL;
 
        if (buf_get_u32(tap->cur_instr, 0, tap->ir_length) != new_instr)
@@ -158,9 +158,10 @@ static int etb_get_reg(reg_t *reg)
 }
 
 
-static void etb_getbuf(uint8_t *in)
+static void etb_getbuf(jtag_callback_data_t arg)
 {
-       *((uint32_t *)in)=buf_get_u32(in, 0, 32);
+  uint8_t *in = (uint8_t *)arg;
+       *((uint32_t *)in) = buf_get_u32(in, 0, 32);
 }
 
 
@@ -206,7 +207,7 @@ static int etb_read_ram(etb_t *etb, uint32_t *data, int num_frames)
                fields[0].in_value = (uint8_t *)(data+i);
                jtag_add_dr_scan(3, fields, jtag_get_end_state());
 
-               jtag_add_callback(etb_getbuf, (uint8_t *)(data+i));
+               jtag_add_callback(etb_getbuf, (jtag_callback_data_t)(data+i));
        }
 
        jtag_execute_queue();
@@ -223,7 +224,7 @@ int etb_read_reg_w_check(reg_t *reg, uint8_t* check_value, uint8_t* check_mask)
        uint8_t reg_addr = etb_reg->addr & 0x7f;
        scan_field_t fields[3];
 
-       LOG_DEBUG("%i", etb_reg->addr);
+       LOG_DEBUG("%i", (int)(etb_reg->addr));
 
        jtag_set_end_state(TAP_IDLE);
        etb_scann(etb_reg->etb, 0x0);
@@ -312,7 +313,7 @@ int etb_write_reg(reg_t *reg, uint32_t value)
        uint8_t reg_addr = etb_reg->addr & 0x7f;
        scan_field_t fields[3];
 
-       LOG_DEBUG("%i: 0x%8.8x", etb_reg->addr, value);
+       LOG_DEBUG("%i: 0x%8.8" PRIx32 "", (int)(etb_reg->addr), value);
 
        jtag_set_end_state(TAP_IDLE);
        etb_scann(etb_reg->etb, 0x0);
@@ -469,7 +470,7 @@ static trace_status_t etb_status(etm_context_t *etm_ctx)
 
                        if (etb_timeout == 0)
                        {
-                               LOG_ERROR("AcqComp set but DFEmpty won't go high, ETB status: 0x%x",
+                               LOG_ERROR("AcqComp set but DFEmpty won't go high, ETB status: 0x%" PRIx32 "",
                                        buf_get_u32(etb_status_reg->value, 0, etb_status_reg->size));
                        }