Moved and updated code for AT91SAM7S
This commit is contained in:
parent
1658d6b42c
commit
1f72d3ea32
32 changed files with 9799 additions and 0 deletions
22
cpu/arm/at91sam7s/pit-interrupt.h
Normal file
22
cpu/arm/at91sam7s/pit-interrupt.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
volatile unsigned int pit_count = 0;
|
||||
|
||||
static void NACKEDFUNC ATTR system_int (void) { /* System Interrupt Handler */
|
||||
|
||||
ISR_ENTRY();
|
||||
|
||||
if (*AT91C_PITC_PISR & AT91C_PITC_PITS) { /* Check PIT Interrupt */
|
||||
pit_count++;
|
||||
/*
|
||||
if ((pit_count % 100) == 0) {
|
||||
unsigned int led_state = (pit_count % 300) / 100;
|
||||
*AT91C_PIOA_ODSR = ~(1<<led_state);
|
||||
}
|
||||
*/
|
||||
|
||||
*AT91C_AIC_EOICR = *AT91C_PITC_PIVR; /* Ack & End of Interrupt */
|
||||
} else {
|
||||
*AT91C_AIC_EOICR = 0; /* End of Interrupt */
|
||||
}
|
||||
|
||||
ISR_EXIT();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue