# Patches for the SPI peripheral
#
# Fix the SP2X status register bit to have write access
SPI*:
SPSR:
_modify:
SPIF:
access: read-only
WCOL:
access: read-only
SPCR:
SPR:
_replace_enum:
FOSC_4_2: [0, "Fosc/4 if SPI2X == 0 else Fosc/2"]
FOSC_16_8: [1, "Fosc/16 if SPI2X == 0 else Fosc/8"]
FOSC_64_32: [2, "Fosc/64 if SPI2X == 0 else Fosc/32"]
FOSC_128_64: [3, "Fosc/128 if SPI2X == 0 else Fosc/64"]