Add ES/Lab/LAB6/BULBARR.c
This commit is contained in:
parent
1e1c3b9687
commit
5d1eb9d981
1 changed files with 16 additions and 0 deletions
16
ES/Lab/LAB6/BULBARR.c
Normal file
16
ES/Lab/LAB6/BULBARR.c
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#include <LPC17xx.h>
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
int i;
|
||||||
|
// from P1.24 -> 31
|
||||||
|
LPC_PINCON->PINSEL3 &= 0x0000FFFF;
|
||||||
|
|
||||||
|
LPC_GPIO1->FIODIR = 0xFF000000;
|
||||||
|
|
||||||
|
while(1){
|
||||||
|
LPC_GPIO1-> FIOSET=0xFF000000;
|
||||||
|
for(i=0; i<1000; i++);
|
||||||
|
LPC_GPIO1->FIOCLR=0xFF000000;
|
||||||
|
for(i=0; i<1000; i++);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue