109 void(* callback_bit_read)(uint8_t bit, void *param)
anonymous parameter for callback functions
Definition: avr_bitbang.h:66
uint32_t(* callback_transfer_finished)(uint32_t data, void *param)
callback function to notify about a complete transfer (read received data and write new output data) ...
Definition: avr_bitbang.h:68
pin structure
Definition: avr_ioport.h:89
uint32_t data
data buffer
Definition: avr_bitbang.h:75
uint8_t buffer_size
size of buffer in bits (1...32)
Definition: avr_bitbang.h:63
avr_t * avr
Definition: run_avr.c:54
void(* callback_bit_write)(uint8_t bit, void *param)
callback function to notify about bit write
Definition: avr_bitbang.h:67
SPI Module initialization and state structure.
Definition: avr_bitbang.h:48
uint8_t enabled
bit-bang enabled flag
Definition: avr_bitbang.h:52
uint8_t clk_phase
clock phase / data sampling edge
Definition: avr_bitbang.h:55
avr_iopin_t p_clk
clock pin (optional)
Definition: avr_bitbang.h:70
uint8_t clk_generate
generate clock and write to clock pin (if available) -> master / slave mode
Definition: avr_bitbang.h:53
avr_iopin_t p_in
data in pin
Definition: avr_bitbang.h:71
uint32_t clk_cycles
cycles per clock period - must be multiple of 2! (used if clk_generate is enabled) ...
Definition: avr_bitbang.h:58
void avr_bitbang_stop(avr_bitbang_t *p)
stop bitbang transfer
Definition: avr_bitbang.c:234
void avr_bitbang_reset(avr_t *avr, avr_bitbang_t *p)
reset bitbang sub-module
Definition: avr_bitbang.c:176
avr_iopin_t p_out
data out pin
Definition: avr_bitbang.h:72
void avr_bitbang_start(avr_bitbang_t *p)
start bitbang transfer
Definition: avr_bitbang.c:201
void * callback_param
Definition: avr_bitbang.h:65
avr_t * avr
avr we are attached to
Definition: avr_bitbang.h:50
struct avr_bitbang_t avr_bitbang_t
SPI Module initialization and state structure.
Main AVR instance.
Definition: sim_avr.h:142
uint8_t clk_pol
clock polarity, base (inactive) value of clock
Definition: avr_bitbang.h:54
uint8_t data_order
data order / shift
Definition: avr_bitbang.h:59
int8_t clk_count
internal clock edge count
Definition: avr_bitbang.h:78