X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fio%2Fsam3_tc.h;h=dfd5a56d83ec69e75240de3f2d27390a56c47349;hb=d6c4f6128c880a4e8054bde795fd15d85801da4e;hp=d6212a17a4e5a5b56de48a5d5e560c9ea633c84b;hpb=184eb78acf4a1923b62b197235a1ea3dca45af08;p=bertos.git diff --git a/bertos/cpu/cortex-m3/io/sam3_tc.h b/bertos/cpu/cortex-m3/io/sam3_tc.h index d6212a17..dfd5a56d 100644 --- a/bertos/cpu/cortex-m3/io/sam3_tc.h +++ b/bertos/cpu/cortex-m3/io/sam3_tc.h @@ -49,14 +49,14 @@ /** * Timer conter control register */ -#define TC0_CCR0_OFF 0x00 ///< TC0 Channel Control Register (channel = 0). +#define TC0_CCR0_OFF 0x00 ///< TC0 Channel Control Register (channel = 0). #define TC0_CCR0 (*((reg32_t*)(TC0_BASE + TC0_CCR0_OFF))) ///< TC0 Channel Control Register (channel = 0). -#define TC0_CMR0_OFF 0x04 ///< TC0 Channel Mode Register (channel = 0). -#define TC0_CMR0 (*((reg32_t*)(TC0_BASE + TC0_SMMR0_OFF))) ///< TC0 Channel Mode Register (channel = 0). +#define TC0_CMR0_OFF 0x04 ///< TC0 Channel Mode Register (channel = 0). +#define TC0_CMR0 (*((reg32_t*)(TC0_BASE + TC0_CMR0_OFF))) ///< TC0 Channel Mode Register (channel = 0). -#define TC_CMR_CPCTRG 14 ///< RC Compare Trigger Enable -#define TC_CMR_WAVE 15 ///< Waveform mode is enabled +#define TC_CMR_CPCTRG 14 ///< RC Compare Trigger Enable +#define TC_CMR_WAVE 15 ///< Waveform mode is enabled #define TC_CMR_ACPA_SET 0x10000 ///< RA Compare Effect: set #define TC_CMR_ACPA_CLEAR 0x20000 ///< RA Compare Effect: clear @@ -66,13 +66,14 @@ #define TC_CMR_ACPC_CLEAR 0x80000 ///< RC Compare Effect: clear #define TC_CMR_ACPC_TOGGLE 0xC0000 ///< RC Compare Effect: toggle -#define TC_CCR_CLKEN 0 ///< Counter Clock Enable Command -#define TC_CCR_CLKDIS 1 ///< Counter Clock Disable Command -#define TC_CCR_SWTRG 2 ///< Software Trigger Command +#define TC_CCR_CLKEN 0 ///< Counter Clock Enable Command +#define TC_CCR_CLKDIS 1 ///< Counter Clock Disable Command +#define TC_CCR_SWTRG 2 ///< Software Trigger Command +#define TC_TIMER_CLOCK1 0 ///< Select timer clock TCLK1 +#define TC_TIMER_CLOCK2 1 ///< Select timer clock TCLK2 - -#define TC0_SMMR0_OFF 0x08 ///< TC0 Stepper Motor Mode Register (channel = 0). +#define TC0_SMMR0_OFF 0x08 ///< TC0 Stepper Motor Mode Register (channel = 0). #define TC0_SMMR0 (*((reg32_t*)(TC0_BASE + TC0_SMMR0_OFF))) ///< TC0 Stepper Motor Mode Register (channel = 0). #define TC0_CV0_OFF 0x10 ///< TC0 Conter Vale (channel = 0).