OpenOCD
minidriver_imp.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 /***************************************************************************
4  * Copyright (C) 2005 by Dominic Rath <Dominic.Rath@gmx.de> *
5  * Copyright (C) 2007-2009 Øyvind Harboe <oyvind.harboe@zylin.com> *
6  * Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
7  ***************************************************************************/
8 
9 #ifndef OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H
10 #define OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H
11 
12 #include <jtag/commands.h>
13 
14 static inline void interface_jtag_add_scan_check_alloc(struct scan_field *field)
15 {
16  unsigned num_bytes = DIV_ROUND_UP(field->num_bits, 8);
17  field->in_value = cmd_queue_alloc(num_bytes);
18 }
19 
21 
24  jtag_callback_data_t data3);
25 
28  jtag_callback_data_t data3);
29 
30 #endif /* OPENOCD_JTAG_DRIVERS_MINIDRIVER_IMP_H */
void * cmd_queue_alloc(size_t size)
Definition: commands.c:66
int(* jtag_callback_t)(jtag_callback_data_t data0, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
Defines the interface of the JTAG callback mechanism.
Definition: jtag.h:376
intptr_t jtag_callback_data_t
Defines the type of data passed to the jtag_callback_t interface.
Definition: jtag.h:333
void(* jtag_callback1_t)(jtag_callback_data_t data0)
Defines a simple JTAG callback that can allow conversions on data scanned in from an interface.
Definition: jtag.h:343
void interface_jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
void jtag_add_callback4(jtag_callback_t f, jtag_callback_data_t data0, jtag_callback_data_t data1, jtag_callback_data_t data2, jtag_callback_data_t data3)
void interface_jtag_add_callback(jtag_callback1_t f, jtag_callback_data_t data0)
static void interface_jtag_add_scan_check_alloc(struct scan_field *field)
This structure defines a single scan field in the scan.
Definition: jtag.h:86
int num_bits
The number of bits this field specifies.
Definition: jtag.h:88
uint8_t * in_value
A pointer to a 32-bit memory location for data scanned out.
Definition: jtag.h:92
#define DIV_ROUND_UP(m, n)
Rounds m up to the nearest multiple of n using division.
Definition: types.h:79