📄 lm3s301.h
字号:
#define PWM_X_RIS_INTCNTZERO 0x00000001 // Counter=0 Interrupt Status.
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_ISC register.
//
//*****************************************************************************
#define PWM_X_ISC_INTCMPBD 0x00000020 // Comparator B Down Interrupt.
#define PWM_X_ISC_INTCMPBU 0x00000010 // Comparator B Up Interrupt.
#define PWM_X_ISC_INTCMPAD 0x00000008 // Comparator A Down Interrupt.
#define PWM_X_ISC_INTCMPAU 0x00000004 // Comparator A Up Interrupt.
#define PWM_X_ISC_INTCNTLOAD 0x00000002 // Counter=Load Interrupt.
#define PWM_X_ISC_INTCNTZERO 0x00000001 // Counter=0 Interrupt.
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_LOAD register.
//
//*****************************************************************************
#define PWM_X_LOAD_M 0x0000FFFF // Counter Load Value.
#define PWM_X_LOAD_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_COUNT register.
//
//*****************************************************************************
#define PWM_X_COUNT_M 0x0000FFFF // Counter Value.
#define PWM_X_COUNT_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_CMPA register.
//
//*****************************************************************************
#define PWM_X_CMPA_M 0x0000FFFF // Comparator A Value.
#define PWM_X_CMPA_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_CMPB register.
//
//*****************************************************************************
#define PWM_X_CMPB_M 0x0000FFFF // Comparator B Value.
#define PWM_X_CMPB_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_GENA register.
//
//*****************************************************************************
#define PWM_X_GENA_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down.
#define PWM_X_GENA_ACTCMPBD_NONE \
0x00000000 // Do nothing.
#define PWM_X_GENA_ACTCMPBD_INV 0x00000400 // Invert the output signal.
#define PWM_X_GENA_ACTCMPBD_ZERO \
0x00000800 // Set the output signal to 0.
#define PWM_X_GENA_ACTCMPBD_ONE 0x00000C00 // Set the output signal to 1.
#define PWM_X_GENA_ACTCMPBU_M 0x00000300 // Action for Comparator B Up.
#define PWM_X_GENA_ACTCMPBU_NONE \
0x00000000 // Do nothing.
#define PWM_X_GENA_ACTCMPBU_INV 0x00000100 // Invert the output signal.
#define PWM_X_GENA_ACTCMPBU_ZERO \
0x00000200 // Set the output signal to 0.
#define PWM_X_GENA_ACTCMPBU_ONE 0x00000300 // Set the output signal to 1.
#define PWM_X_GENA_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down.
#define PWM_X_GENA_ACTCMPAD_NONE \
0x00000000 // Do nothing.
#define PWM_X_GENA_ACTCMPAD_INV 0x00000040 // Invert the output signal.
#define PWM_X_GENA_ACTCMPAD_ZERO \
0x00000080 // Set the output signal to 0.
#define PWM_X_GENA_ACTCMPAD_ONE 0x000000C0 // Set the output signal to 1.
#define PWM_X_GENA_ACTCMPAU_M 0x00000030 // Action for Comparator A Up.
#define PWM_X_GENA_ACTCMPAU_NONE \
0x00000000 // Do nothing.
#define PWM_X_GENA_ACTCMPAU_INV 0x00000010 // Invert the output signal.
#define PWM_X_GENA_ACTCMPAU_ZERO \
0x00000020 // Set the output signal to 0.
#define PWM_X_GENA_ACTCMPAU_ONE 0x00000030 // Set the output signal to 1.
#define PWM_X_GENA_ACTLOAD_M 0x0000000C // Action for Counter=Load.
#define PWM_X_GENA_ACTLOAD_NONE 0x00000000 // Do nothing.
#define PWM_X_GENA_ACTLOAD_INV 0x00000004 // Invert the output signal.
#define PWM_X_GENA_ACTLOAD_ZERO 0x00000008 // Set the output signal to 0.
#define PWM_X_GENA_ACTLOAD_ONE 0x0000000C // Set the output signal to 1.
#define PWM_X_GENA_ACTZERO_M 0x00000003 // Action for Counter=0.
#define PWM_X_GENA_ACTZERO_NONE 0x00000000 // Do nothing.
#define PWM_X_GENA_ACTZERO_INV 0x00000001 // Invert the output signal.
#define PWM_X_GENA_ACTZERO_ZERO 0x00000002 // Set the output signal to 0.
#define PWM_X_GENA_ACTZERO_ONE 0x00000003 // Set the output signal to 1.
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_GENB register.
//
//*****************************************************************************
#define PWM_X_GENB_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down.
#define PWM_X_GENB_ACTCMPBD_NONE \
0x00000000 // Do nothing.
#define PWM_X_GENB_ACTCMPBD_INV 0x00000400 // Invert the output signal.
#define PWM_X_GENB_ACTCMPBD_ZERO \
0x00000800 // Set the output signal to 0.
#define PWM_X_GENB_ACTCMPBD_ONE 0x00000C00 // Set the output signal to 1.
#define PWM_X_GENB_ACTCMPBU_M 0x00000300 // Action for Comparator B Up.
#define PWM_X_GENB_ACTCMPBU_NONE \
0x00000000 // Do nothing.
#define PWM_X_GENB_ACTCMPBU_INV 0x00000100 // Invert the output signal.
#define PWM_X_GENB_ACTCMPBU_ZERO \
0x00000200 // Set the output signal to 0.
#define PWM_X_GENB_ACTCMPBU_ONE 0x00000300 // Set the output signal to 1.
#define PWM_X_GENB_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down.
#define PWM_X_GENB_ACTCMPAD_NONE \
0x00000000 // Do nothing.
#define PWM_X_GENB_ACTCMPAD_INV 0x00000040 // Invert the output signal.
#define PWM_X_GENB_ACTCMPAD_ZERO \
0x00000080 // Set the output signal to 0.
#define PWM_X_GENB_ACTCMPAD_ONE 0x000000C0 // Set the output signal to 1.
#define PWM_X_GENB_ACTCMPAU_M 0x00000030 // Action for Comparator A Up.
#define PWM_X_GENB_ACTCMPAU_NONE \
0x00000000 // Do nothing.
#define PWM_X_GENB_ACTCMPAU_INV 0x00000010 // Invert the output signal.
#define PWM_X_GENB_ACTCMPAU_ZERO \
0x00000020 // Set the output signal to 0.
#define PWM_X_GENB_ACTCMPAU_ONE 0x00000030 // Set the output signal to 1.
#define PWM_X_GENB_ACTLOAD_M 0x0000000C // Action for Counter=Load.
#define PWM_X_GENB_ACTLOAD_NONE 0x00000000 // Do nothing.
#define PWM_X_GENB_ACTLOAD_INV 0x00000004 // Invert the output signal.
#define PWM_X_GENB_ACTLOAD_ZERO 0x00000008 // Set the output signal to 0.
#define PWM_X_GENB_ACTLOAD_ONE 0x0000000C // Set the output signal to 1.
#define PWM_X_GENB_ACTZERO_M 0x00000003 // Action for Counter=0.
#define PWM_X_GENB_ACTZERO_NONE 0x00000000 // Do nothing.
#define PWM_X_GENB_ACTZERO_INV 0x00000001 // Invert the output signal.
#define PWM_X_GENB_ACTZERO_ZERO 0x00000002 // Set the output signal to 0.
#define PWM_X_GENB_ACTZERO_ONE 0x00000003 // Set the output signal to 1.
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_DBCTL register.
//
//*****************************************************************************
#define PWM_X_DBCTL_ENABLE 0x00000001 // Dead-Band Generator Enable.
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_DBRISE register.
//
//*****************************************************************************
#define PWM_X_DBRISE_DELAY_M 0x00000FFF // Dead-Band Rise Delay.
#define PWM_X_DBRISE_DELAY_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the PWM_O_0_DBFALL register.
//
//*****************************************************************************
#define PWM_X_DBFALL_DELAY_M 0x00000FFF // Dead-Band Fall Delay.
#define PWM_X_DBFALL_DELAY_S 0
//*****************************************************************************
//
// The following are defines for the bit fields in the TIMER_O_CFG register.
//
//*****************************************************************************
#define TIMER_CFG_M 0x00000007 // GPTM Configuration.
#define TIMER_CFG_32_BIT_TIMER 0x00000000 // 32-bit timer configuration.
#define TIMER_CFG_32_BIT_RTC 0x00000001 // 32-bit real-time clock (RTC)
// counter configuration.
#define TIMER_CFG_16_BIT 0x00000004 // 16-bit timer configuration,
// function is controlled by bits
// 1:0 of GPTMTAMR and GPTMTBMR.
//*****************************************************************************
//
// The following are defines for the bit fields in the TIMER_O_TAMR register.
//
//*****************************************************************************
#define TIMER_TAMR_TAAMS 0x00000008 // GPTM TimerA Alternate Mode
// Select.
#define TIMER_TAMR_TACMR 0x00000004 // GPTM TimerA Capture Mode.
#define TIMER_TAMR_TAMR_M 0x00000003 // GPTM TimerA Mode.
#define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode.
#define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode.
#define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode.
//*****************************************************************************
//
// The following are defines for the bit fields in the TIMER_O_TBMR register.
//
//*****************************************************************************
#define TIMER_TBMR_TBAMS 0x00000008 // GPTM TimerB Alternate Mode
// Select.
#define TIMER_TBMR_TBCMR 0x00000004 // GPTM TimerB Capture Mode.
#define TIMER_TBMR_TBMR_M 0x00000003 // GPTM TimerB Mode.
#define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode.
#define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode.
#define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode.
//*****************************************************************************
//
// The following are defines for the bit fields in the TIMER_O_CTL register.
//
//*****************************************************************************
#define TIMER_CTL_TBPWML 0x00004000 // GPTM TimerB PWM Output Level.
#define TIMER_CTL_TBOTE 0x00002000 // GPTM TimerB Output Trigger
// Enable.
#define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM TimerB Event Mode.
#define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge.
#define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge.
#define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges.
#define TIMER_CTL_TBSTALL 0x00000200 // GPTM TimerB Stall Enable.
#define TIMER_CTL_TBEN 0x00000100 // GPTM TimerB Enable.
#define TIMER_CTL_TAPWML 0x00000040 // GPTM TimerA PWM Output Level.
#define TIMER_CTL_TAOTE 0x00000020 // GPTM TimerA Output Trigger
// Enable.
#define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Enable.
#define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM TimerA Event Mode.
#define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge.
#define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge.
#define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges.
#define TIMER_CTL_TASTALL 0x00000002 // GPTM TimerA Stall Enable.
#define TIMER_CTL_TAEN 0x00000001 // GPTM TimerA Enable.
//*****************************************************************************
//
// The following are defines for the bit fields in the TIMER_O_IMR register.
//
//*****************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -