22 lines
261 B
C
22 lines
261 B
C
|
|
||
|
#include "mc8051fun.h"
|
||
|
|
||
|
void setpin_hi(i8051pin_T *pin)
|
||
|
{
|
||
|
switch(pin->port){
|
||
|
case 0:
|
||
|
P0 |= (1<<pin->pin);
|
||
|
break;
|
||
|
case 1:
|
||
|
P1 |= (1<<pin->pin);
|
||
|
break;
|
||
|
case 2:
|
||
|
P2 |= (1<<pin->pin);
|
||
|
break;
|
||
|
case 3:
|
||
|
P3 |= (1<<pin->pin);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|