From 6d62fc40950b388410464f737d00bf371b977506 Mon Sep 17 00:00:00 2001 From: Allen Hill Date: Mon, 23 Oct 2023 14:13:53 -0400 Subject: [PATCH] Remove copy of libc function --- src/com232.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/com232.c b/src/com232.c index ab30c32..37b2c27 100644 --- a/src/com232.c +++ b/src/com232.c @@ -125,23 +125,3 @@ void RS232_PrintDec2(uint8_t Data) { RS232_SendByte('0'); RS232_PrintDec(Data); } - -char *itoa(int i, char b[]) { - char const digit[] = "0123456789"; - char *p = b; - if (i < 0) { - *p++ = '-'; - i *= -1; - } - int shifter = i; - do { // Move to where representation ends - ++p; - shifter = shifter / 10; - } while (shifter); - *p = '\0'; - do { // Move back, inserting digits as u go - *--p = digit[i % 10]; - i = i / 10; - } while (i); - return b; -}