simulavr  1.1.0
hwspi.cpp File Reference
#include <assert.h>
#include <stdio.h>
#include "hwspi.h"
#include "flash.h"
#include "avrdevice.h"
#include "traceval.h"
#include "irqsystem.h"
#include "avrerror.h"

Go to the source code of this file.

Macros

#define SPIE   0x80
 
#define SPE   0x40
 
#define DORD   0x20
 "When the DORD bit is written to one, the LSB of the data word is transmitted first." More...
 
#define MSTR   0x10
 
#define CPOL   0x08
 "When this bit is written to one, SCK is high when idle." More...
 
#define CPHA   0x04
 When this bit is written to one, output is setup at leading edge and input is sampled trailing edge. More...
 
#define SPR1   0x02
 
#define SPR0   0x01
 
#define SPIF   0x80
 
#define WCOL   0x40
 
#define SPI2X   0x01
 
#define SPI_VERBOSE   0
 

Macro Definition Documentation

◆ CPHA

#define CPHA   0x04

When this bit is written to one, output is setup at leading edge and input is sampled trailing edge.

Definition at line 42 of file hwspi.cpp.

Referenced by HWSpi::CpuCycle().

◆ CPOL

#define CPOL   0x08

"When this bit is written to one, SCK is high when idle."

Definition at line 41 of file hwspi.cpp.

Referenced by HWSpi::CpuCycle(), and HWSpi::SetSPCR().

◆ DORD

#define DORD   0x20

"When the DORD bit is written to one, the LSB of the data word is transmitted first."

Definition at line 39 of file hwspi.cpp.

Referenced by HWSpi::CpuCycle().

◆ MSTR

#define MSTR   0x10

Definition at line 40 of file hwspi.cpp.

Referenced by HWSpi::CpuCycle(), HWSpi::rxbit(), HWSpi::SetSPCR(), HWSpi::SetSPDR(), and HWSpi::txbit().

◆ SPE

#define SPE   0x40

Definition at line 38 of file hwspi.cpp.

Referenced by HWSpi::CpuCycle(), and HWSpi::SetSPCR().

◆ SPI2X

#define SPI2X   0x01

Definition at line 49 of file hwspi.cpp.

Referenced by HWSpi::SetSPSR(), and HWSpi::updatePrescaler().

◆ SPI_VERBOSE

#define SPI_VERBOSE   0

Definition at line 54 of file hwspi.cpp.

Referenced by HWSpi::CpuCycle(), and HWSpi::trxend().

◆ SPIE

#define SPIE   0x80

Definition at line 37 of file hwspi.cpp.

Referenced by HWSpi::CpuCycle(), and HWSpi::trxend().

◆ SPIF

#define SPIF   0x80

Definition at line 47 of file hwspi.cpp.

Referenced by HWSpi::ClearIrqFlag(), HWSpi::CpuCycle(), HWSpi::spdr_access(), and HWSpi::trxend().

◆ SPR0

#define SPR0   0x01

Definition at line 44 of file hwspi.cpp.

Referenced by HWSpi::updatePrescaler().

◆ SPR1

#define SPR1   0x02

Definition at line 43 of file hwspi.cpp.

Referenced by HWSpi::updatePrescaler().

◆ WCOL

#define WCOL   0x40

Definition at line 48 of file hwspi.cpp.

Referenced by HWSpi::SetSPDR(), and HWSpi::spdr_access().