use new gpio interface
This commit is contained in:
parent
c6012611ba
commit
35c9c66c23
12 changed files with 44 additions and 60 deletions
|
@ -1,5 +1,6 @@
|
|||
#include <mc1322x.h>
|
||||
#include <board.h>
|
||||
|
||||
#include "led.h"
|
||||
|
||||
#define DELAY 400000
|
||||
|
@ -9,16 +10,16 @@
|
|||
void main(void) {
|
||||
volatile uint32_t i;
|
||||
|
||||
*GPIO_PAD_DIR0 = LED;
|
||||
gpio_pad_dir(LED);
|
||||
|
||||
while(1) {
|
||||
|
||||
*GPIO_DATA0 = LED;
|
||||
gpio_data(LED);
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
*GPIO_DATA0 = 0x00000000;
|
||||
|
||||
gpio_data(0);
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue