Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 13 → Rev 14

/luminary/PWM-Test/PWM-Test.c
13,7 → 13,7
*
****************************************************************************
*
* Test program for monitoring the ADC lines.
* Test program for Generating PWM signals to drive a motor
*
****************************************************************************/
 
109,6 → 109,18
 
/****************************************************************************
*
* Interrupt handler for Timer0 A
*
****************************************************************************/
 
void Timer0A_isr( void )
{
 
} // Timer0A_isr
 
/****************************************************************************
*
* Initialize the ADC to collect sample from our 4 line sensors.
*
****************************************************************************/
215,6 → 227,26
 
/****************************************************************************
*
* InitTach
*
****************************************************************************/
 
void InitTach( void )
{
SysCtlPeripheralEnable( SYSCTL_PERIPH_TIMER0 );
 
TimerConfigure( TIMER0_BASE, TIMER_CFG_16_BIT_PAIR
| TIMER_CFG_A_CAP_TIME
| TIMER_CFG_B_CAP_TIME );
 
TimerControlEvent( TIMER0_BASE, TIMER_BOTH, TIMER_EVENT_POS_EDGE );
 
TimerEnable( TIMER0_BASE, TIMER_BOTH );
 
} // InitTach
 
/****************************************************************************
*
* SwitchEvent
*
****************************************************************************/
254,6 → 286,7
 
InitADC();
InitMotors();
InitTach();
 
// Configure Timer0 to generate a 10 kHz PWM signal for driving
// the user LED.
/luminary/PWM-Test/startup-gcc.c
55,11 → 55,13
 
//*****************************************************************************
//
// External declaration for the interrupt handler used by the application.
// External declaration for the interrupt handlers used by the application.
//
//*****************************************************************************
extern void ADC_isr( void );
 
void ADC_isr( void );
void Timer0A_isr( void );
 
//*****************************************************************************
//
// Reserve space for the system stack.
119,7 → 121,7
IntDefaultHandler, // ADC Sequence 2
IntDefaultHandler, // ADC Sequence 3
IntDefaultHandler, // Watchdog timer
IntDefaultHandler, // Timer 0 subtimer A
Timer0A_isr, // Timer 0 subtimer A
IntDefaultHandler, // Timer 0 subtimer B
IntDefaultHandler, // Timer 1 subtimer A
IntDefaultHandler, // Timer 1 subtimer B