From faf062af8ba221e4a2ba4678fe2ee8288223bbdf Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 18 Aug 2016 21:52:18 +0300 Subject: [PATCH] initial cleanup and mapping --- .gitignore | 4 + COPYING.LESSER | 165 ++ INSTALL | 36 + People | 42 + build | 106 ++ devLib/Makefile | 134 ++ devLib/ds1302.c | 240 +++ devLib/ds1302.h | 44 + devLib/font.h | 2577 ++++++++++++++++++++++++++++++ devLib/gertboard.c | 164 ++ devLib/gertboard.h | 45 + devLib/lcd.c | 495 ++++++ devLib/lcd.h | 52 + devLib/lcd128x64.c | 673 ++++++++ devLib/lcd128x64.h | 39 + devLib/maxdetect.c | 165 ++ devLib/maxdetect.h | 40 + devLib/piFace.c | 112 ++ devLib/piFace.h | 32 + devLib/piFaceOld.c | 178 +++ devLib/piGlow.c | 118 ++ devLib/piGlow.h | 45 + devLib/piNes.c | 113 ++ devLib/piNes.h | 45 + examples/BProTest/lnIOBoard | Bin 0 -> 11879 bytes examples/BProTest/lnIOBoard.c | 288 ++++ examples/BProTest/testLedCon6.c | 268 ++++ examples/COPYING.LESSER | 165 ++ examples/Gertboard/7segments.c | 221 +++ examples/Gertboard/Makefile | 74 + examples/Gertboard/buttons.c | 83 + examples/Gertboard/gertboard.c | 96 ++ examples/Gertboard/record.c | 60 + examples/Gertboard/temperature.c | 78 + examples/Gertboard/voltmeter.c | 73 + examples/Gertboard/vumeter.c | 152 ++ examples/Makefile | 167 ++ examples/PiFace/Makefile | 85 + examples/PiFace/blink.c | 59 + examples/PiFace/buttons.c | 103 ++ examples/PiFace/ladder.c | 337 ++++ examples/PiFace/metro.c | 111 ++ examples/PiFace/motor.c | 120 ++ examples/PiFace/reaction.c | 194 +++ examples/PiGlow/Makefile | 79 + examples/PiGlow/piGlow0.c | 51 + examples/PiGlow/piGlow1.c | 258 +++ examples/PiGlow/piglow.c | 176 ++ examples/README.TXT | 18 + examples/blink.c | 48 + examples/blink.rtb | 30 + examples/blink.sh | 37 + examples/blink12.c | 111 ++ examples/blink12drcs.c | 125 ++ examples/blink6drcs.c | 115 ++ examples/blink8.c | 57 + examples/clock.c | 201 +++ examples/delayTest.c | 107 ++ examples/ds1302.c | 238 +++ examples/echo.c | 83 + examples/header.h | 23 + examples/isr-osc.c | 118 ++ examples/isr.c | 110 ++ examples/lcd-adafruit.c | 347 ++++ examples/lcd.c | 286 ++++ examples/nes.c | 67 + examples/okLed.c | 82 + examples/pwm.c | 58 + examples/q2w/Makefile | 81 + examples/q2w/binary.c | 79 + examples/q2w/blink-io.c | 61 + examples/q2w/blink.c | 50 + examples/q2w/blink.sh | 37 + examples/q2w/bright.c | 59 + examples/q2w/button.c | 63 + examples/q2w/volts.c | 62 + examples/rht03.c | 69 + examples/serialRead.c | 48 + examples/serialTest.c | 75 + examples/servo.c | 57 + examples/softPwm.c | 89 ++ examples/softTone.c | 54 + examples/speed.c | 95 ++ examples/te.c | 59 + examples/tser.c | 75 + examples/wfi.c | 161 ++ examples/xserv.c | 74 + gpio/COPYING.LESSER | 165 ++ gpio/Makefile | 87 + gpio/extensions.c | 700 ++++++++ gpio/extensions.h | 26 + gpio/gpio.1 | 371 +++++ gpio/gpio.c | 1453 +++++++++++++++++ gpio/pins.c | 33 + gpio/pintest | 193 +++ gpio/readall.c | 381 +++++ gpio/test.sh | 44 + pins/Makefile | 18 + pins/pins.pdf | Bin 0 -> 9833 bytes pins/pins.tex | 116 ++ wiringPi/COPYING.LESSER | 165 ++ wiringPi/Makefile | 196 +++ wiringPi/drcSerial.c | 201 +++ wiringPi/drcSerial.h | 33 + wiringPi/max31855.c | 81 + wiringPi/max31855.h | 33 + wiringPi/max5322.c | 84 + wiringPi/max5322.h | 33 + wiringPi/mcp23008.c | 149 ++ wiringPi/mcp23008.h | 33 + wiringPi/mcp23016.c | 164 ++ wiringPi/mcp23016.h | 33 + wiringPi/mcp23016reg.h | 48 + wiringPi/mcp23017.c | 195 +++ wiringPi/mcp23017.h | 33 + wiringPi/mcp23s08.c | 189 +++ wiringPi/mcp23s08.h | 33 + wiringPi/mcp23s17.c | 236 +++ wiringPi/mcp23s17.h | 33 + wiringPi/mcp23x08.h | 73 + wiringPi/mcp23x0817.h | 87 + wiringPi/mcp3002.c | 76 + wiringPi/mcp3002.h | 33 + wiringPi/mcp3004.c | 76 + wiringPi/mcp3004.h | 33 + wiringPi/mcp3422.c | 110 ++ wiringPi/mcp3422.h | 43 + wiringPi/mcp4802.c | 76 + wiringPi/mcp4802.h | 33 + wiringPi/pcf8574.c | 126 ++ wiringPi/pcf8574.h | 33 + wiringPi/pcf8591.c | 90 ++ wiringPi/pcf8591.h | 33 + wiringPi/piHiPri.c | 51 + wiringPi/piThread.c | 63 + wiringPi/sn3218.c | 75 + wiringPi/sn3218.h | 33 + wiringPi/softPwm.c | 167 ++ wiringPi/softPwm.h | 35 + wiringPi/softServo.c | 211 +++ wiringPi/softServo.h | 35 + wiringPi/softTone.c | 150 ++ wiringPi/softTone.h | 39 + wiringPi/sr595.c | 109 ++ wiringPi/sr595.h | 34 + wiringPi/wiringPi.c | 2145 +++++++++++++++++++++++++ wiringPi/wiringPi.h | 225 +++ wiringPi/wiringPiI2C.c | 236 +++ wiringPi/wiringPiI2C.h | 42 + wiringPi/wiringPiSPI.c | 121 ++ wiringPi/wiringPiSPI.h | 35 + wiringPi/wiringSerial.c | 213 +++ wiringPi/wiringSerial.h | 38 + wiringPi/wiringShift.c | 83 + wiringPi/wiringShift.h | 41 + 155 files changed, 23233 insertions(+) create mode 100644 .gitignore create mode 100644 COPYING.LESSER create mode 100644 INSTALL create mode 100644 People create mode 100644 build create mode 100644 devLib/Makefile create mode 100644 devLib/ds1302.c create mode 100644 devLib/ds1302.h create mode 100644 devLib/font.h create mode 100644 devLib/gertboard.c create mode 100644 devLib/gertboard.h create mode 100644 devLib/lcd.c create mode 100644 devLib/lcd.h create mode 100644 devLib/lcd128x64.c create mode 100644 devLib/lcd128x64.h create mode 100644 devLib/maxdetect.c create mode 100644 devLib/maxdetect.h create mode 100644 devLib/piFace.c create mode 100644 devLib/piFace.h create mode 100644 devLib/piFaceOld.c create mode 100644 devLib/piGlow.c create mode 100644 devLib/piGlow.h create mode 100644 devLib/piNes.c create mode 100644 devLib/piNes.h create mode 100644 examples/BProTest/lnIOBoard create mode 100644 examples/BProTest/lnIOBoard.c create mode 100644 examples/BProTest/testLedCon6.c create mode 100644 examples/COPYING.LESSER create mode 100644 examples/Gertboard/7segments.c create mode 100644 examples/Gertboard/Makefile create mode 100644 examples/Gertboard/buttons.c create mode 100644 examples/Gertboard/gertboard.c create mode 100644 examples/Gertboard/record.c create mode 100644 examples/Gertboard/temperature.c create mode 100644 examples/Gertboard/voltmeter.c create mode 100644 examples/Gertboard/vumeter.c create mode 100644 examples/Makefile create mode 100644 examples/PiFace/Makefile create mode 100644 examples/PiFace/blink.c create mode 100644 examples/PiFace/buttons.c create mode 100644 examples/PiFace/ladder.c create mode 100644 examples/PiFace/metro.c create mode 100644 examples/PiFace/motor.c create mode 100644 examples/PiFace/reaction.c create mode 100644 examples/PiGlow/Makefile create mode 100644 examples/PiGlow/piGlow0.c create mode 100644 examples/PiGlow/piGlow1.c create mode 100644 examples/PiGlow/piglow.c create mode 100644 examples/README.TXT create mode 100644 examples/blink.c create mode 100644 examples/blink.rtb create mode 100644 examples/blink.sh create mode 100644 examples/blink12.c create mode 100644 examples/blink12drcs.c create mode 100644 examples/blink6drcs.c create mode 100644 examples/blink8.c create mode 100644 examples/clock.c create mode 100644 examples/delayTest.c create mode 100644 examples/ds1302.c create mode 100644 examples/echo.c create mode 100644 examples/header.h create mode 100644 examples/isr-osc.c create mode 100644 examples/isr.c create mode 100644 examples/lcd-adafruit.c create mode 100644 examples/lcd.c create mode 100644 examples/nes.c create mode 100644 examples/okLed.c create mode 100644 examples/pwm.c create mode 100644 examples/q2w/Makefile create mode 100644 examples/q2w/binary.c create mode 100644 examples/q2w/blink-io.c create mode 100644 examples/q2w/blink.c create mode 100644 examples/q2w/blink.sh create mode 100644 examples/q2w/bright.c create mode 100644 examples/q2w/button.c create mode 100644 examples/q2w/volts.c create mode 100644 examples/rht03.c create mode 100644 examples/serialRead.c create mode 100644 examples/serialTest.c create mode 100644 examples/servo.c create mode 100644 examples/softPwm.c create mode 100644 examples/softTone.c create mode 100644 examples/speed.c create mode 100644 examples/te.c create mode 100644 examples/tser.c create mode 100644 examples/wfi.c create mode 100644 examples/xserv.c create mode 100644 gpio/COPYING.LESSER create mode 100644 gpio/Makefile create mode 100644 gpio/extensions.c create mode 100644 gpio/extensions.h create mode 100644 gpio/gpio.1 create mode 100644 gpio/gpio.c create mode 100644 gpio/pins.c create mode 100644 gpio/pintest create mode 100644 gpio/readall.c create mode 100644 gpio/test.sh create mode 100644 pins/Makefile create mode 100644 pins/pins.pdf create mode 100644 pins/pins.tex create mode 100644 wiringPi/COPYING.LESSER create mode 100644 wiringPi/Makefile create mode 100644 wiringPi/drcSerial.c create mode 100644 wiringPi/drcSerial.h create mode 100644 wiringPi/max31855.c create mode 100644 wiringPi/max31855.h create mode 100644 wiringPi/max5322.c create mode 100644 wiringPi/max5322.h create mode 100644 wiringPi/mcp23008.c create mode 100644 wiringPi/mcp23008.h create mode 100644 wiringPi/mcp23016.c create mode 100644 wiringPi/mcp23016.h create mode 100644 wiringPi/mcp23016reg.h create mode 100644 wiringPi/mcp23017.c create mode 100644 wiringPi/mcp23017.h create mode 100644 wiringPi/mcp23s08.c create mode 100644 wiringPi/mcp23s08.h create mode 100644 wiringPi/mcp23s17.c create mode 100644 wiringPi/mcp23s17.h create mode 100644 wiringPi/mcp23x08.h create mode 100644 wiringPi/mcp23x0817.h create mode 100644 wiringPi/mcp3002.c create mode 100644 wiringPi/mcp3002.h create mode 100644 wiringPi/mcp3004.c create mode 100644 wiringPi/mcp3004.h create mode 100644 wiringPi/mcp3422.c create mode 100644 wiringPi/mcp3422.h create mode 100644 wiringPi/mcp4802.c create mode 100644 wiringPi/mcp4802.h create mode 100644 wiringPi/pcf8574.c create mode 100644 wiringPi/pcf8574.h create mode 100644 wiringPi/pcf8591.c create mode 100644 wiringPi/pcf8591.h create mode 100644 wiringPi/piHiPri.c create mode 100644 wiringPi/piThread.c create mode 100644 wiringPi/sn3218.c create mode 100644 wiringPi/sn3218.h create mode 100644 wiringPi/softPwm.c create mode 100644 wiringPi/softPwm.h create mode 100644 wiringPi/softServo.c create mode 100644 wiringPi/softServo.h create mode 100644 wiringPi/softTone.c create mode 100644 wiringPi/softTone.h create mode 100644 wiringPi/sr595.c create mode 100644 wiringPi/sr595.h create mode 100644 wiringPi/wiringPi.c create mode 100644 wiringPi/wiringPi.h create mode 100644 wiringPi/wiringPiI2C.c create mode 100644 wiringPi/wiringPiI2C.h create mode 100644 wiringPi/wiringPiSPI.c create mode 100644 wiringPi/wiringPiSPI.h create mode 100644 wiringPi/wiringSerial.c create mode 100644 wiringPi/wiringSerial.h create mode 100644 wiringPi/wiringShift.c create mode 100644 wiringPi/wiringShift.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..39e7ef2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.o +libwiringPiDev.so.2.0 +libwiringPi.so.2.0 +/test/ diff --git a/COPYING.LESSER b/COPYING.LESSER new file mode 100644 index 0000000..65c5ca8 --- /dev/null +++ b/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..8e0c43c --- /dev/null +++ b/INSTALL @@ -0,0 +1,36 @@ + +How to install wiringPi +======================= + +The easiest way is to use the supplied 'build' script: + + ./build + +that should do a complete install or upgrade of wiringPi for you. + +That will install a dynamic library. + +Some distributions do not have /usr/local/lib in the default LD_LIBRARY_PATH. To +fix this, you need to edit /etc/ld.so.conf and add in a single line: + + /usr/local/lib + +then run the ldconfig command. + + sudo ldconfig + +If you want to install a static library, you may need to do this manually: + + cd wiringPi + make static + sudo make install-static + + +To un-install wiringPi: + + ./build uninstall + +Gordon Henderson + +projects@drogon.net +https://projects.drogon.net/ diff --git a/People b/People new file mode 100644 index 0000000..a3cd31a --- /dev/null +++ b/People @@ -0,0 +1,42 @@ + +Just a quick note to some people who've provided help, suggestions, +bug-fixes, etc. along the way... + +Nick Lott: (And others) + Hints about making it work with C++ + +Philipp Stefan Neininger: + Minor bug in the Makefile to do with cross compiling + +Chris McSweeny + Hints and tips about the use of arithmetic in gettimeofday() + inside the dealyMicrosecondsHard() function. + And spotting a couple of schoolboy errors in the (experimental) + softServo code, prompting me to completely re-write it. + +Armin (Via projects website) + Some pointers about the i2c-dev.h files. + +Arno Wagner + Suggestions for the mmap calls in wiringPiSetup() + +CHARLES Thibaut: + A small issue in softTone + +Xian Stannard + Fixing some typos in the man page! + +Andre Crone + Suggested the __WIRING_PI.H__ round wiringPi.h + +Rik Teerling + Pointing out some silly mistooks in the I2C code... + +Xiao Zhengfeng + Porting wiringPi for Banana Pi. + +Will Xiao + Testing on Banana Pro/Pi. + +Peter Chen + Porting wiringPi for Banana Pro. diff --git a/build b/build new file mode 100644 index 0000000..7a2126e --- /dev/null +++ b/build @@ -0,0 +1,106 @@ +#!/bin/sh + +# check if sudo is required and save the result as ${PFX}: +[[ ${EUID} -ne 0 ]] && PFX='sudo ' || PFX='' + +check_make_ok() { + if [ $? != 0 ]; then + echo "" + echo "Make Failed..." + echo "Please check the messages and fix any problems. If you're still stuck," + echo "then please email all the output and as many details as you can to" + echo " projects@drogon.net" + echo "" + exit 1 + fi +} + +if [ x$1 = "xclean" ]; then + cd wiringPi + echo -n "wiringPi: " ; make clean + cd ../devLib + echo -n "DevLib: " ; make clean + cd ../gpio + echo -n "gpio: " ; make clean + cd ../examples + echo -n "Examples: " ; make clean + cd Gertboard + echo -n "Gertboard: " ; make clean + cd ../PiFace + echo -n "PiFace: " ; make clean + cd ../q2w + echo -n "Quick2Wire: " ; make clean + cd ../PiGlow + echo -n "PiGlow: " ; make clean + exit +fi + +if [ x$1 = "xuninstall" ]; then + cd wiringPi + echo -n "wiringPi: " ; ${PFX}make uninstall + cd ../devLib + echo -n "DevLib: " ; ${PFX}make uninstall + cd ../gpio + echo -n "gpio: " ; ${PFX}make uninstall + exit +fi + + + echo "wiringPi Build script" + echo "=====================" + echo + + echo + echo "WiringPi Library" + cd wiringPi + ${PFX}make uninstall + if [ x$1 = "xstatic" ]; then + make static + check_make_ok + ${PFX}make install-static + else + make + check_make_ok + ${PFX}make install + fi + check_make_ok + + echo + echo "WiringPi Devices Library" + cd ../devLib + ${PFX}make uninstall + if [ x$1 = "xstatic" ]; then + make static + check_make_ok + ${PFX}make install-static + else + make + check_make_ok + ${PFX}make install + fi + check_make_ok + + echo + echo "GPIO Utility" + cd ../gpio + make + check_make_ok + ${PFX}make install + check_make_ok + +# echo +# echo "Examples" +# cd ../examples +# make +# cd .. + +echo +echo All Done. +echo "" +echo "NOTE: To compile programs with wiringBP v2, you need to add:" +echo " -lwiringPi" +echo " to your compile line(s) To use the Gertboard, MaxDetect, etc." +echo " code (the devLib), you need to also add:" +echo " -lwiringPiDev" +echo " to your compile line(s)." +echo "" diff --git a/devLib/Makefile b/devLib/Makefile new file mode 100644 index 0000000..a3c0d42 --- /dev/null +++ b/devLib/Makefile @@ -0,0 +1,134 @@ +# Makefile: +# wiringPi device - Wiring Compatable library for the Raspberry Pi +# +# Copyright (c) 2012-2013 Gordon Henderson +################################################################################# +# This file is part of wiringPi: +# https://projects.drogon.net/raspberry-pi/wiringpi/ +# +# wiringPi is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# wiringPi is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with wiringPi. If not, see . +################################################################################# + +DYN_VERS_MAJ=2 +DYN_VERS_MIN=0 + +VERSION=$(DYN_VERS_MAJ).$(DYN_VERS_MIN) +DESTDIR=/usr +PREFIX=/local + +STATIC=libwiringPiDev.a +DYNAMIC=libwiringPiDev.so.$(VERSION) + +#DEBUG = -g -O0 +DEBUG = -O2 +CC = gcc +INCLUDE = -I. +CFLAGS = $(DEBUG) -Wformat=2 -Wall $(INCLUDE) -Winline -pipe -fPIC + +LIBS = + +############################################################################### + +SRC = ds1302.c maxdetect.c piNes.c \ + gertboard.c piFace.c \ + lcd128x64.c lcd.c \ + piGlow.c + +OBJ = $(SRC:.c=.o) + +all: $(DYNAMIC) + +static: $(STATIC) + +$(STATIC): $(OBJ) + @echo "[Link (Static)]" + @ar rcs $(STATIC) $(OBJ) + @ranlib $(STATIC) +# @size $(STATIC) + +$(DYNAMIC): $(OBJ) + @echo "[Link (Dynamic)]" + @$(CC) -shared -Wl,-soname,libwiringPiDev.so -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ) + +.c.o: + @echo [Compile] $< + @$(CC) -c $(CFLAGS) $< -o $@ + +.PHONEY: clean +clean: + @echo "[Clean]" + @rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.* + +.PHONEY: tags +tags: $(SRC) + @echo [ctags] + @ctags $(SRC) + + +.PHONEY: install-headers +install-headers: + @echo "[Install Headers]" + @install -m 0755 -d $(DESTDIR)$(PREFIX)/include + @install -m 0644 ds1302.h $(DESTDIR)$(PREFIX)/include + @install -m 0644 maxdetect.h $(DESTDIR)$(PREFIX)/include + @install -m 0644 piNes.h $(DESTDIR)$(PREFIX)/include + @install -m 0644 gertboard.h $(DESTDIR)$(PREFIX)/include + @install -m 0644 piFace.h $(DESTDIR)$(PREFIX)/include + @install -m 0644 lcd128x64.h $(DESTDIR)$(PREFIX)/include + @install -m 0644 lcd.h $(DESTDIR)$(PREFIX)/include + @install -m 0644 piGlow.h $(DESTDIR)$(PREFIX)/include + +.PHONEY: install +install: $(DYNAMIC) install-headers + @echo "[Install Dynamic Lib]" + @install -m 0755 -d $(DESTDIR)$(PREFIX)/lib + @install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) + @ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so + @ldconfig + +.PHONEY: install-static +install-static: $(STATIC) install-headers + @echo "[Install Static Lib]" + @install -m 0755 -d $(DESTDIR)$(PREFIX)/lib + @install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib + +.PHONEY: uninstall +uninstall: + @echo "[UnInstall]" + @rm -f $(DESTDIR)$(PREFIX)/include/ds1302.h + @rm -f $(DESTDIR)$(PREFIX)/include/maxdetect.h + @rm -f $(DESTDIR)$(PREFIX)/include/piNes.h + @rm -f $(DESTDIR)$(PREFIX)/include/gertboard.h + @rm -f $(DESTDIR)$(PREFIX)/include/piFace.h + @rm -f $(DESTDIR)$(PREFIX)/include/lcd128x64.h + @rm -f $(DESTDIR)$(PREFIX)/include/lcd.h + @rm -f $(DESTDIR)$(PREFIX)/include/piGlow.h + @rm -f $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.* + @ldconfig + + +.PHONEY: depend +depend: + makedepend -Y $(SRC) + +# DO NOT DELETE + +ds1302.o: ds1302.h +maxdetect.o: maxdetect.h +piNes.o: piNes.h +gertboard.o: gertboard.h +piFace.o: piFace.h +lcd128x64.o: font.h lcd128x64.h +lcd.o: lcd.h +piGlow.o: piGlow.h diff --git a/devLib/ds1302.c b/devLib/ds1302.c new file mode 100644 index 0000000..cf64de7 --- /dev/null +++ b/devLib/ds1302.c @@ -0,0 +1,240 @@ +/* + * ds1302.c: + * Real Time clock + * + * Copyright (c) 2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#include +#include +#include +#include + +#include + +#include "ds1302.h" + +// Register defines + +#define RTC_SECS 0 +#define RTC_MINS 1 +#define RTC_HOURS 2 +#define RTC_DATE 3 +#define RTC_MONTH 4 +#define RTC_DAY 5 +#define RTC_YEAR 6 +#define RTC_WP 7 +#define RTC_TC 8 +#define RTC_BM 31 + + +// Locals + +static int dPin, cPin, sPin ; + +/* + * dsShiftIn: + * Shift a number in from the chip, LSB first. Note that the data is + * sampled on the trailing edge of the last clock, so it's valid immediately. + ********************************************************************************* + */ + +static unsigned int dsShiftIn (void) +{ + uint8_t value = 0 ; + int i ; + + pinMode (dPin, INPUT) ; delayMicroseconds (1) ; + + for (i = 0 ; i < 8 ; ++i) + { + value |= (digitalRead (dPin) << i) ; + digitalWrite (cPin, HIGH) ; delayMicroseconds (1) ; + digitalWrite (cPin, LOW) ; delayMicroseconds (1) ; + } + + return value; +} + + +/* + * dsShiftOut: + * A normal LSB-first shift-out, just slowed down a bit - the Pi is + * a bit faster than the chip can handle. + ********************************************************************************* + */ + +static void dsShiftOut (unsigned int data) +{ + int i ; + + pinMode (dPin, OUTPUT) ; + + for (i = 0 ; i < 8 ; ++i) + { + digitalWrite (dPin, data & (1 << i)) ; delayMicroseconds (1) ; + digitalWrite (cPin, HIGH) ; delayMicroseconds (1) ; + digitalWrite (cPin, LOW) ; delayMicroseconds (1) ; + } +} + + +/* + * ds1302regRead: ds1302regWrite: + * Read/Write a value to an RTC Register or RAM location on the chip + ********************************************************************************* + */ + +static unsigned int ds1302regRead (const int reg) +{ + unsigned int data ; + + digitalWrite (sPin, HIGH) ; delayMicroseconds (1) ; + dsShiftOut (reg) ; + data = dsShiftIn () ; + digitalWrite (sPin, LOW) ; delayMicroseconds (1) ; + + return data ; +} + +static void ds1302regWrite (const int reg, const unsigned int data) +{ + digitalWrite (sPin, HIGH) ; delayMicroseconds (1) ; + dsShiftOut (reg) ; + dsShiftOut (data) ; + digitalWrite (sPin, LOW) ; delayMicroseconds (1) ; +} + + +/* + * ds1302rtcWrite: ds1302rtcRead: + * Writes/Reads the data to/from the RTC register + ********************************************************************************* + */ + +unsigned int ds1302rtcRead (const int reg) +{ + return ds1302regRead (0x81 | ((reg & 0x1F) << 1)) ; +} + +void ds1302rtcWrite (int reg, unsigned int data) +{ + ds1302regWrite (0x80 | ((reg & 0x1F) << 1), data) ; +} + + +/* + * ds1302ramWrite: ds1302ramRead: + * Writes/Reads the data to/from the RTC register + ********************************************************************************* + */ + +unsigned int ds1302ramRead (const int addr) +{ + return ds1302regRead (0xC1 | ((addr & 0x1F) << 1)) ; +} + +void ds1302ramWrite (const int addr, const unsigned int data) +{ + ds1302regWrite ( 0xC0 | ((addr & 0x1F) << 1), data) ; +} + +/* + * ds1302clockRead: + * Read all 8 bytes of the clock in a single operation + ********************************************************************************* + */ + +void ds1302clockRead (int clockData [8]) +{ + int i ; + unsigned int regVal = 0x81 | ((RTC_BM & 0x1F) << 1) ; + + digitalWrite (sPin, HIGH) ; delayMicroseconds (1) ; + + dsShiftOut (regVal) ; + for (i = 0 ; i < 8 ; ++i) + clockData [i] = dsShiftIn () ; + + digitalWrite (sPin, LOW) ; delayMicroseconds (1) ; +} + + +/* + * ds1302clockWrite: + * Write all 8 bytes of the clock in a single operation + ********************************************************************************* + */ + +void ds1302clockWrite (const int clockData [8]) +{ + int i ; + unsigned int regVal = 0x80 | ((RTC_BM & 0x1F) << 1) ; + + digitalWrite (sPin, HIGH) ; delayMicroseconds (1) ; + + dsShiftOut (regVal) ; + for (i = 0 ; i < 8 ; ++i) + dsShiftOut (clockData [i]) ; + + digitalWrite (sPin, LOW) ; delayMicroseconds (1) ; +} + + +/* + * ds1302trickleCharge: + * Set the bits on the trickle charger. + * Probably best left alone... + ********************************************************************************* + */ + +void ds1302trickleCharge (const int diodes, const int resistors) +{ + if (diodes + resistors == 0) + ds1302rtcWrite (RTC_TC, 0x5C) ; // Disabled + else + ds1302rtcWrite (RTC_TC, 0xA0 | ((diodes & 3) << 2) | (resistors & 3)) ; +} + + + + +/* + * ds1302setup: + * Initialise the chip & remember the pins we're using + ********************************************************************************* + */ + +void ds1302setup (const int clockPin, const int dataPin, const int csPin) +{ + dPin = dataPin ; + cPin = clockPin ; + sPin = csPin ; + + digitalWrite (dPin, LOW) ; + digitalWrite (cPin, LOW) ; + digitalWrite (sPin, LOW) ; + + pinMode (dPin, OUTPUT) ; + pinMode (cPin, OUTPUT) ; + pinMode (sPin, OUTPUT) ; + + ds1302rtcWrite (RTC_WP, 0) ; // Remove write-protect +} diff --git a/devLib/ds1302.h b/devLib/ds1302.h new file mode 100644 index 0000000..e82b3ed --- /dev/null +++ b/devLib/ds1302.h @@ -0,0 +1,44 @@ +/* + * ds1302.h: + * Real Time clock + * + * Copyright (c) 2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#ifdef __cplusplus +extern "C" { +#endif + +extern unsigned int ds1302rtcRead (const int reg) ; +extern void ds1302rtcWrite (const int reg, const unsigned int data) ; + +extern unsigned int ds1302ramRead (const int addr) ; +extern void ds1302ramWrite (const int addr, const unsigned int data) ; + +extern void ds1302clockRead (int clockData [8]) ; +extern void ds1302clockWrite (const int clockData [8]) ; + +extern void ds1302trickleCharge (const int diodes, const int resistors) ; + +extern void ds1302setup (const int clockPin, const int dataPin, const int csPin) ; + +#ifdef __cplusplus +} +#endif diff --git a/devLib/font.h b/devLib/font.h new file mode 100644 index 0000000..ce99e16 --- /dev/null +++ b/devLib/font.h @@ -0,0 +1,2577 @@ +/**********************************************/ +/* */ +/* Font file generated by cpi2fnt */ +/* ------------------------------ */ +/* Combined with the alpha-numeric */ +/* portion of Greg Harp's old PEARL */ +/* font (from earlier versions of */ +/* linux-m86k) by John Shifflett */ +/* */ +/**********************************************/ + +static const int fontHeight = 8 ; +static const int fontWidth = 8 ; + +static unsigned char font [] = +{ + /* 0 0x00 '^@' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 1 0x01 '^A' */ + 0x7e, /* 01111110 */ + 0x81, /* 10000001 */ + 0xa5, /* 10100101 */ + 0x81, /* 10000001 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0x81, /* 10000001 */ + 0x7e, /* 01111110 */ + + /* 2 0x02 '^B' */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xdb, /* 11011011 */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + + /* 3 0x03 '^C' */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + + /* 4 0x04 '^D' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + + /* 5 0x05 '^E' */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + + /* 6 0x06 '^F' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + + /* 7 0x07 '^G' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 8 0x08 '^H' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xe7, /* 11100111 */ + 0xc3, /* 11000011 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 9 0x09 '^I' */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x42, /* 01000010 */ + 0x42, /* 01000010 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 10 0x0a '^J' */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0x99, /* 10011001 */ + 0xbd, /* 10111101 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0xc3, /* 11000011 */ + 0xff, /* 11111111 */ + + /* 11 0x0b '^K' */ + 0x0f, /* 00001111 */ + 0x07, /* 00000111 */ + 0x0f, /* 00001111 */ + 0x7d, /* 01111101 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + + /* 12 0x0c '^L' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + + /* 13 0x0d '^M' */ + 0x3f, /* 00111111 */ + 0x33, /* 00110011 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x70, /* 01110000 */ + 0xf0, /* 11110000 */ + 0xe0, /* 11100000 */ + + /* 14 0x0e '^N' */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x63, /* 01100011 */ + 0x67, /* 01100111 */ + 0xe6, /* 11100110 */ + 0xc0, /* 11000000 */ + + /* 15 0x0f '^O' */ + 0x18, /* 00011000 */ + 0xdb, /* 11011011 */ + 0x3c, /* 00111100 */ + 0xe7, /* 11100111 */ + 0xe7, /* 11100111 */ + 0x3c, /* 00111100 */ + 0xdb, /* 11011011 */ + 0x18, /* 00011000 */ + + /* 16 0x10 '^P' */ + 0x80, /* 10000000 */ + 0xe0, /* 11100000 */ + 0xf8, /* 11111000 */ + 0xfe, /* 11111110 */ + 0xf8, /* 11111000 */ + 0xe0, /* 11100000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + + /* 17 0x11 '^Q' */ + 0x02, /* 00000010 */ + 0x0e, /* 00001110 */ + 0x3e, /* 00111110 */ + 0xfe, /* 11111110 */ + 0x3e, /* 00111110 */ + 0x0e, /* 00001110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + + /* 18 0x12 '^R' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + + /* 19 0x13 '^S' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* 20 0x14 '^T' */ + 0x7f, /* 01111111 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7b, /* 01111011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x00, /* 00000000 */ + + /* 21 0x15 '^U' */ + 0x3e, /* 00111110 */ + 0x61, /* 01100001 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x86, /* 10000110 */ + 0x7c, /* 01111100 */ + + /* 22 0x16 '^V' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 23 0x17 '^W' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + + /* 24 0x18 '^X' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 25 0x19 '^Y' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 26 0x1a '^Z' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 27 0x1b '^[' */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xfe, /* 11111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 28 0x1c '^\' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 29 0x1d '^]' */ + 0x00, /* 00000000 */ + 0x24, /* 00100100 */ + 0x66, /* 01100110 */ + 0xff, /* 11111111 */ + 0x66, /* 01100110 */ + 0x24, /* 00100100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 30 0x1e '^^' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 31 0x1f '^_' */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 32 0x20 ' ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 33 0x21 '!' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 34 0x22 '"' */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 35 0x23 '#' */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 36 0x24 '$' */ + 0x18, /* 00011000 */ + 0x3e, /* 00111110 */ + 0x60, /* 01100000 */ + 0x3c, /* 00111100 */ + 0x06, /* 00000110 */ + 0x7c, /* 01111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 37 0x25 '%' */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x66, /* 01100110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 38 0x26 '&' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x68, /* 01101000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 39 0x27 ''' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 40 0x28 '(' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + + /* 41 0x29 ')' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + + /* 42 0x2a '*' */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0xff, /* 11111111 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 43 0x2b '+' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 44 0x2c ',' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + + /* 45 0x2d '-' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 46 0x2e '.' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 47 0x2f '/' */ + 0x03, /* 00000011 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* 48 0x30 '0' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xde, /* 11011110 */ + 0xfe, /* 11111110 */ + 0xf6, /* 11110110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 49 0x31 '1' */ + 0x18, /* 00011000 */ + 0x78, /* 01111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 50 0x32 '2' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 51 0x33 '3' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x1c, /* 00011100 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 52 0x34 '4' */ + 0x1c, /* 00011100 */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + + /* 53 0x35 '5' */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 54 0x36 '6' */ + 0x38, /* 00111000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 55 0x37 '7' */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + + /* 56 0x38 '8' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 57 0x39 '9' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 58 0x3a ':' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 59 0x3b ';' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + + /* 60 0x3c '<' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + + /* 61 0x3d '=' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 62 0x3e '>' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + + /* 63 0x3f '?' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 64 0x40 '@' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 65 0x41 'A' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 66 0x42 'B' */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 67 0x43 'C' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 68 0x44 'D' */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 69 0x45 'E' */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xf8, /* 11111000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 70 0x46 'F' */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xf8, /* 11111000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* 71 0x47 'G' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xce, /* 11001110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 72 0x48 'H' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 73 0x49 'I' */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 74 0x4a 'J' */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 75 0x4b 'K' */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0xd8, /* 11011000 */ + 0xf0, /* 11110000 */ + 0xd8, /* 11011000 */ + 0xcc, /* 11001100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 76 0x4c 'L' */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 77 0x4d 'M' */ + 0x82, /* 10000010 */ + 0xc6, /* 11000110 */ + 0xee, /* 11101110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 78 0x4e 'N' */ + 0xc6, /* 11000110 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 79 0x4f 'O' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 80 0x50 'P' */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfc, /* 11111100 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* 81 0x51 'Q' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0x7c, /* 01111100 */ + 0x06, /* 00000110 */ + + /* 82 0x52 'R' */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfc, /* 11111100 */ + 0xd8, /* 11011000 */ + 0xcc, /* 11001100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 83 0x53 'S' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x38, /* 00111000 */ + 0x0c, /* 00001100 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 84 0x54 'T' */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 85 0x55 'U' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 86 0x56 'V' */ + 0xc3, /* 11000011 */ + 0xc3, /* 11000011 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 87 0x57 'W' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0xee, /* 11101110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 88 0x58 'X' */ + 0xc3, /* 11000011 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc3, /* 11000011 */ + 0x00, /* 00000000 */ + + /* 89 0x59 'Y' */ + 0xc3, /* 11000011 */ + 0xc3, /* 11000011 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 90 0x5a 'Z' */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 91 0x5b '[' */ + 0x3c, /* 00111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 92 0x5c '\' */ + 0xc0, /* 11000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x03, /* 00000011 */ + 0x00, /* 00000000 */ + + /* 93 0x5d ']' */ + 0x3c, /* 00111100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 94 0x5e '^' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 95 0x5f '_' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + + /* 96 0x60 '`' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 97 0x61 'a' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0x06, /* 00000110 */ + 0x7e, /* 01111110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 98 0x62 'b' */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 99 0x63 'c' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 100 0x64 'd' */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x7e, /* 01111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 101 0x65 'e' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 102 0x66 'f' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + + /* 103 0x67 'g' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x7c, /* 01111100 */ + + /* 104 0x68 'h' */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 105 0x69 'i' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 106 0x6a 'j' */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + + /* 107 0x6b 'k' */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xcc, /* 11001100 */ + 0xd8, /* 11011000 */ + 0xf0, /* 11110000 */ + 0xd8, /* 11011000 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + + /* 108 0x6c 'l' */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 109 0x6d 'm' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xec, /* 11101100 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 110 0x6e 'n' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 111 0x6f 'o' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 112 0x70 'p' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfc, /* 11111100 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + + /* 113 0x71 'q' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + + /* 114 0x72 'r' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0xe6, /* 11100110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* 115 0x73 's' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 116 0x74 't' */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x7c, /* 01111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x36, /* 00110110 */ + 0x1c, /* 00011100 */ + 0x00, /* 00000000 */ + + /* 117 0x75 'u' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 118 0x76 'v' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 119 0x77 'w' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 120 0x78 'x' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 121 0x79 'y' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc3, /* 11000011 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + + /* 122 0x7a 'z' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x38, /* 00111000 */ + 0x60, /* 01100000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 123 0x7b '{' */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x00, /* 00000000 */ + + /* 124 0x7c '|' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 125 0x7d '}' */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 126 0x7e '~' */ + 0x72, /* 01110010 */ + 0x9c, /* 10011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 127 0x7f '' */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 128 0x80 '€' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + + /* 129 0x81 '' */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 130 0x82 '‚' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 131 0x83 'ƒ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 132 0x84 '„' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 133 0x85 '…' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 134 0x86 '†' */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 135 0x87 '‡' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x0c, /* 00001100 */ + 0x38, /* 00111000 */ + + /* 136 0x88 'ˆ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 137 0x89 '‰' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 138 0x8a 'Š' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 139 0x8b '‹' */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 140 0x8c 'Œ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 141 0x8d '' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 142 0x8e 'Ž' */ + 0xc6, /* 11000110 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 143 0x8f '' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 144 0x90 '' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xf8, /* 11111000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 145 0x91 '‘' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 146 0x92 '’' */ + 0x3e, /* 00111110 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + + /* 147 0x93 '“' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 148 0x94 '”' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 149 0x95 '•' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 150 0x96 '–' */ + 0x78, /* 01111000 */ + 0x84, /* 10000100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 151 0x97 '—' */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 152 0x98 '˜' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + + /* 153 0x99 '™' */ + 0xc6, /* 11000110 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 154 0x9a 'š' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 155 0x9b '›' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 156 0x9c 'œ' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x64, /* 01100100 */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x66, /* 01100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 157 0x9d '' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 158 0x9e 'ž' */ + 0xf8, /* 11111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xfa, /* 11111010 */ + 0xc6, /* 11000110 */ + 0xcf, /* 11001111 */ + 0xc6, /* 11000110 */ + 0xc7, /* 11000111 */ + + /* 159 0x9f 'Ÿ' */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 160 0xa0 ' ' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 161 0xa1 '¡' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 162 0xa2 '¢' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 163 0xa3 '£' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 164 0xa4 '¤' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* 165 0xa5 '¥' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + + /* 166 0xa6 '¦' */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 167 0xa7 '§' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 168 0xa8 '¨' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x63, /* 01100011 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + + /* 169 0xa9 '©' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 170 0xaa 'ª' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 171 0xab '«' */ + 0x63, /* 01100011 */ + 0xe6, /* 11100110 */ + 0x6c, /* 01101100 */ + 0x7e, /* 01111110 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x0f, /* 00001111 */ + + /* 172 0xac '¬' */ + 0x63, /* 01100011 */ + 0xe6, /* 11100110 */ + 0x6c, /* 01101100 */ + 0x7a, /* 01111010 */ + 0x36, /* 00110110 */ + 0x6a, /* 01101010 */ + 0xdf, /* 11011111 */ + 0x06, /* 00000110 */ + + /* 173 0xad '­' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 174 0xae '®' */ + 0x00, /* 00000000 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x66, /* 01100110 */ + 0x33, /* 00110011 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 175 0xaf '¯' */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0x66, /* 01100110 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 176 0xb0 '°' */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + + /* 177 0xb1 '±' */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + + /* 178 0xb2 '²' */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + + /* 179 0xb3 '³' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 180 0xb4 '´' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 181 0xb5 'µ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 182 0xb6 '¶' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 183 0xb7 '·' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 184 0xb8 '¸' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 185 0xb9 '¹' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 186 0xba 'º' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 187 0xbb '»' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 188 0xbc '¼' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 189 0xbd '½' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 190 0xbe '¾' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 191 0xbf '¿' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 192 0xc0 'À' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 193 0xc1 'Á' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 194 0xc2 'Â' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 195 0xc3 'Ã' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 196 0xc4 'Ä' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 197 0xc5 'Å' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 198 0xc6 'Æ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 199 0xc7 'Ç' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 200 0xc8 'È' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 201 0xc9 'É' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 202 0xca 'Ê' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 203 0xcb 'Ë' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 204 0xcc 'Ì' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 205 0xcd 'Í' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 206 0xce 'Î' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 207 0xcf 'Ï' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 208 0xd0 'Ð' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 209 0xd1 'Ñ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 210 0xd2 'Ò' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 211 0xd3 'Ó' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 212 0xd4 'Ô' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 213 0xd5 'Õ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 214 0xd6 'Ö' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 215 0xd7 '×' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 216 0xd8 'Ø' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 217 0xd9 'Ù' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 218 0xda 'Ú' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 219 0xdb 'Û' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 220 0xdc 'Ü' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 221 0xdd 'Ý' */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + + /* 222 0xde 'Þ' */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + + /* 223 0xdf 'ß' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 224 0xe0 'à' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xc8, /* 11001000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 225 0xe1 'á' */ + 0x78, /* 01111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xd8, /* 11011000 */ + 0xcc, /* 11001100 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + + /* 226 0xe2 'â' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* 227 0xe3 'ã' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 228 0xe4 'ä' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 229 0xe5 'å' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 230 0xe6 'æ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0xc0, /* 11000000 */ + + /* 231 0xe7 'ç' */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 232 0xe8 'è' */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + + /* 233 0xe9 'é' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 234 0xea 'ê' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xee, /* 11101110 */ + 0x00, /* 00000000 */ + + /* 235 0xeb 'ë' */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x3e, /* 00111110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 236 0xec 'ì' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 237 0xed 'í' */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + + /* 238 0xee 'î' */ + 0x1e, /* 00011110 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + + /* 239 0xef 'ï' */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 240 0xf0 'ð' */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 241 0xf1 'ñ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 242 0xf2 'ò' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 243 0xf3 'ó' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 244 0xf4 'ô' */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 245 0xf5 'õ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + + /* 246 0xf6 'ö' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 247 0xf7 '÷' */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 248 0xf8 'ø' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 249 0xf9 'ù' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 250 0xfa 'ú' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 251 0xfb 'û' */ + 0x0f, /* 00001111 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xec, /* 11101100 */ + 0x6c, /* 01101100 */ + 0x3c, /* 00111100 */ + 0x1c, /* 00011100 */ + + /* 252 0xfc 'ü' */ + 0x6c, /* 01101100 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 253 0xfd 'ý' */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 254 0xfe 'þ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 255 0xff 'ÿ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + +}; diff --git a/devLib/gertboard.c b/devLib/gertboard.c new file mode 100644 index 0000000..5aeaef7 --- /dev/null +++ b/devLib/gertboard.c @@ -0,0 +1,164 @@ +/* + * gertboard.c: + * Access routines for the SPI devices on the Gertboard + * Copyright (c) 2012 Gordon Henderson + * + * The Gertboard has: + * + * An MCP3002 dual-channel A to D convertor connected + * to the SPI bus, selected by chip-select A, and: + * + * An MCP4802 dual-channel D to A convertor connected + * to the SPI bus, selected via chip-select B. + * + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with wiringPi. + * If not, see . + *********************************************************************** + */ + + +#include +#include +#include +#include +#include + +#include +#include + +#include "gertboard.h" + +// The A-D convertor won't run at more than 1MHz @ 3.3v + +#define SPI_ADC_SPEED 1000000 +#define SPI_DAC_SPEED 1000000 +#define SPI_A2D 0 +#define SPI_D2A 1 + + +/* + * gertboardAnalogWrite: + * Write an 8-bit data value to the MCP4802 Analog to digital + * convertor on the Gertboard. + ********************************************************************************* + */ + +void gertboardAnalogWrite (const int chan, const int value) +{ + uint8_t spiData [2] ; + uint8_t chanBits, dataBits ; + + if (chan == 0) + chanBits = 0x30 ; + else + chanBits = 0xB0 ; + + chanBits |= ((value >> 4) & 0x0F) ; + dataBits = ((value << 4) & 0xF0) ; + + spiData [0] = chanBits ; + spiData [1] = dataBits ; + + wiringPiSPIDataRW (SPI_D2A, spiData, 2) ; +} + + +/* + * gertboardAnalogRead: + * Return the analog value of the given channel (0/1). + * The A/D is a 10-bit device + ********************************************************************************* + */ + +int gertboardAnalogRead (const int chan) +{ + uint8_t spiData [2] ; + + uint8_t chanBits ; + + if (chan == 0) + chanBits = 0b11010000 ; + else + chanBits = 0b11110000 ; + + spiData [0] = chanBits ; + spiData [1] = 0 ; + + wiringPiSPIDataRW (SPI_A2D, spiData, 2) ; + + return ((spiData [0] << 7) | (spiData [1] >> 1)) & 0x3FF ; +} + + +/* + * gertboardSPISetup: + * Initialise the SPI bus, etc. + ********************************************************************************* + */ + +int gertboardSPISetup (void) +{ + if (wiringPiSPISetup (SPI_A2D, SPI_ADC_SPEED) < 0) + return -1 ; + + if (wiringPiSPISetup (SPI_D2A, SPI_DAC_SPEED) < 0) + return -1 ; + + return 0 ; +} + + +/* + * New wiringPi node extension methods. + ********************************************************************************* + */ + +static int myAnalogRead (struct wiringPiNodeStruct *node, const int chan) +{ + return gertboardAnalogRead (chan - node->pinBase) ; +} + +static void myAnalogWrite (struct wiringPiNodeStruct *node, const int chan, const int value) +{ + gertboardAnalogWrite (chan - node->pinBase, value) ; +} + + +/* + * gertboardAnalogSetup: + * Create a new wiringPi device node for the analog devices on the + * Gertboard. We create one node with 2 pins - each pin being read + * and write - although the operations actually go to different + * hardware devices. + ********************************************************************************* + */ + +int gertboardAnalogSetup (const int pinBase) +{ + struct wiringPiNodeStruct *node ; + int x ; + + if (( x = gertboardSPISetup ()) != 0) + return x; + + node = wiringPiNewNode (pinBase, 2) ; + node->analogRead = myAnalogRead ; + node->analogWrite = myAnalogWrite ; + + return 0 ; +} diff --git a/devLib/gertboard.h b/devLib/gertboard.h new file mode 100644 index 0000000..3fa1919 --- /dev/null +++ b/devLib/gertboard.h @@ -0,0 +1,45 @@ +/* + * gertboard.h: + * Access routines for the SPI devices on the Gertboard + * Copyright (c) 2012 Gordon Henderson + * + * The Gertboard has an MCP4802 dual-channel D to A convertor + * connected to the SPI bus, selected via chip-select B. + * + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with wiringPi. + * If not, see . + *********************************************************************** + */ + +#ifdef __cplusplus +extern "C" { +#endif + +// Old routines + +extern void gertboardAnalogWrite (const int chan, const int value) ; +extern int gertboardAnalogRead (const int chan) ; +extern int gertboardSPISetup (void) ; + +// New + +extern int gertboardAnalogSetup (const int pinBase) ; + +#ifdef __cplusplus +} +#endif diff --git a/devLib/lcd.c b/devLib/lcd.c new file mode 100644 index 0000000..6c0e474 --- /dev/null +++ b/devLib/lcd.c @@ -0,0 +1,495 @@ +/* + * lcd.c: + * Text-based LCD driver. + * This is designed to drive the parallel interface LCD drivers + * based in the Hitachi HD44780U controller and compatables. + * + * Copyright (c) 2012 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#include +#include +#include + +#include + +#include "lcd.h" + +#ifndef TRUE +# define TRUE (1==1) +# define FALSE (1==2) +#endif + +// HD44780U Commands + +#define LCD_CLEAR 0x01 +#define LCD_HOME 0x02 +#define LCD_ENTRY 0x04 +#define LCD_CTRL 0x08 +#define LCD_CDSHIFT 0x10 +#define LCD_FUNC 0x20 +#define LCD_CGRAM 0x40 +#define LCD_DGRAM 0x80 + +// Bits in the entry register + +#define LCD_ENTRY_SH 0x01 +#define LCD_ENTRY_ID 0x02 + +// Bits in the control register + +#define LCD_BLINK_CTRL 0x01 +#define LCD_CURSOR_CTRL 0x02 +#define LCD_DISPLAY_CTRL 0x04 + +// Bits in the function register + +#define LCD_FUNC_F 0x04 +#define LCD_FUNC_N 0x08 +#define LCD_FUNC_DL 0x10 + +#define LCD_CDSHIFT_RL 0x04 + +struct lcdDataStruct +{ + int bits, rows, cols ; + int rsPin, strbPin ; + int dataPins [8] ; + int cx, cy ; +} ; + +struct lcdDataStruct *lcds [MAX_LCDS] ; + +static int lcdControl ; + +// Row offsets + +static const int rowOff [4] = { 0x00, 0x40, 0x14, 0x54 } ; + + +/* + * strobe: + * Toggle the strobe (Really the "E") pin to the device. + * According to the docs, data is latched on the falling edge. + ********************************************************************************* + */ + +static void strobe (const struct lcdDataStruct *lcd) +{ + +// Note timing changes for new version of delayMicroseconds () + + digitalWrite (lcd->strbPin, 1) ; delayMicroseconds (50) ; + digitalWrite (lcd->strbPin, 0) ; delayMicroseconds (50) ; +} + + +/* + * sentDataCmd: + * Send an data or command byte to the display. + ********************************************************************************* + */ + +static void sendDataCmd (const struct lcdDataStruct *lcd, unsigned char data) +{ + register unsigned char myData = data ; + unsigned char i, d4 ; + + if (lcd->bits == 4) + { + d4 = (myData >> 4) & 0x0F; + for (i = 0 ; i < 4 ; ++i) + { + digitalWrite (lcd->dataPins [i], (d4 & 1)) ; + d4 >>= 1 ; + } + strobe (lcd) ; + + d4 = myData & 0x0F ; + for (i = 0 ; i < 4 ; ++i) + { + digitalWrite (lcd->dataPins [i], (d4 & 1)) ; + d4 >>= 1 ; + } + } + else + { + for (i = 0 ; i < 8 ; ++i) + { + digitalWrite (lcd->dataPins [i], (myData & 1)) ; + myData >>= 1 ; + } + } + strobe (lcd) ; +} + + +/* + * putCommand: + * Send a command byte to the display + ********************************************************************************* + */ + +static void putCommand (const struct lcdDataStruct *lcd, unsigned char command) +{ + digitalWrite (lcd->rsPin, 0) ; + sendDataCmd (lcd, command) ; + delay (2) ; +} + +static void put4Command (const struct lcdDataStruct *lcd, unsigned char command) +{ + register unsigned char myCommand = command ; + register unsigned char i ; + + digitalWrite (lcd->rsPin, 0) ; + + for (i = 0 ; i < 4 ; ++i) + { + digitalWrite (lcd->dataPins [i], (myCommand & 1)) ; + myCommand >>= 1 ; + } + strobe (lcd) ; +} + + +/* + ********************************************************************************* + * User Callable code below here + ********************************************************************************* + */ + +/* + * lcdHome: lcdClear: + * Home the cursor or clear the screen. + ********************************************************************************* + */ + +void lcdHome (const int fd) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + + putCommand (lcd, LCD_HOME) ; + lcd->cx = lcd->cy = 0 ; + delay (5) ; +} + +void lcdClear (const int fd) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + + putCommand (lcd, LCD_CLEAR) ; + putCommand (lcd, LCD_HOME) ; + lcd->cx = lcd->cy = 0 ; + delay (5) ; +} + + +/* + * lcdDisplay: lcdCursor: lcdCursorBlink: + * Turn the display, cursor, cursor blinking on/off + ********************************************************************************* + */ + +void lcdDisplay (const int fd, int state) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + + if (state) + lcdControl |= LCD_DISPLAY_CTRL ; + else + lcdControl &= ~LCD_DISPLAY_CTRL ; + + putCommand (lcd, LCD_CTRL | lcdControl) ; +} + +void lcdCursor (const int fd, int state) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + + if (state) + lcdControl |= LCD_CURSOR_CTRL ; + else + lcdControl &= ~LCD_CURSOR_CTRL ; + + putCommand (lcd, LCD_CTRL | lcdControl) ; +} + +void lcdCursorBlink (const int fd, int state) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + + if (state) + lcdControl |= LCD_BLINK_CTRL ; + else + lcdControl &= ~LCD_BLINK_CTRL ; + + putCommand (lcd, LCD_CTRL | lcdControl) ; +} + + +/* + * lcdSendCommand: + * Send any arbitary command to the display + ********************************************************************************* + */ + +void lcdSendCommand (const int fd, unsigned char command) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + putCommand (lcd, command) ; +} + + +/* + * lcdPosition: + * Update the position of the cursor on the display. + * Ignore invalid locations. + ********************************************************************************* + */ + +void lcdPosition (const int fd, int x, int y) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + + if ((x > lcd->cols) || (x < 0)) + return ; + if ((y > lcd->rows) || (y < 0)) + return ; + + putCommand (lcd, x + (LCD_DGRAM | rowOff [y])) ; + + lcd->cx = x ; + lcd->cy = y ; +} + + +/* + * lcdCharDef: + * Defines a new character in the CGRAM + ********************************************************************************* + */ + +void lcdCharDef (const int fd, int index, unsigned char data [8]) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + int i ; + + putCommand (lcd, LCD_CGRAM | ((index & 7) << 3)) ; + + digitalWrite (lcd->rsPin, 1) ; + for (i = 0 ; i < 8 ; ++i) + sendDataCmd (lcd, data [i]) ; +} + + +/* + * lcdPutchar: + * Send a data byte to be displayed on the display. We implement a very + * simple terminal here - with line wrapping, but no scrolling. Yet. + ********************************************************************************* + */ + +void lcdPutchar (const int fd, unsigned char data) +{ + struct lcdDataStruct *lcd = lcds [fd] ; + + digitalWrite (lcd->rsPin, 1) ; + sendDataCmd (lcd, data) ; + + if (++lcd->cx == lcd->cols) + { + lcd->cx = 0 ; + if (++lcd->cy == lcd->rows) + lcd->cy = 0 ; + + putCommand (lcd, lcd->cx + (LCD_DGRAM | rowOff [lcd->cy])) ; + } +} + + +/* + * lcdPuts: + * Send a string to be displayed on the display + ********************************************************************************* + */ + +void lcdPuts (const int fd, const char *string) +{ + while (*string) + lcdPutchar (fd, *string++) ; +} + + +/* + * lcdPrintf: + * Printf to an LCD display + ********************************************************************************* + */ + +void lcdPrintf (const int fd, const char *message, ...) +{ + va_list argp ; + char buffer [1024] ; + + va_start (argp, message) ; + vsnprintf (buffer, 1023, message, argp) ; + va_end (argp) ; + + lcdPuts (fd, buffer) ; +} + + +/* + * lcdInit: + * Take a lot of parameters and initialise the LCD, and return a handle to + * that LCD, or -1 if any error. + ********************************************************************************* + */ + +int lcdInit (const int rows, const int cols, const int bits, + const int rs, const int strb, + const int d0, const int d1, const int d2, const int d3, const int d4, + const int d5, const int d6, const int d7) +{ + static int initialised = 0 ; + + unsigned char func ; + int i ; + int lcdFd = -1 ; + struct lcdDataStruct *lcd ; + + if (initialised == 0) + { + initialised = 1 ; + for (i = 0 ; i < MAX_LCDS ; ++i) + lcds [i] = NULL ; + } + +// Simple sanity checks + + if (! ((bits == 4) || (bits == 8))) + return -1 ; + + if ((rows < 0) || (rows > 20)) + return -1 ; + + if ((cols < 0) || (cols > 20)) + return -1 ; + +// Create a new LCD: + + for (i = 0 ; i < MAX_LCDS ; ++i) + { + if (lcds [i] == NULL) + { + lcdFd = i ; + break ; + } + } + + if (lcdFd == -1) + return -1 ; + + lcd = (struct lcdDataStruct *)malloc (sizeof (struct lcdDataStruct)) ; + if (lcd == NULL) + return -1 ; + + lcd->rsPin = rs ; + lcd->strbPin = strb ; + lcd->bits = 8 ; // For now - we'll set it properly later. + lcd->rows = rows ; + lcd->cols = cols ; + lcd->cx = 0 ; + lcd->cy = 0 ; + + lcd->dataPins [0] = d0 ; + lcd->dataPins [1] = d1 ; + lcd->dataPins [2] = d2 ; + lcd->dataPins [3] = d3 ; + lcd->dataPins [4] = d4 ; + lcd->dataPins [5] = d5 ; + lcd->dataPins [6] = d6 ; + lcd->dataPins [7] = d7 ; + + lcds [lcdFd] = lcd ; + + digitalWrite (lcd->rsPin, 0) ; pinMode (lcd->rsPin, OUTPUT) ; + digitalWrite (lcd->strbPin, 0) ; pinMode (lcd->strbPin, OUTPUT) ; + + for (i = 0 ; i < bits ; ++i) + { + digitalWrite (lcd->dataPins [i], 0) ; + pinMode (lcd->dataPins [i], OUTPUT) ; + } + delay (35) ; // mS + + +// 4-bit mode? +// OK. This is a PIG and it's not at all obvious from the documentation I had, +// so I guess some others have worked through either with better documentation +// or more trial and error... Anyway here goes: +// +// It seems that the controller needs to see the FUNC command at least 3 times +// consecutively - in 8-bit mode. If you're only using 8-bit mode, then it appears +// that you can get away with one func-set, however I'd not rely on it... +// +// So to set 4-bit mode, you need to send the commands one nibble at a time, +// the same three times, but send the command to set it into 8-bit mode those +// three times, then send a final 4th command to set it into 4-bit mode, and only +// then can you flip the switch for the rest of the library to work in 4-bit +// mode which sends the commands as 2 x 4-bit values. + + if (bits == 4) + { + func = LCD_FUNC | LCD_FUNC_DL ; // Set 8-bit mode 3 times + put4Command (lcd, func >> 4) ; delay (35) ; + put4Command (lcd, func >> 4) ; delay (35) ; + put4Command (lcd, func >> 4) ; delay (35) ; + func = LCD_FUNC ; // 4th set: 4-bit mode + put4Command (lcd, func >> 4) ; delay (35) ; + lcd->bits = 4 ; + } + else + { + func = LCD_FUNC | LCD_FUNC_DL ; + putCommand (lcd, func ) ; delay (35) ; + putCommand (lcd, func ) ; delay (35) ; + putCommand (lcd, func ) ; delay (35) ; + } + + if (lcd->rows > 1) + { + func |= LCD_FUNC_N ; + putCommand (lcd, func) ; delay (35) ; + } + +// Rest of the initialisation sequence + + lcdDisplay (lcdFd, TRUE) ; + lcdCursor (lcdFd, FALSE) ; + lcdCursorBlink (lcdFd, FALSE) ; + lcdClear (lcdFd) ; + + putCommand (lcd, LCD_ENTRY | LCD_ENTRY_ID) ; + putCommand (lcd, LCD_CDSHIFT | LCD_CDSHIFT_RL) ; + + return lcdFd ; +} diff --git a/devLib/lcd.h b/devLib/lcd.h new file mode 100644 index 0000000..0a0e598 --- /dev/null +++ b/devLib/lcd.h @@ -0,0 +1,52 @@ +/* + * lcd.h: + * Text-based LCD driver. + * This is designed to drive the parallel interface LCD drivers + * based in the Hitachi HD44780U controller and compatables. + * + * Copyright (c) 2012 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#define MAX_LCDS 8 + +#ifdef __cplusplus +extern "C" { +#endif + +extern void lcdHome (const int fd) ; +extern void lcdClear (const int fd) ; +extern void lcdDisplay (const int fd, int state) ; +extern void lcdCursor (const int fd, int state) ; +extern void lcdCursorBlink (const int fd, int state) ; +extern void lcdSendCommand (const int fd, unsigned char command) ; +extern void lcdPosition (const int fd, int x, int y) ; +extern void lcdCharDef (const int fd, int index, unsigned char data [8]) ; +extern void lcdPutchar (const int fd, unsigned char data) ; +extern void lcdPuts (const int fd, const char *string) ; +extern void lcdPrintf (const int fd, const char *message, ...) ; + +extern int lcdInit (const int rows, const int cols, const int bits, + const int rs, const int strb, + const int d0, const int d1, const int d2, const int d3, const int d4, + const int d5, const int d6, const int d7) ; + +#ifdef __cplusplus +} +#endif diff --git a/devLib/lcd128x64.c b/devLib/lcd128x64.c new file mode 100644 index 0000000..accd5c3 --- /dev/null +++ b/devLib/lcd128x64.c @@ -0,0 +1,673 @@ +/* + * lcd128x64.c: + * Graphics-based LCD driver. + * This is designed to drive the parallel interface LCD drivers + * based on the generic 12864H chips + * + * There are many variations on these chips, however they all mostly + * seem to be similar. + * This implementation has the Pins from the Pi hard-wired into it, + * in particular wiringPi pins 0-7 so that we can use + * digitalWriteByete() to speed things up somewhat. + * + * Copyright (c) 2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#include +#include + +#include + +#include "font.h" +#include "lcd128x64.h" + +// Size + +#define LCD_WIDTH 128 +#define LCD_HEIGHT 64 + +// Hardware Pins +// Note pins 0-7 are the 8-bit data port + +#define CS1 10 +#define CS2 11 +#define STROBE 12 +#define RS 13 + +// Software copy of the framebuffer +// it's 8-bit deep although the display itself is only 1-bit deep. + +static unsigned char frameBuffer [LCD_WIDTH * LCD_HEIGHT] ; + +static int maxX, maxY ; +static int lastX, lastY ; +static int xOrigin, yOrigin ; +static int lcdOrientation = 0 ; + +/* + * strobe: + * Toggle the strobe (Really the "E") pin to the device. + * According to the docs, data is latched on the falling edge. + ********************************************************************************* + */ + +static void strobe (void) +{ + digitalWrite (STROBE, 1) ; delayMicroseconds (1) ; + digitalWrite (STROBE, 0) ; delayMicroseconds (5) ; +} + + +/* + * sentData: + * Send an data or command byte to the display. + ********************************************************************************* + */ + +static void sendData (const int data, const int chip) +{ + digitalWrite (chip, 0) ; + digitalWriteByte (data) ; + strobe () ; + digitalWrite (chip, 1) ; +} + + +/* + * sendCommand: + * Send a command byte to the display + ********************************************************************************* + */ + +static void sendCommand (const int command, const int chip) +{ + digitalWrite (RS, 0) ; + sendData (command, chip) ; + digitalWrite (RS, 1) ; +} + + +/* + * setCol: SetLine: + * Set the column and line addresses + ********************************************************************************* + */ + +static void setCol (int col, const int chip) + { sendCommand (0x40 | (col & 0x3F), chip) ; } + +static void setLine (int line, const int chip) + { sendCommand (0xB8 | (line & 0x07), chip) ; } + + +/* + * lcd128x64update: + * Copy our software version to the real display + ********************************************************************************* + */ + +void lcd128x64update (void) +{ + int line, x, y, fbLoc ; + unsigned char byte ; + +// Left side + + for (line = 0 ; line < 8 ; ++line) + { + setCol (0, CS1) ; + setLine (line, CS1) ; + + for (x = 63 ; x >= 0 ; --x) + { + byte = 0 ; + for (y = 0 ; y < 8 ; ++y) + { + fbLoc = x + (((7 - line) * 8) + (7 - y)) * LCD_WIDTH ; + if (frameBuffer [fbLoc] != 0) + byte |= (1 << y) ; + } + sendData (byte, CS1) ; + } + } + +// Right side + + for (line = 0 ; line < 8 ; ++line) + { + setCol (0, CS2) ; + setLine (line, CS2) ; + + for (x = 127 ; x >= 64 ; --x) + { + byte = 0 ; + for (y = 0 ; y < 8 ; ++y) + { + fbLoc = x + (((7 - line) * 8) + (7 - y)) * LCD_WIDTH ; + if (frameBuffer [fbLoc] != 0) + byte |= (1 << y) ; + } + sendData (byte, CS2) ; + } + } +} + + +/* + * lcd128x64setOrigin: + * Set the display offset origin + ********************************************************************************* + */ + +void lcd128x64setOrigin (int x, int y) +{ + xOrigin = x ; + yOrigin = y ; +} + + +/* + * lcd128x64setOrientation: + * Set the display orientation: + * 0: Normal, the display is portrait mode, 0,0 is top left + * 1: Landscape + * 2: Portrait, flipped + * 3: Landscape, flipped + ********************************************************************************* + */ + +void lcd128x64setOrientation (int orientation) +{ + lcdOrientation = orientation & 3 ; + + lcd128x64setOrigin (0,0) ; + + switch (lcdOrientation) + { + case 0: + maxX = LCD_WIDTH ; + maxY = LCD_HEIGHT ; + break ; + + case 1: + maxX = LCD_HEIGHT ; + maxY = LCD_WIDTH ; + break ; + + case 2: + maxX = LCD_WIDTH ; + maxY = LCD_HEIGHT ; + break ; + + case 3: + maxX = LCD_HEIGHT ; + maxY = LCD_WIDTH ; + break ; + } +} + + +/* + * lcd128x64orientCoordinates: + * Adjust the coordinates given to the display orientation + ********************************************************************************* + */ + +void lcd128x64orientCoordinates (int *x, int *y) +{ + register int tmp ; + + *x += xOrigin ; + *y += yOrigin ; + *y = maxY - *y - 1 ; + + switch (lcdOrientation) + { + case 0: + break; + + case 1: + tmp = maxY - *y - 1 ; + *y = *x ; + *x = tmp ; + break; + + case 2: + *x = maxX - *x - 1 ; + *y = maxY - *y - 1 ; + break; + + case 3: + *x = maxX - *x - 1 ; + tmp = *y ; + *y = *x ; + *x = tmp ; + break ; + } +} + + +/* + * lcd128x64getScreenSize: + * Return the max X & Y screen sizes. Needs to be called again, if you + * change screen orientation. + ********************************************************************************* + */ + +void lcd128x64getScreenSize (int *x, int *y) +{ + *x = maxX ; + *y = maxY ; +} + + +/* + ********************************************************************************* + * Standard Graphical Functions + ********************************************************************************* + */ + + +/* + * lcd128x64point: + * Plot a pixel. + ********************************************************************************* + */ + +void lcd128x64point (int x, int y, int colour) +{ + lastX = x ; + lastY = y ; + + lcd128x64orientCoordinates (&x, &y) ; + + if ((x < 0) || (x >= LCD_WIDTH) || (y < 0) || (y >= LCD_HEIGHT)) + return ; + + frameBuffer [x + y * LCD_WIDTH] = colour ; +} + + +/* + * lcd128x64line: lcd128x64lineTo: + * Classic Bressenham Line code + ********************************************************************************* + */ + +void lcd128x64line (int x0, int y0, int x1, int y1, int colour) +{ + int dx, dy ; + int sx, sy ; + int err, e2 ; + + lastX = x1 ; + lastY = y1 ; + + dx = abs (x1 - x0) ; + dy = abs (y1 - y0) ; + + sx = (x0 < x1) ? 1 : -1 ; + sy = (y0 < y1) ? 1 : -1 ; + + err = dx - dy ; + + for (;;) + { + lcd128x64point (x0, y0, colour) ; + + if ((x0 == x1) && (y0 == y1)) + break ; + + e2 = 2 * err ; + + if (e2 > -dy) + { + err -= dy ; + x0 += sx ; + } + + if (e2 < dx) + { + err += dx ; + y0 += sy ; + } + } + +} + +void lcd128x64lineTo (int x, int y, int colour) +{ + lcd128x64line (lastX, lastY, x, y, colour) ; +} + + +/* + * lcd128x64rectangle: + * A rectangle is a spoilt days fishing + ********************************************************************************* + */ + +void lcd128x64rectangle (int x1, int y1, int x2, int y2, int colour, int filled) +{ + register int x ; + + if (filled) + { + /**/ if (x1 == x2) + lcd128x64line (x1, y1, x2, y2, colour) ; + else if (x1 < x2) + for (x = x1 ; x <= x2 ; ++x) + lcd128x64line (x, y1, x, y2, colour) ; + else + for (x = x2 ; x <= x1 ; ++x) + lcd128x64line (x, y1, x, y2, colour) ; + } + else + { + lcd128x64line (x1, y1, x2, y1, colour) ; + lcd128x64lineTo (x2, y2, colour) ; + lcd128x64lineTo (x1, y2, colour) ; + lcd128x64lineTo (x1, y1, colour) ; + } +} + + +/* + * lcd128x64circle: + * This is the midpoint circle algorithm. + ********************************************************************************* + */ + +void lcd128x64circle (int x, int y, int r, int colour, int filled) +{ + int ddF_x = 1 ; + int ddF_y = -2 * r ; + + int f = 1 - r ; + int x1 = 0 ; + int y1 = r ; + + if (filled) + { + lcd128x64line (x, y + r, x, y - r, colour) ; + lcd128x64line (x + r, y, x - r, y, colour) ; + } + else + { + lcd128x64point (x, y + r, colour) ; + lcd128x64point (x, y - r, colour) ; + lcd128x64point (x + r, y, colour) ; + lcd128x64point (x - r, y, colour) ; + } + + while (x1 < y1) + { + if (f >= 0) + { + y1-- ; + ddF_y += 2 ; + f += ddF_y ; + } + x1++ ; + ddF_x += 2 ; + f += ddF_x ; + if (filled) + { + lcd128x64line (x + x1, y + y1, x - x1, y + y1, colour) ; + lcd128x64line (x + x1, y - y1, x - x1, y - y1, colour) ; + lcd128x64line (x + y1, y + x1, x - y1, y + x1, colour) ; + lcd128x64line (x + y1, y - x1, x - y1, y - x1, colour) ; + } + else + { + lcd128x64point (x + x1, y + y1, colour) ; lcd128x64point (x - x1, y + y1, colour) ; + lcd128x64point (x + x1, y - y1, colour) ; lcd128x64point (x - x1, y - y1, colour) ; + lcd128x64point (x + y1, y + x1, colour) ; lcd128x64point (x - y1, y + x1, colour) ; + lcd128x64point (x + y1, y - x1, colour) ; lcd128x64point (x - y1, y - x1, colour) ; + } + } +} + + +/* + * lcd128x64ellipse: + * Fast ellipse drawing algorithm by + * John Kennedy + * Mathematics Department + * Santa Monica College + * 1900 Pico Blvd. + * Santa Monica, CA 90405 + * jrkennedy6@gmail.com + * -Confirned in email this algorithm is in the public domain -GH- + ********************************************************************************* + */ + +static void plot4ellipsePoints (int cx, int cy, int x, int y, int colour, int filled) +{ + if (filled) + { + lcd128x64line (cx + x, cy + y, cx - x, cy + y, colour) ; + lcd128x64line (cx - x, cy - y, cx + x, cy - y, colour) ; + } + else + { + lcd128x64point (cx + x, cy + y, colour) ; + lcd128x64point (cx - x, cy + y, colour) ; + lcd128x64point (cx - x, cy - y, colour) ; + lcd128x64point (cx + x, cy - y, colour) ; + } +} + +void lcd128x64ellipse (int cx, int cy, int xRadius, int yRadius, int colour, int filled) +{ + int x, y ; + int xChange, yChange, ellipseError ; + int twoAsquare, twoBsquare ; + int stoppingX, stoppingY ; + + twoAsquare = 2 * xRadius * xRadius ; + twoBsquare = 2 * yRadius * yRadius ; + + x = xRadius ; + y = 0 ; + + xChange = yRadius * yRadius * (1 - 2 * xRadius) ; + yChange = xRadius * xRadius ; + + ellipseError = 0 ; + stoppingX = twoBsquare * xRadius ; + stoppingY = 0 ; + + while (stoppingX >= stoppingY) // 1st set of points + { + plot4ellipsePoints (cx, cy, x, y, colour, filled) ; + ++y ; + stoppingY += twoAsquare ; + ellipseError += yChange ; + yChange += twoAsquare ; + + if ((2 * ellipseError + xChange) > 0 ) + { + --x ; + stoppingX -= twoBsquare ; + ellipseError += xChange ; + xChange += twoBsquare ; + } + } + + x = 0 ; + y = yRadius ; + + xChange = yRadius * yRadius ; + yChange = xRadius * xRadius * (1 - 2 * yRadius) ; + + ellipseError = 0 ; + stoppingX = 0 ; + stoppingY = twoAsquare * yRadius ; + + while (stoppingX <= stoppingY) //2nd set of points + { + plot4ellipsePoints (cx, cy, x, y, colour, filled) ; + ++x ; + stoppingX += twoBsquare ; + ellipseError += xChange ; + xChange += twoBsquare ; + + if ((2 * ellipseError + yChange) > 0 ) + { + --y ; + stoppingY -= twoAsquare ; + ellipseError += yChange ; + yChange += twoAsquare ; + } + } +} + + +/* + * lcd128x64putchar: + * Print a single character to the screen + ********************************************************************************* + */ + +void lcd128x64putchar (int x, int y, int c, int bgCol, int fgCol) +{ + int y1, y2 ; + + unsigned char line ; + unsigned char *fontPtr ; + +// Can't print if we're offscreen + +//if ((x < 0) || (x >= (maxX - fontWidth)) || (y < 0) || (y >= (maxY - fontHeight))) +// return ; + + fontPtr = font + c * fontHeight ; + + for (y1 = fontHeight - 1 ; y1 >= 0 ; --y1) + { + y2 = y + y1 ; + line = *fontPtr++ ; + lcd128x64point (x + 0, y2, (line & 0x80) == 0 ? bgCol : fgCol) ; + lcd128x64point (x + 1, y2, (line & 0x40) == 0 ? bgCol : fgCol) ; + lcd128x64point (x + 2, y2, (line & 0x20) == 0 ? bgCol : fgCol) ; + lcd128x64point (x + 3, y2, (line & 0x10) == 0 ? bgCol : fgCol) ; + lcd128x64point (x + 4, y2, (line & 0x08) == 0 ? bgCol : fgCol) ; + lcd128x64point (x + 5, y2, (line & 0x04) == 0 ? bgCol : fgCol) ; + lcd128x64point (x + 6, y2, (line & 0x02) == 0 ? bgCol : fgCol) ; + lcd128x64point (x + 7, y2, (line & 0x01) == 0 ? bgCol : fgCol) ; + } +} + + +/* + * lcd128x64puts: + * Send a string to the display. Obeys \n and \r formatting + ********************************************************************************* + */ + +void lcd128x64puts (int x, int y, const char *str, int bgCol, int fgCol) +{ + int c, mx, my ; + + mx = x ; my = y ; + + while (*str) + { + c = *str++ ; + + if (c == '\r') + { + mx = x ; + continue ; + } + + if (c == '\n') + { + mx = x ; + my -= fontHeight ; + continue ; + } + + lcd128x64putchar (mx, my, c, bgCol, fgCol) ; + + mx += fontWidth ; + if (mx >= (maxX - fontWidth)) + { + mx = 0 ; + my -= fontHeight ; + } + } +} + + +/* + * lcd128x64clear: + * Clear the display to the given colour. + ********************************************************************************* + */ + +void lcd128x64clear (int colour) +{ + register int i ; + register unsigned char *ptr = frameBuffer ; + + for (i = 0 ; i < (maxX * maxY) ; ++i) + *ptr++ = colour ; +} + + + + +/* + * lcd128x64setup: + * Initialise the display and GPIO. + ********************************************************************************* + */ + +int lcd128x64setup (void) +{ + int i ; + + for (i = 0 ; i < 8 ; ++i) + pinMode (i, OUTPUT) ; + + digitalWrite (CS1, 1) ; + digitalWrite (CS2, 1) ; + digitalWrite (STROBE, 0) ; + digitalWrite (RS, 1) ; + + pinMode (CS1, OUTPUT) ; + pinMode (CS2, OUTPUT) ; + pinMode (STROBE, OUTPUT) ; + pinMode (RS, OUTPUT) ; + + sendCommand (0x3F, CS1) ; // Display ON + sendCommand (0xC0, CS1) ; // Set display start line to 0 + + sendCommand (0x3F, CS2) ; // Display ON + sendCommand (0xC0, CS2) ; // Set display start line to 0 + + lcd128x64clear (0) ; + lcd128x64setOrientation (0) ; + lcd128x64update () ; + + return 0 ; +} diff --git a/devLib/lcd128x64.h b/devLib/lcd128x64.h new file mode 100644 index 0000000..b448bbc --- /dev/null +++ b/devLib/lcd128x64.h @@ -0,0 +1,39 @@ +/* + * lcd128x64.h: + * + * Copyright (c) 2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +extern void lcd128x64setOrigin (int x, int y) ; +extern void lcd128x64setOrientation (int orientation) ; +extern void lcd128x64orientCoordinates (int *x, int *y) ; +extern void lcd128x64getScreenSize (int *x, int *y) ; +extern void lcd128x64point (int x, int y, int colour) ; +extern void lcd128x64line (int x0, int y0, int x1, int y1, int colour) ; +extern void lcd128x64lineTo (int x, int y, int colour) ; +extern void lcd128x64rectangle (int x1, int y1, int x2, int y2, int colour, int filled) ; +extern void lcd128x64circle (int x, int y, int r, int colour, int filled) ; +extern void lcd128x64ellipse (int cx, int cy, int xRadius, int yRadius, int colour, int filled) ; +extern void lcd128x64putchar (int x, int y, int c, int bgCol, int fgCol) ; +extern void lcd128x64puts (int x, int y, const char *str, int bgCol, int fgCol) ; +extern void lcd128x64update (void) ; +extern void lcd128x64clear (int colour) ; + +extern int lcd128x64setup (void) ; diff --git a/devLib/maxdetect.c b/devLib/maxdetect.c new file mode 100644 index 0000000..23eabf8 --- /dev/null +++ b/devLib/maxdetect.c @@ -0,0 +1,165 @@ +/* + * maxdetect.c: + * Driver for the MaxDetect series sensors + * + * Copyright (c) 2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +//#include +//#include +//#include + +#include + +#include "maxdetect.h" + +#ifndef TRUE +# define TRUE (1==1) +# define FALSE (1==2) +#endif + + +/* + * maxDetectLowHighWait: + * Wait for a transition from high to low on the bus + ********************************************************************************* + */ + +static void maxDetectLowHighWait (const int pin) +{ + unsigned int timeOut = millis () + 2000 ; + + while (digitalRead (pin) == HIGH) + if (millis () > timeOut) + return ; + + while (digitalRead (pin) == LOW) + if (millis () > timeOut) + return ; +} + + +/* + * maxDetectClockByte: + * Read in a single byte from the MaxDetect bus + ********************************************************************************* + */ + +static unsigned int maxDetectClockByte (const int pin) +{ + unsigned int byte = 0 ; + int bit ; + + for (bit = 0 ; bit < 8 ; ++bit) + { + maxDetectLowHighWait (pin) ; + +// bit starting now - we need to time it. + + delayMicroseconds (30) ; + byte <<= 1 ; + if (digitalRead (pin) == HIGH) // It's a 1 + byte |= 1 ; + } + + return byte ; +} + + +/* + * maxDetectRead: + * Read in and return the 4 data bytes from the MaxDetect sensor. + * Return TRUE/FALSE depending on the checksum validity + ********************************************************************************* + */ + +int maxDetectRead (const int pin, unsigned char buffer [4]) +{ + int i ; + unsigned int checksum ; + unsigned char localBuf [5] ; + +// Wake up the RHT03 by pulling the data line low, then high +// Low for 10mS, high for 40uS. + + pinMode (pin, OUTPUT) ; + digitalWrite (pin, 0) ; delay (10) ; + digitalWrite (pin, 1) ; delayMicroseconds (40) ; + pinMode (pin, INPUT) ; + +// Now wait for sensor to pull pin low + + maxDetectLowHighWait (pin) ; + +// and read in 5 bytes (40 bits) + + for (i = 0 ; i < 5 ; ++i) + localBuf [i] = maxDetectClockByte (pin) ; + + checksum = 0 ; + for (i = 0 ; i < 4 ; ++i) + { + buffer [i] = localBuf [i] ; + checksum += localBuf [i] ; + } + checksum &= 0xFF ; + + return checksum == localBuf [4] ; +} + + +/* + * readRHT03: + * Read the Temperature & Humidity from an RHT03 sensor + ********************************************************************************* + */ + +int readRHT03 (const int pin, int *temp, int *rh) +{ + static unsigned int nextTime = 0 ; + static int lastTemp = 0 ; + static int lastRh = 0 ; + static int lastResult = TRUE ; + + unsigned char buffer [4] ; + +// Don't read more than once a second + + if (millis () < nextTime) + { + *temp = lastTemp ; + *rh = lastRh ; + return lastResult ; + } + + lastResult = maxDetectRead (pin, buffer) ; + + if (lastResult) + { + *temp = lastTemp = (buffer [2] * 256 + buffer [3]) ; + *rh = lastRh = (buffer [0] * 256 + buffer [1]) ; + nextTime = millis () + 2000 ; + return TRUE ; + } + else + { + return FALSE ; + } +} diff --git a/devLib/maxdetect.h b/devLib/maxdetect.h new file mode 100644 index 0000000..a1fd742 --- /dev/null +++ b/devLib/maxdetect.h @@ -0,0 +1,40 @@ +/* + * maxdetect.h: + * Driver for the MaxDetect series sensors + * + * Copyright (c) 2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + + +#ifdef __cplusplus +extern "C" { +#endif + +// Main generic function + +int maxDetectRead (const int pin, unsigned char buffer [4]) ; + +// Individual sensors + +int readRHT03 (const int pin, int *temp, int *rh) ; + +#ifdef __cplusplus +} +#endif diff --git a/devLib/piFace.c b/devLib/piFace.c new file mode 100644 index 0000000..4475c7f --- /dev/null +++ b/devLib/piFace.c @@ -0,0 +1,112 @@ +/* + * piFace.: + * This file to interface with the PiFace peripheral device which + * has an MCP23S17 GPIO device connected via the SPI bus. + * + * Copyright (c) 2012-2013 Gordon Henderson + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with wiringPi. + * If not, see . + *********************************************************************** + */ + + +#include +#include + +#include +#include + +#include "piFace.h" + + +/* + * myDigitalWrite: + * Perform the digitalWrite function on the PiFace board + ********************************************************************************* + */ + +void myDigitalWrite (struct wiringPiNodeStruct *node, int pin, int value) +{ + digitalWrite (pin + 16, value) ; +} + + +/* + * myDigitalRead: + * Perform the digitalRead function on the PiFace board + * With a slight twist - if we read from base + 8, then we + * read from the output latch... + ********************************************************************************* + */ + +int myDigitalRead (struct wiringPiNodeStruct *node, int pin) +{ + if ((pin - node->pinBase) >= 8) + return digitalRead (pin + 8) ; + else + return digitalRead (pin + 16 + 8) ; +} + + +/* + * myPullUpDnControl: + * Perform the pullUpDnControl function on the PiFace board + ********************************************************************************* + */ + +void myPullUpDnControl (struct wiringPiNodeStruct *node, int pin, int pud) +{ + pullUpDnControl (pin + 16 + 8, pud) ; +} + + +/* + * piFaceSetup + * We're going to create an instance of the mcp23s17 here, then + * provide our own read/write routines on-top of it... + * The supplied PiFace code (in Pithon) treats it as an 8-bit device + * where you write the output ports and read the input port using the + * same pin numbers, however I have had a request to be able to read + * the output port, so reading 8..15 will read the output latch. + ********************************************************************************* + */ + +int piFaceSetup (const int pinBase) +{ + int i ; + struct wiringPiNodeStruct *node ; + +// Create an mcp23s17 instance: + + mcp23s17Setup (pinBase + 16, 0, 0) ; + +// Set the direction bits + + for (i = 0 ; i < 8 ; ++i) + { + pinMode (pinBase + 16 + i, OUTPUT) ; // Port A is the outputs + pinMode (pinBase + 16 + 8 + i, INPUT) ; // Port B inputs. + } + + node = wiringPiNewNode (pinBase, 16) ; + node->digitalRead = myDigitalRead ; + node->digitalWrite = myDigitalWrite ; + node->pullUpDnControl = myPullUpDnControl ; + + return 0 ; +} diff --git a/devLib/piFace.h b/devLib/piFace.h new file mode 100644 index 0000000..4965314 --- /dev/null +++ b/devLib/piFace.h @@ -0,0 +1,32 @@ +/* + * piFace.h: + * Control the PiFace Interface board for the Raspberry Pi + * Copyright (c) 2012-2013 Gordon Henderson + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#ifdef __cplusplus +extern "C" { +#endif + +extern int piFaceSetup (const int pinBase) ; + +#ifdef __cplusplus +} +#endif diff --git a/devLib/piFaceOld.c b/devLib/piFaceOld.c new file mode 100644 index 0000000..1b1c0dd --- /dev/null +++ b/devLib/piFaceOld.c @@ -0,0 +1,178 @@ +/* + * piFace.: + * Arduino compatable (ish) Wiring library for the Raspberry Pi + * Copyright (c) 2012-2013 Gordon Henderson + * + * This file to interface with the PiFace peripheral device which + * has an MCP23S17 GPIO device connected via the SPI bus. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with wiringPi. + * If not, see . + *********************************************************************** + */ + + +#include +#include + +#include +#include + +#include "../wiringPi/mcp23x0817.h" + +#include "piFace.h" + +#define PIFACE_SPEED 4000000 +#define PIFACE_DEVNO 0 + + + +/* + * writeByte: + * Write a byte to a register on the MCP23S17 on the SPI bus. + ********************************************************************************* + */ + +static void writeByte (uint8_t reg, uint8_t data) +{ + uint8_t spiData [4] ; + + spiData [0] = CMD_WRITE ; + spiData [1] = reg ; + spiData [2] = data ; + + wiringPiSPIDataRW (PIFACE_DEVNO, spiData, 3) ; +} + +/* + * readByte: + * Read a byte from a register on the MCP23S17 on the SPI bus. + ********************************************************************************* + */ + +static uint8_t readByte (uint8_t reg) +{ + uint8_t spiData [4] ; + + spiData [0] = CMD_READ ; + spiData [1] = reg ; + + wiringPiSPIDataRW (PIFACE_DEVNO, spiData, 3) ; + + return spiData [2] ; +} + + +/* + * myDigitalWrite: + * Perform the digitalWrite function on the PiFace board + ********************************************************************************* + */ + +void myDigitalWrite (struct wiringPiNodeStruct *node, int pin, int value) +{ + uint8_t mask, old ; + + pin -= node->pinBase ; + mask = 1 << pin ; + old = readByte (MCP23x17_GPIOA) ; + + if (value == 0) + old &= (~mask) ; + else + old |= mask ; + + writeByte (MCP23x17_GPIOA, old) ; +} + + +/* + * myDigitalRead: + * Perform the digitalRead function on the PiFace board + ********************************************************************************* + */ + +int myDigitalRead (struct wiringPiNodeStruct *node, int pin) +{ + uint8_t mask, reg ; + + mask = 1 << ((pin - node->pinBase) & 7) ; + + if (pin < 8) + reg = MCP23x17_GPIOB ; // Input regsiter + else + reg = MCP23x17_OLATA ; // Output latch regsiter + + if ((readByte (reg) & mask) != 0) + return HIGH ; + else + return LOW ; +} + + +/* + * myPullUpDnControl: + * Perform the pullUpDnControl function on the PiFace board + ********************************************************************************* + */ + +void myPullUpDnControl (struct wiringPiNodeStruct *node, int pin, int pud) +{ + uint8_t mask, old ; + + mask = 1 << (pin - node->pinBase) ; + old = readByte (MCP23x17_GPPUB) ; + + if (pud == 0) + old &= (~mask) ; + else + old |= mask ; + + writeByte (MCP23x17_GPPUB, old) ; +} + + +/* + * piFaceSetup + * Setup the SPI interface and initialise the MCP23S17 chip + * We create one node with 16 pins - each if the first 8 pins being read + * and write - although the operations actually go to different + * hardware ports. The top 8 let you read the state of the output register. + ********************************************************************************* + */ + +int piFaceSetup (const int pinBase) +{ + int x ; + struct wiringPiNodeStruct *node ; + + if ((x = wiringPiSPISetup (PIFACE_DEVNO, PIFACE_SPEED)) < 0) + return x ; + +// Setup the MCP23S17 + + writeByte (MCP23x17_IOCON, IOCON_INIT) ; + writeByte (MCP23x17_IODIRA, 0x00) ; // Port A -> Outputs + writeByte (MCP23x17_IODIRB, 0xFF) ; // Port B -> Inputs + + node = wiringPiNewNode (pinBase, 16) ; + node->digitalRead = myDigitalRead ; + node->digitalWrite = myDigitalWrite ; + node->pullUpDnControl = myPullUpDnControl ; + + return 0 ; +} diff --git a/devLib/piGlow.c b/devLib/piGlow.c new file mode 100644 index 0000000..44e3db8 --- /dev/null +++ b/devLib/piGlow.c @@ -0,0 +1,118 @@ +/* + * piGlow.c: + * Easy access to the Pimoroni PiGlow board. + * + * Copyright (c) 2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + +#include +#include + +#include "piGlow.h" + +#define PIGLOW_BASE 577 + +static int leg0 [6] = { 6, 7, 8, 5, 4, 9 } ; +static int leg1 [6] = { 17, 16, 15, 13, 11, 10 } ; +static int leg2 [6] = { 0, 1, 2, 3, 14, 12 } ; + + +/* + * piGlow1: + * Light up an individual LED + ********************************************************************************* + */ + +void piGlow1 (const int leg, const int ring, const int intensity) +{ + int *legLeds ; + + if ((leg < 0) || (leg > 2)) return ; + if ((ring < 0) || (ring > 5)) return ; + + /**/ if (leg == 0) + legLeds = leg0 ; + else if (leg == 1) + legLeds = leg1 ; + else + legLeds = leg2 ; + + analogWrite (PIGLOW_BASE + legLeds [ring], intensity) ; +} + +/* + * piGlowLeg: + * Light up all 6 LEDs on a leg + ********************************************************************************* + */ + +void piGlowLeg (const int leg, const int intensity) +{ + int i ; + int *legLeds ; + + if ((leg < 0) || (leg > 2)) + return ; + + /**/ if (leg == 0) + legLeds = leg0 ; + else if (leg == 1) + legLeds = leg1 ; + else + legLeds = leg2 ; + + for (i = 0 ; i < 6 ; ++i) + analogWrite (PIGLOW_BASE + legLeds [i], intensity) ; +} + + +/* + * piGlowRing: + * Light up 3 LEDs in a ring. Ring 0 is the outermost, 5 the innermost + ********************************************************************************* + */ + +void piGlowRing (const int ring, const int intensity) +{ + if ((ring < 0) || (ring > 5)) + return ; + + analogWrite (PIGLOW_BASE + leg0 [ring], intensity) ; + analogWrite (PIGLOW_BASE + leg1 [ring], intensity) ; + analogWrite (PIGLOW_BASE + leg2 [ring], intensity) ; +} + +/* + * piGlowSetup: + * Initialise the board & remember the pins we're using + ********************************************************************************* + */ + +void piGlowSetup (int clear) +{ + sn3218Setup (PIGLOW_BASE) ; + + if (clear) + { + piGlowLeg (0, 0) ; + piGlowLeg (1, 0) ; + piGlowLeg (2, 0) ; + } +} diff --git a/devLib/piGlow.h b/devLib/piGlow.h new file mode 100644 index 0000000..d501c2c --- /dev/null +++ b/devLib/piGlow.h @@ -0,0 +1,45 @@ +/* + * piglow.h: + * Easy access to the Pimoroni PiGlow board. + * + * Copyright (c) 2013 Gordon Henderson. + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with wiringPi. If not, see . + *********************************************************************** + */ + + +#define PIGLOW_RED 0 +#define PIGLOW_YELLOW 1 +#define PIGLOW_ORANGE 2 +#define PIGLOW_GREEN 3 +#define PIGLOW_BLUE 4 +#define PIGLOW_WHITE 5 + + +#ifdef __cplusplus +extern "C" { +#endif + +extern void piGlow1 (const int leg, const int ring, const int intensity) ; +extern void piGlowLeg (const int leg, const int intensity) ; +extern void piGlowRing (const int ring, const int intensity) ; +extern void piGlowSetup (int clear) ; + +#ifdef __cplusplus +} +#endif diff --git a/devLib/piNes.c b/devLib/piNes.c new file mode 100644 index 0000000..a115050 --- /dev/null +++ b/devLib/piNes.c @@ -0,0 +1,113 @@ +/* + * piNes.c: + * Driver for the NES Joystick controller on the Raspberry Pi + * Copyright (c) 2012 Gordon Henderson + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with wiringPi. + * If not, see . + *********************************************************************** + */ + +#include + +#include "piNes.h" + +#define MAX_NES_JOYSTICKS 8 + +#define NES_RIGHT 0x01 +#define NES_LEFT 0x02 +#define NES_DOWN 0x04 +#define NES_UP 0x08 +#define NES_START 0x10 +#define NES_SELECT 0x20 +#define NES_B 0x40 +#define NES_A 0x80 + + +#define PULSE_TIME 25 + +// Data to store the pins for each controller + +struct nesPinsStruct +{ + unsigned int cPin, dPin, lPin ; +} ; + +static struct nesPinsStruct nesPins [MAX_NES_JOYSTICKS] ; + +static int joysticks = 0 ; + + +/* + * setupNesJoystick: + * Create a new NES joystick interface, program the pins, etc. + ********************************************************************************* + */ + +int setupNesJoystick (int dPin, int cPin, int lPin) +{ + if (joysticks == MAX_NES_JOYSTICKS) + return -1 ; + + nesPins [joysticks].dPin = dPin ; + nesPins [joysticks].cPin = cPin ; + nesPins [joysticks].lPin = lPin ; + + digitalWrite (lPin, LOW) ; + digitalWrite (cPin, LOW) ; + + pinMode (lPin, OUTPUT) ; + pinMode (cPin, OUTPUT) ; + pinMode (dPin, INPUT) ; + + return joysticks++ ; +} + + +/* + * readNesJoystick: + * Do a single scan of the NES Joystick. + ********************************************************************************* + */ + +unsigned int readNesJoystick (int joystick) +{ + unsigned int value = 0 ; + int i ; + + struct nesPinsStruct *pins = &nesPins [joystick] ; + +// Toggle Latch - which presents the first bit + + digitalWrite (pins->lPin, HIGH) ; delayMicroseconds (PULSE_TIME) ; + digitalWrite (pins->lPin, LOW) ; delayMicroseconds (PULSE_TIME) ; + +// Read first bit + + value = digitalRead (pins->dPin) ; + +// Now get the next 7 bits with the clock + + for (i = 0 ; i < 7 ; ++i) + { + digitalWrite (pins->cPin, HIGH) ; delayMicroseconds (PULSE_TIME) ; + digitalWrite (pins->cPin, LOW) ; delayMicroseconds (PULSE_TIME) ; + value = (value << 1) | digitalRead (pins->dPin) ; + } + + return value ^ 0xFF ; +} diff --git a/devLib/piNes.h b/devLib/piNes.h new file mode 100644 index 0000000..897f181 --- /dev/null +++ b/devLib/piNes.h @@ -0,0 +1,45 @@ +/* + * piNes.h: + * Driver for the NES Joystick controller on the Raspberry Pi + * Copyright (c) 2012 Gordon Henderson + *********************************************************************** + * This file is part of wiringPi: + * https://projects.drogon.net/raspberry-pi/wiringpi/ + * + * wiringPi is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * wiringPi is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with wiringPi. + * If not, see . + *********************************************************************** + */ + +#define MAX_NES_JOYSTICKS 8 + +#define NES_RIGHT 0x01 +#define NES_LEFT 0x02 +#define NES_DOWN 0x04 +#define NES_UP 0x08 +#define NES_START 0x10 +#define NES_SELECT 0x20 +#define NES_B 0x40 +#define NES_A 0x80 + +#ifdef __cplusplus +extern "C" { +#endif + +extern int setupNesJoystick (int dPin, int cPin, int lPin) ; +extern unsigned int readNesJoystick (int joystick) ; + +#ifdef __cplusplus +} +#endif diff --git a/examples/BProTest/lnIOBoard b/examples/BProTest/lnIOBoard new file mode 100644 index 0000000000000000000000000000000000000000..803e6e58f51785a5ede076d4c245bf508e1d96ea GIT binary patch literal 11879 zcmcgy4|G)3nZJ`saD;#Z1`QC)qv9@I&18Up%F?q51SJw6O@hz^b)3w+B(F?nrZX=P zR#*Y4WmgcYRIRm5>gjP^4{i16+0`w&o>kYjVh`s?_t=)xCM44$QtQ99xQovIe)qnc z+`NQyy65!lP40Z(cfUXPyZ^rX-hKDZRZTYq0s)~@iC7>=Ex$*ITEKzXLX?z>vRYw@ z5O{M%75UlWD}@+-P~{Nhm`lAp36Q$AyH%D3p;YGagXDp(-J|j>(9G0FvCIHM>{j_* z)WuAFmQhBP1pou$2nzaGMpJt{YVX4bqf6x<}paf$k2 zj{FPe(Qr>!96f$dv|TD)1@DGrcnUM4R(G znxGt+K3qz|OZ4vw55LNTmwT`ZaIS~{CEz6KG>JEy!y@8hU z$sx)z(HHh5_1Gu$nSIE_zG5G?YzR(jRI9kTlz^6X|O> zxxGaCUo-(odOvdM5mh(?BlBIzAD*R@!iXkc^67uxM|b<^dzC5qOZ%(A-w%6SJJVrr zvyWfm)8FEw=lba1`t)!0@mqcTqu`tEN&4iM`e@6if5J!K4f%aW|2*Tfzusr>VV{1z zkN%a9zH^NIN*Rw$|7ZK`KMMWhf3J+pzzVx>jQ%X~lFzJCly(-FVK8#e`OFZEkFcyYZHdBI~5rW|Fqa zX|>&+tccyRE!JXpI(gU5txU!9c{?vsiDYBiaYd}dNjs#PGkM2#GHHqTxOou+!!_Nc zk9j-i#8WF%nY=BsiH;kV+_+HHp*(G|<4I3ueb!EU=*_m9=!)k?9g|)uQ_Ve!hweyl z(^)FAtUTVH$-%jpoy(;&u~a4zm%eq|-HGfDk#}>6c-~HQXMrXmBl0`YxNebyA5V5wnx%G%(upc~x%W=w8LK(@BYY5J24A)VN}0Y*D1v7*L6F zmk!{sMELSD@oFc>nL6#7K z)+NMdAF8W`i4OdB{f5PJ88Ld79;*nb>49s22k(-p;I1&x;* zc&UM3_;gg}Ljyl&;KK%f%D_(=_;CY&*}#t(_%jB6)WE-I;Ex#i5d%M9;QI`Gr-8c$ zo-**Hfp0PJHUn=m@CE~4PW;LKAu-TDR2u&F@KmdRu+&1Ii|Ru7#lAx6i`9j4(N`#s z_7z?&7T^9ovcP`Ta37vk@5h`&d4<(i2u2SLltl0Uoe-@l0_Ez~7)z?=z_H0CE`p5JLY{ zq0UP9TNR#CC_#T*g?3&Aok}sMz&2IGP7>{F1iY$lbD;|5b+irHplBOJ`(_8=XE-{g zfSx~#a*2o0e%2d8d&6k2+3#W0SAqH}ttkcC4u|Iy=6dy10AC1v6WXvy)iV@=ZG@k* z?9*iQuG6&J0$w@n)S|y+JM1@n3cSA7j6NV{|^$ zp&v}Yu0%UT^k9MQDFtL3LxAX`p>n_=U>L9zumX_trV@~2Rt0zopaocg{;Gs;A&k{b zl+C1n@Y|dpO=#;MKP|qEkbSlR_=mtl&=XFnvBK(cL6U)U;Y44kI4Z1ty|M1-UTdw0Q)QQYUC)^Vma0# z$EFu;V4YQgzCzXXzCttfE8si(l)ht*JP}%mI2paa5Nz%r6!m?DU67%#vJ7kE%N||E zbstu7j6RF#z)%GKoq&HYqF-)A8P`77hqiq*I%@l9U0`Oi0UChmb zCmVp@c*mU0n8Nj)1Mk-ckNwAazZ7NczvaLe1E;Mk0HvOiAL3dsM@)$#rtC!DiGL5s z=bin)k0L*dd7@0c>?()@|(z~kk7Be9)ElP z;OgeS!s`CMLRs^nfyw>M_CO$ueR+5P;BM4)%Xgm~Jpa|_L!yrH`5VKNVD}Qtb;Q}h zK;6F6d>)vL{ppXz;%vyBxnUokSCRQV!RH7*EAUx-Lq6VVFSAnV#`P;Q@m$i{>?}%H zJ1xBN@Ym*VKI`DO2k%v15_p|jW^Lyyn8i1QWmdHJn&_fldE_JC!(_4LW-PbMw(8qz zmo%)1)-G(YI^qtj%|kzkeMM1H1mxS067R@mx-YJ9lJZb!T(okTl}*`rwXwSK+mo}U zQl`hnOOdrLlXB6RdGU18TGgAi6RvzIvbM!jJ!s;>$kHX-lnuIuH?DNrPFdF^EhlZL zFJlQ!*nSgME}rhRE$M5NEnKu@scd%>`id`uW*eJUHY}6Q0kO6_sg#v;@>#sIvf^Ak zfmhAzbX&GL_I7p*?X=l>*IK_uY~Q{;lCrzwTkTvVlj{^st2}$?#Jn=tj`PT^ej}Y( zCu5~D=va&zZ1Ocz`hkJ7lJ+(yffjf}A;&VuK^Q-llE;4H;Nxx4&UM70>g3@ZeZ4q8 zonZs!S;3XHvWz}+sxFp;NbLHF{QuKrFW#2waj9vYrPom2PIXkPhRfrKakACb=t42R zcw!rwZFX+FY_-5jO6G;VhjiGCD@$;$anRb z$V`a4;zA{(4!$!WS0M9z^-AP(IN&3G3Xtb<)WfT;JfHovSj-$lc@dEQzYCZG{eMmJ z+kmI^CffV|nN44BUWquipuui;;%TckvNW=|dSUIgxvaDBbBYx8cuWy-JKpYyzcPO?`-?52hjJs~mY434yZ1*Q8&TY;m&c#~HWqzO1XZbWj9@Evx zII59y^7|1O7HFNg7MK%Bd3#=TaAJ;WY)_ybOdtCk#U?P6Xlp2knygO zp&ZxP2_Ty$kXr{n*BRxw_7*^SHwgLyacPTd=~iT}Kgw~fK8^~xMs?EYZ7AS6qa4>* zDui<@;MzZyGjB!ax+KoEc?@zEaI;>J;%|}h>??J+wogHh{%Ct_D~iNj$dp@w%vf*^ zg#*ATC*u+z)=PUlQ#yYU zxi`V*SWr%Ve+2?X&I2a;z;+EHYkS-SF5sbiH_CLP9P@9HwcJjed+o%coT#7AL5}6D zcR%Fz`Q)_Dd!D^0AQR<2t5EsNx|shP8Md;r5I>JWu0|7plwsl?#X5ERIpij5CJHr5 z$T8FDS)AiOi8;vcg6+s`E7t*v#@Orn9M&J1Uefk7Z9>K^rl40V|9r#d2LT z1?37?cMue=1?7{6n%9a} zPbm8NAn1J+=R8$>OnxNJN2Z|n^_TNb(U=5A3d$#@(SjhJq?Dv8D;4h*Zvm>ui!)^{ zXvQCvrU~*H7gU-q>6DMp_@Yu+^0j~bI^C>UfUJ-9dky_>8gvOF2kSdx@F}mq*D=D9 z*5knl@=u_3()Le!Y=!pH<_ljjVsS*PryC_37tUMmDZ7O>2Lj zG5oc_=Q%n1Ie?vxxA(mtP!RhlOFeOA-j{(!-!J;qg)E*I@UH66f{ zD*3EmrCDN+Mp2;0Tb{p5fv~LqjL-fBgJ%2XW+&y<`0VHA=h5UJF=*B=4oW6|rb+uD zgC;+8?^u4=pvgaD(6oQvpvgaeXsrGTgC>9H;j#Q91}*i!K9+yZpvhm(%~&SoKfj%5 zn*0OzkJ1Ny{Y!uOokb)e14BnY1+8?Nc-GhRhl8b3HzE3;EjZQJzx1o^N-+b zn)BC89Pg*W*Yk~UGB1PH@daP+#Ot8-{2_mUd@tSv@J2*`b$sL#5bHlPvc9HD{yBsG z2>NUvBl`@D|0HYy9G{mxdZyYEK&khut3m5{VPU;ReEb`I^co+%5%fN9zVrTt?c?Ws z^xygD!=Miv`riW0`Nro7`u_yzQTvtRDWCoepgI3tPyVN%b$sIe5I!%P_D}ir&-!Qt z^)dH9W*D11causVJs-60zcBi5p^snhqi^%kIUl{xpe@vQKWMJcGhX{11+C-b^pZ;P zL&~H5oYL&CW1zVoaQvs^$>KHgy+r?i4VvrYcHoqM$H$k7hI|zanf*5pwBDbn&-VJ!4&wDnkFAJLSViW2jy%RL!Cmtguy%)4j7LW%F zn*MzUbnihS9s*AN@B8@Af@ZwpI~Msr_VIrKTJMLvzw#R&|6S0Gw^`4=sOib)DAJciRW zoOAPTPe(^2fy*JctZa!jHMX|N+abwJtTUBqkEdcuHUn>w)z!Kt9UC$ zUZhFnd(^!lCnFElTeA+&b-n98`brOvGrYSs>aLHx5~S|t)YXmNqcQIk85eTk{g@j@ zI0+oNqonQunMUMA9(7H}bE?TsN~gT5K4WfI#ogK^D|$NQbtTmj^S+OANZ(o-y=-LG zr|un@B@^A)GP;1*noRL=calt|zPU7}OkQy^OMExNbh{H?yJN|GCWfy7$&@X;275Qj z8rNf7l1@6-lgH7jcU@|%<&klg$6ezuoB6M1jnU>kDR1O4YK^={rZ1;KPu{6AEUF7+ zBL(WpnsG5pUfA*)Cr7lW6`w&acB>7uFE2dl#zhIKU|de~I2$m>6^j?m#yBqvc0Ny;ALe0dCRJqW}N^ literal 0 HcmV?d00001 diff --git a/examples/BProTest/lnIOBoard.c b/examples/BProTest/lnIOBoard.c new file mode 100644 index 0000000..3b5ecad --- /dev/null +++ b/examples/BProTest/lnIOBoard.c @@ -0,0 +1,288 @@ +/************************************************************ + Copyright (C), 2014, lemaker.org. + FileName: lnIOBoard.c + Author: peter + Version : 1.0 + Date: 2014.10.10 + Description: be used to test LN IOBoard + Function List: + History: +