瀏覽代碼

Merge pull request #75 from kbob/LC-TPM-DMA-bit

LC TPM DMA Enable bit
main
Paul Stoffregen 10 年之前
父節點
當前提交
9288323459
共有 2 個檔案被更改,包括 4 行新增1 行删除
  1. +1
    -1
      teensy3/DMAChannel.h
  2. +3
    -0
      teensy3/kinetis.h

+ 1
- 1
teensy3/DMAChannel.h 查看文件

d = (dcr >> 17) & 3; d = (dcr >> 17) & 3;
if (s == 0 || d == 0) n = 2; if (s == 0 || d == 0) n = 2;
else if (s == 2 || d == 2) n = 1; else if (s == 2 || d == 2) n = 1;
CFG->DSR_BCR = len >> n;
CFG->DSR_BCR = len << n;
} }


/*************************************************/ /*************************************************/

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



// Chapter 35: FlexTimer Module (FTM) // Chapter 35: FlexTimer Module (FTM)
#define FTM0_SC (*(volatile uint32_t *)0x40038000) // Status And Control #define FTM0_SC (*(volatile uint32_t *)0x40038000) // Status And Control
#ifdef KINETISL
#define FTM_SC_DMA 0x100 // DMA Enable
#endif
#define FTM_SC_TOF 0x80 // Timer Overflow Flag #define FTM_SC_TOF 0x80 // Timer Overflow Flag
#define FTM_SC_TOIE 0x40 // Timer Overflow Interrupt Enable #define FTM_SC_TOIE 0x40 // Timer Overflow Interrupt Enable
#define FTM_SC_CPWMS 0x20 // Center-Aligned PWM Select #define FTM_SC_CPWMS 0x20 // Center-Aligned PWM Select

Loading…
取消
儲存