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:
skarg
2007-09-07 01:34:19 +00:00
parent 4f34f6994b
commit 8fb328ce23
10 changed files with 1285 additions and 359 deletions
+3 -3
View File
@@ -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;
}