SimAVR
AVR Simulator
Generic BitBang Module

Generic BitBang Module of simavr AVR simulator. More...

Data Structures

struct  avr_bitbang_t
 SPI Module initialization and state structure. More...
 

Typedefs

typedef struct avr_bitbang_t avr_bitbang_t
 SPI Module initialization and state structure. More...
 

Functions

void avr_bitbang_reset (avr_t *avr, avr_bitbang_t *p)
 reset bitbang sub-module More...
 
void avr_bitbang_start (avr_bitbang_t *p)
 start bitbang transfer More...
 
void avr_bitbang_stop (avr_bitbang_t *p)
 stop bitbang transfer More...
 

Detailed Description

Generic BitBang Module of simavr AVR simulator.

Features / Implementation Status
  • easy buffer access with push() / pop() functions
  • one input and one output pin (can be the same HW pin for I2C)
Todo:
  • one input and one output pin (can be the same HW pin for I2C)
  • one clock pin which can be configured as input or output when the clock is output, the clock signal is generated with a configured frequency (master / slave mode)
  • 2x 32-bit buffers (input / output) (allows start, stop bits for UART, etc.)
  • on each read / write a callback is executed to notify the master module

Typedef Documentation

typedef struct avr_bitbang_t avr_bitbang_t

SPI Module initialization and state structure.

Function Documentation

void avr_bitbang_reset ( avr_t avr,
avr_bitbang_t p 
)

reset bitbang sub-module

Parameters
avravr attached to
pbitbang structure
void avr_bitbang_start ( avr_bitbang_t p)

start bitbang transfer

buffers should be written / cleared in advanced timers and interrupts are connected

Parameters
pbitbang structure
Todo:
test

Here is the call graph for this function:

void avr_bitbang_stop ( avr_bitbang_t p)

stop bitbang transfer

timers and interrupts are disabled

Parameters
pbitbang structure

Here is the call graph for this function: