浏览代码

Add SPI struct typedef for Teensy-LC

main
PaulStoffregen 9 年前
父节点
当前提交
74d65bf56f
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. +16
    -0
      teensy3/kinetis.h

+ 16
- 0
teensy3/kinetis.h 查看文件

@@ -2199,6 +2199,22 @@ typedef struct __attribute__((packed)) {
#define SPI0_RXFR3 (*(volatile uint32_t *)0x4002C088) // DSPI Receive FIFO Registers

#elif defined(KINETISL)
typedef struct __attribute__((packed)) {
volatile uint8_t S;
volatile uint8_t BR;
volatile uint8_t C2;
volatile uint8_t C1;
volatile uint8_t ML;
volatile uint8_t MH;
volatile uint8_t DL;
volatile uint8_t DH;
volatile uint8_t unused1;
volatile uint8_t unused2;
volatile uint8_t CI;
volatile uint8_t C3;
} KINETISL_SPI_t;
#define SPI0 (*(KINETISL_SPI_t *)0x40076000)
#define SPI1 (*(KINETISL_SPI_t *)0x40077000)
#define SPI0_S (*(volatile uint8_t *)0x40076000) // Status
#define SPI_S_SPRF ((uint8_t)0x80) // Read Buffer Full Flag
#define SPI_S_SPMF ((uint8_t)0x40) // Match Flag

正在加载...
取消
保存