aboutsummaryrefslogtreecommitdiffstats
path: root/core/Print.cpp
diff options
context:
space:
mode:
authorPerry Hung <iperry@alum.mit.edu>2010-03-31 21:29:29 -0400
committerPerry Hung <iperry@alum.mit.edu>2010-03-31 21:29:29 -0400
commit25c7ba0ed78aea0a368bc178dd720a845dd515ac (patch)
tree86be2502247dc0dd831191ae219a62875daad97c /core/Print.cpp
parent4e51e057bb5a8d6b3475d2202af8a2a2caf9ba7b (diff)
downloadlibrambutan-25c7ba0ed78aea0a368bc178dd720a845dd515ac.tar.gz
librambutan-25c7ba0ed78aea0a368bc178dd720a845dd515ac.zip
Removed inttypes.h
Removed inttypes.h from libmaple. Will have another pass through to use the standard libmaple types, but will come in another commit.
Diffstat (limited to 'core/Print.cpp')
-rw-r--r--core/Print.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/Print.cpp b/core/Print.cpp
index efe3eef..da461ae 100644
--- a/core/Print.cpp
+++ b/core/Print.cpp
@@ -36,13 +36,13 @@ void Print::write(const char *str)
}
/* default implementation: may be overridden */
-void Print::write(const uint8_t *buffer, size_t size)
+void Print::write(const uint8 *buffer, uint32 size)
{
while (size--)
write(*buffer++);
}
-void Print::print(uint8_t b)
+void Print::print(uint8 b)
{
this->write(b);
}
@@ -114,7 +114,7 @@ void Print::println(const char c[])
println();
}
-void Print::println(uint8_t b)
+void Print::println(uint8 b)
{
print(b);
println();
@@ -158,7 +158,7 @@ void Print::println(double n)
// Private Methods /////////////////////////////////////////////////////////////
-void Print::printNumber(unsigned long n, uint8_t base)
+void Print::printNumber(unsigned long n, uint8 base)
{
unsigned char buf[8 * sizeof(long)]; // Assumes 8-bit chars.
unsigned long i = 0;
@@ -179,7 +179,7 @@ void Print::printNumber(unsigned long n, uint8_t base)
'A' + buf[i - 1] - 10));
}
-void Print::printFloat(double number, uint8_t digits)
+void Print::printFloat(double number, uint8 digits)
{
// Handle negative numbers
if (number < 0.0)
@@ -190,7 +190,7 @@ void Print::printFloat(double number, uint8_t digits)
// Round correctly so that print(1.999, 2) prints as "2.00"
double rounding = 0.5;
- for (uint8_t i=0; i<digits; ++i)
+ for (uint8 i=0; i<digits; ++i)
rounding /= 10.0;
number += rounding;