Modified the AT91SAM7S port and the ATmega168 port to use a slimmed down MS/TP state machine and datalink layer. Tested on AT91SAM7S-EK board.
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
/* global variable counts interrupts */
|
||||
volatile unsigned long Timer_Milliseconds;
|
||||
/* MS/TP Silence Timer */
|
||||
static volatile uint16_t SilenceTime;
|
||||
static volatile int SilenceTime;
|
||||
|
||||
static void Timer0_Setup(int milliseconds) {
|
||||
// TC Block Control Register TC_BCR (read/write)
|
||||
@@ -306,11 +306,11 @@ static void Timer0IrqHandler (void) {
|
||||
dummy = pTC->TC_SR;
|
||||
// increment the tick count
|
||||
Timer_Milliseconds++;
|
||||
if (SilenceTime < 0xFFFF)
|
||||
if (SilenceTime < 60000)
|
||||
SilenceTime++;
|
||||
}
|
||||
|
||||
uint16_t Timer_Silence(void)
|
||||
int Timer_Silence(void)
|
||||
{
|
||||
return SilenceTime;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user