diff --git a/getport.c b/getport.c new file mode 100644 index 0000000..f37b3d8 --- /dev/null +++ b/getport.c @@ -0,0 +1,19 @@ +#include "mc8051fun.h" + +uint8_t getport(int n) +{ + switch(n){ + case 0: + return P0; + case 1: + return P1; + case 2: + return P2; + case 3: + return P3; + + } + return 0; +} + +