Sunteți pe pagina 1din 2

; SPI Protocol Definition File

; This file defines the transfers to/from any device


; using the SPI bus
;
[Protocol]
name = SPIBus
bytewise
[DEBUG]
;DebugOn
[Packet]
[Start]
type = event
event = 1
[End]
type = event
event = 2
[Decode]
[Fields]
Fields NotUsed.5y.i, Instruction.3y=5h.L, NotUsed.8x.i, WPEN.1.
L, NotUsed.3.i, BlockProtect.2.L, WEN.1.L, RDY.1.L
Fields NotUsed.5y.i, Instruction.3y=1h.L, NotUsed.8x.i, WPEN.1.
L, NotUsed.3.i, BlockProtect.2.L, WEN.1.L, RDY.1.L
Fields NotUsed.5y.i, Instruction.3y=3h.L, NotUsed.8x.i, Address
.16y.h, NotUsed.16x.i, Data.Nx.h
Fields NotUsed.5y.i, Instruction.3y=2h.L, NotUsed.8x.i, Address
.16y.h, NotUsed.16x.i, Data.Ny.h
Fields NotUsed.5y.i, Instruction.3y.L

; Fields Instruction.8y.L

LOOKUP Instruction
[06h]=$Write_enable
[04h]=$Write_Disable
[05h]=$Read_Status
[01h]=$Write_Status
[03h]=$Read_Data
[02h]=$Write_Data
LOOKUP WPEN
[1]=$Protected
[0]=$Writable
LOOKUP BlockProtect
[0]=$None
[1]=$25%
[2]=$50%
[3]=$100%
LOOKUP WEN
[1]=$WR_Enabled
[0]=$WR_Disabled
LOOKUP RDY
[0]=$Ready
[1]=$Busy

S-ar putea să vă placă și