From c770a7f14404822c1164a2399079411a37808cfd Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Sun, 21 Nov 2010 01:40:37 -0500 Subject: updated serial bootloader spec; other improvements --- source/arduino/bytecast.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/arduino/bytecast.rst') 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 ` 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 -- cgit v1.2.3