Skip to content

Commit

Permalink
missing include
Browse files Browse the repository at this point in the history
replace driverlib with HWREG direct calls, contd.
  • Loading branch information
sq7bti committed Aug 28, 2014
1 parent f78042a commit 36c5fec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions iAccelStepper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "iAccelStepper.h"
#include "driverlib/timer.h"
#include "inc/hw_gpio.h"
#include "inc/hw_timer.h"

static iAccelStepper* me[2];
static uint32_t _port_step[2];
Expand All @@ -9,8 +10,8 @@ static uint32_t _port_dir[2];
static uint8_t _pin_dir[2];
static boolean direction[2];
static boolean _state[2];
static unsigned int all_instances;
static unsigned long ulPeriod;
static unsigned char all_instances;
static uint32_t ulPeriod;

void iAccelStepper::ISR(void) {
//TimerIntClear(g_ulTIMERBase[id], TIMER_TIMA_TIMEOUT);
Expand Down Expand Up @@ -84,7 +85,8 @@ void iAccelStepper::begin(uint8_t pin1, uint8_t pin2, uint8_t pin3)
SysCtlPeripheralEnable(g_ulTIMERPeriph[id]);

TimerConfigure(g_ulTIMERBase[id], TIMER_CFG_ONE_SHOT);
TimerIntEnable(g_ulTIMERBase[id], TIMER_TIMA_TIMEOUT);
//TimerIntEnable(g_ulTIMERBase[id], TIMER_TIMA_TIMEOUT);
HWREG(g_ulTIMERBase[id] + TIMER_O_IMR) |= TIMER_TIMA_TIMEOUT;
TimerIntRegister(g_ulTIMERBase[id], TIMER_A, timerISR_ptr[id]);

me[id] = this;
Expand Down

0 comments on commit 36c5fec

Please sign in to comment.