From 3969c56a0fa7873a9efe203f74302e57f6c85fbb Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Wed, 3 Mar 2010 08:10:53 -0500 Subject: [PATCH] remove put from lib --- lib/include/put.h | 10 ---------- lib/put.c | 36 ------------------------------------ 2 files changed, 46 deletions(-) delete mode 100644 lib/include/put.h delete mode 100644 lib/put.c diff --git a/lib/include/put.h b/lib/include/put.h deleted file mode 100644 index f8826f622..000000000 --- a/lib/include/put.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef PUT_H -#define PUT_H - -void putchr(char c); -void putstr(char *s); -void put_hex(uint8_t x); -void put_hex16(uint16_t x); -void put_hex32(uint32_t x); - -#endif diff --git a/lib/put.c b/lib/put.c deleted file mode 100644 index 348da13f0..000000000 --- a/lib/put.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include - -const uint8_t hex[16]={'0','1','2','3','4','5','6','7', - '8','9','a','b','c','d','e','f'}; - -void putchr(char c) { - while(*UT1CON == 31); /* wait for there to be room in the buffer */ - *UART1_DATA = c; -} - -void putstr(char *s) { - while(s && *s!=0) { - putchr(*s++); - } -} - -void put_hex(uint8_t x) -{ - putchr(hex[x >> 4]); - putchr(hex[x & 15]); -} - -void put_hex16(uint16_t x) -{ - put_hex((x >> 8) & 0xFF); - put_hex((x) & 0xFF); -} - -void put_hex32(uint32_t x) -{ - put_hex((x >> 24) & 0xFF); - put_hex((x >> 16) & 0xFF); - put_hex((x >> 8) & 0xFF); - put_hex((x) & 0xFF); -}