aboutsummaryrefslogtreecommitdiffstats
path: root/source/arduino/bytecast.rst
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@mit.edu>2010-11-21 01:40:37 -0500
committerMarti Bolivar <mbolivar@mit.edu>2010-11-21 01:40:37 -0500
commitc770a7f14404822c1164a2399079411a37808cfd (patch)
tree599188be6e3a5d105f9b8c4baba19d280b3d1058 /source/arduino/bytecast.rst
parent4b60b1cad5fe16895179d0bd8a5dc1e6e4c7564c (diff)
downloadlibrambutan-c770a7f14404822c1164a2399079411a37808cfd.tar.gz
librambutan-c770a7f14404822c1164a2399079411a37808cfd.zip
updated serial bootloader spec; other improvements
Diffstat (limited to 'source/arduino/bytecast.rst')
-rw-r--r--source/arduino/bytecast.rst14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/arduino/bytecast.rst b/source/arduino/bytecast.rst
index 38aec36..348c9fb 100644
--- a/source/arduino/bytecast.rst
+++ b/source/arduino/bytecast.rst
@@ -10,17 +10,17 @@ Description
Converts a value to the :ref:`byte <arduino-byte>` data type.
-.. warning::
+.. note::
Casting to the byte type is provided for compatibility with
- Arduino. However, ``byte`` is a non-standard type. The standard
- C++ type for storing an 8-bit unsigned integer is ``unsigned
- char``, and we recommend using that instead.
+ Arduino. However, the recommended Maple type for storing an 8-bit
+ unsigned integer is ``uint8``. (C and C++ programmers: ``stdint.h``
+ is also available).
- In order to cast a variable ``x`` to an ``unsigned char``, the
+ In order to cast a variable ``x`` to a ``uint8``, the
following syntax can be used::
- (unsigned char)(x);
+ uint8(x);
Syntax
------
@@ -50,4 +50,4 @@ See Also
-.. include:: cc-attribution.txt \ No newline at end of file
+.. include:: cc-attribution.txt