~ruther/avr-device

ref: 84f2b65144b64a4e70aa670f753f4ab49c0a5aaa avr-device/patch/common/spi.yaml -rw-r--r-- 562 bytes
84f2b651 — David Add ATmega8U2 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Patches for the SPI peripheral
#
# Fix the SP2X status register bit to have write access
SPI*:
  _modify:
    SPSR:
      access: read-write
  SPSR:
    _modify:
      SPIF:
        access: read-only
      WCOL:
        access: read-only
      SPI2X:
        access: read-write
  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"]
Do not follow this link