Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "AT91SAM9263.h"
- #include "AT91SAM9263-EK.h"
- #define DELAY 250000
- #define BTT_MASK AT91C_PIO_PC5
- #define LED_MASK AT91C_PIO_PC8
- int main()
- {
- AT91C_BASE_PIOB->PIO_PER = LED_MASK;
- AT91C_BASE_PIOB->PIO_OER = LED_MASK;
- AT91C_BASE_PIOC->PIO_PER = BTT_MASK;
- AT91C_BASE_PIOC->PIO_OER = BTT_MASK;
- AT91C_BASE_PIOC->PIO_PPUER = BTT_MASK;
- while(1)
- {
- AT91C_BASE_PIOB->PIO_CODR = LED_MASK;
- //delay
- AT91C_BASE_PIOB->PIO_SODR = LED_MASK;
- //delay
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement