From 30f410891cec7c2ccdae1aa3b6061618ce93c801 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Sun, 26 May 2024 15:33:30 +0200 Subject: [PATCH] Initial commit --- getport.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 getport.c 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; +} + +