OpenOCD
bitbang_interface Struct Reference

Low level callbacks (for bitbang). More...

Data Fields

int(* blink )(int on)
 Blink led (optional). More...
 
size_t buf_size
 The number of TDO samples that can be buffered up before the caller has to call read_sample. More...
 
bb_value_t(* read )(void)
 Sample TDO and return the value. More...
 
bb_value_t(* read_sample )(void)
 Return the next unread value from the buffer. More...
 
int(* sample )(void)
 Sample TDO and put the result in a buffer. More...
 
int(* swd_write )(int swclk, int swdio)
 Set SWCLK and SWDIO to the given value. More...
 
void(* swdio_drive )(bool on)
 Set direction of SWDIO. More...
 
int(* swdio_read )(void)
 Sample SWDIO and return the value. More...
 
int(* write )(int tck, int tms, int tdi)
 Set TCK, TMS, and TDI to the given values. More...
 

Detailed Description

Low level callbacks (for bitbang).

Either read(), or sample() and read_sample() must be implemented.

The sample functions allow an interface to batch a number of writes and sample requests together. Not waiting for a value to come back can greatly increase throughput.

Definition at line 29 of file bitbang.h.

Field Documentation

◆ blink

int(* bitbang_interface::blink) (int on)

Blink led (optional).

Definition at line 47 of file bitbang.h.

Referenced by bitbang_execute_queue(), and bitbang_swd_exchange().

◆ buf_size

size_t bitbang_interface::buf_size

The number of TDO samples that can be buffered up before the caller has to call read_sample.

Definition at line 35 of file bitbang.h.

Referenced by bitbang_scan().

◆ read

bb_value_t(* bitbang_interface::read) (void)

Sample TDO and return the value.

Definition at line 31 of file bitbang.h.

Referenced by bitbang_scan().

◆ read_sample

bb_value_t(* bitbang_interface::read_sample) (void)

Return the next unread value from the buffer.

Definition at line 41 of file bitbang.h.

Referenced by bitbang_scan().

◆ sample

int(* bitbang_interface::sample) (void)

Sample TDO and put the result in a buffer.

Definition at line 38 of file bitbang.h.

Referenced by bitbang_scan().

◆ swd_write

int(* bitbang_interface::swd_write) (int swclk, int swdio)

Set SWCLK and SWDIO to the given value.

Definition at line 56 of file bitbang.h.

Referenced by bcm2835gpio_init(), and bitbang_swd_exchange().

◆ swdio_drive

void(* bitbang_interface::swdio_drive) (bool on)

Set direction of SWDIO.

Definition at line 53 of file bitbang.h.

Referenced by bitbang_swd_read_reg(), and bitbang_swd_write_reg().

◆ swdio_read

int(* bitbang_interface::swdio_read) (void)

Sample SWDIO and return the value.

Definition at line 50 of file bitbang.h.

Referenced by bitbang_swd_exchange().

◆ write

int(* bitbang_interface::write) (int tck, int tms, int tdi)

Set TCK, TMS, and TDI to the given values.

Definition at line 44 of file bitbang.h.

Referenced by bitbang_execute_tms(), bitbang_path_move(), bitbang_runtest(), bitbang_scan(), bitbang_stableclocks(), and bitbang_state_move().


The documentation for this struct was generated from the following file: