]> git.sur5r.net Git - openocd/commitdiff
remove in_handler usage
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 7 May 2009 13:54:41 +0000 (13:54 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 7 May 2009 13:54:41 +0000 (13:54 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1645 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/embeddedice.c

index cfe4ed7c8a74194bd806264935d5dc1acc123084..aa5aacec4c529aa685b28ca618e73ac19e9452e3 100644 (file)
@@ -251,34 +251,34 @@ int embeddedice_read_reg_w_check(reg_t *reg, u8* check_value, u8* check_mask)
        fields[0].tap = ice_reg->jtag_info->tap;
        fields[0].num_bits = 32;
        fields[0].out_value = reg->value;
-       
+
        fields[0].in_value = NULL;
-       
-       
+
+
        fields[0].in_handler = NULL;
-       
+
 
        fields[1].tap = ice_reg->jtag_info->tap;
        fields[1].num_bits = 5;
        fields[1].out_value = field1_out;
        buf_set_u32(fields[1].out_value, 0, 5, reg_addr);
-       
+
        fields[1].in_value = NULL;
-       
-       
+
+
        fields[1].in_handler = NULL;
-       
+
 
        fields[2].tap = ice_reg->jtag_info->tap;
        fields[2].num_bits = 1;
        fields[2].out_value = field2_out;
        buf_set_u32(fields[2].out_value, 0, 1, 0);
-       
+
        fields[2].in_value = NULL;
-       
-       
+
+
        fields[2].in_handler = NULL;
-       
+
 
        jtag_add_dr_scan(3, fields, TAP_INVALID);
 
@@ -313,34 +313,23 @@ int embeddedice_receive(arm_jtag_t *jtag_info, u32 *data, u32 size)
        fields[0].tap = jtag_info->tap;
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
-       
-       fields[0].in_value = NULL;
-       
-       
+       u8 tmp[4];
+       fields[0].in_value = tmp;
        fields[0].in_handler = NULL;
-       
 
        fields[1].tap = jtag_info->tap;
        fields[1].num_bits = 5;
        fields[1].out_value = field1_out;
        buf_set_u32(fields[1].out_value, 0, 5, embeddedice_reg_arch_info[EICE_COMMS_DATA]);
-       
        fields[1].in_value = NULL;
-       
-       
        fields[1].in_handler = NULL;
-       
 
        fields[2].tap = jtag_info->tap;
        fields[2].num_bits = 1;
        fields[2].out_value = field2_out;
        buf_set_u32(fields[2].out_value, 0, 1, 0);
-       
        fields[2].in_value = NULL;
-       
-       
        fields[2].in_handler = NULL;
-       
 
        jtag_add_dr_scan(3, fields, TAP_INVALID);
 
@@ -352,9 +341,9 @@ int embeddedice_receive(arm_jtag_t *jtag_info, u32 *data, u32 size)
                if (size == 1)
                        buf_set_u32(fields[1].out_value, 0, 5, embeddedice_reg_arch_info[EICE_COMMS_CTRL]);
 
-               fields[0].in_handler = arm_jtag_buf_to_u32; /* deprecated! invoke this from user code! */
-               fields[0].in_handler_priv = data;
-               jtag_add_dr_scan(3, fields, TAP_INVALID);
+               jtag_add_dr_scan_now(3, fields, TAP_INVALID);
+
+               *data = le_to_h_u32(tmp);
 
                data++;
                size--;
@@ -430,34 +419,34 @@ int embeddedice_send(arm_jtag_t *jtag_info, u32 *data, u32 size)
        fields[0].tap = jtag_info->tap;
        fields[0].num_bits = 32;
        fields[0].out_value = field0_out;
-       
+
        fields[0].in_value = NULL;
-       
-       
+
+
        fields[0].in_handler = NULL;
-       
+
 
        fields[1].tap = jtag_info->tap;
        fields[1].num_bits = 5;
        fields[1].out_value = field1_out;
        buf_set_u32(fields[1].out_value, 0, 5, embeddedice_reg_arch_info[EICE_COMMS_DATA]);
-       
+
        fields[1].in_value = NULL;
-       
-       
+
+
        fields[1].in_handler = NULL;
-       
+
 
        fields[2].tap = jtag_info->tap;
        fields[2].num_bits = 1;
        fields[2].out_value = field2_out;
        buf_set_u32(fields[2].out_value, 0, 1, 1);
-       
+
        fields[2].in_value = NULL;
-       
-       
+
+
        fields[2].in_handler = NULL;
-       
+
 
        while (size > 0)
        {
@@ -499,34 +488,34 @@ int embeddedice_handshake(arm_jtag_t *jtag_info, int hsbit, u32 timeout)
        fields[0].tap = jtag_info->tap;
        fields[0].num_bits = 32;
        fields[0].out_value = NULL;
-       
+
        fields[0].in_value = field0_in;
-       
-       
+
+
        fields[0].in_handler = NULL;
-       
+
 
        fields[1].tap = jtag_info->tap;
        fields[1].num_bits = 5;
        fields[1].out_value = field1_out;
        buf_set_u32(fields[1].out_value, 0, 5, embeddedice_reg_arch_info[EICE_COMMS_CTRL]);
-       
+
        fields[1].in_value = NULL;
-       
-       
+
+
        fields[1].in_handler = NULL;
-       
+
 
        fields[2].tap = jtag_info->tap;
        fields[2].num_bits = 1;
        fields[2].out_value = field2_out;
        buf_set_u32(fields[2].out_value, 0, 1, 0);
-       
+
        fields[2].in_value = NULL;
-       
-       
+
+
        fields[2].in_handler = NULL;
-       
+
 
        jtag_add_dr_scan(3, fields, TAP_INVALID);
        gettimeofday(&lap, NULL);