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...
 
int(* flush )(void)
 Force a flush. 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(* sleep )(unsigned int microseconds)
 Sleep for some number of microseconds. 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 30 of file bitbang.h.

Field Documentation

◆ blink

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

Blink led (optional).

Definition at line 48 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 36 of file bitbang.h.

Referenced by bitbang_scan().

◆ flush

int(* bitbang_interface::flush) (void)

Force a flush.

Definition at line 63 of file bitbang.h.

Referenced by bitbang_execute_queue().

◆ read

bb_value_t(* bitbang_interface::read) (void)

Sample TDO and return the value.

Definition at line 32 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 42 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 39 of file bitbang.h.

Referenced by bitbang_scan().

◆ sleep

int(* bitbang_interface::sleep) (unsigned int microseconds)

Sleep for some number of microseconds.

Definition at line 60 of file bitbang.h.

Referenced by bitbang_sleep().

◆ swd_write

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

Set SWCLK and SWDIO to the given value.

Definition at line 57 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 54 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 51 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 45 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: