NIBObee Library 1.4
|
00001 /* BSD-License: 00002 00003 Copyright (c) 2010 by Nils Springob, nicai-systems, Germany 00004 00005 All rights reserved. 00006 00007 Redistribution and use in source and binary forms, with or without modification, 00008 are permitted provided that the following conditions are met: 00009 00010 * Redistributions of source code must retain the above copyright notice, 00011 this list of conditions and the following disclaimer. 00012 * Redistributions in binary form must reproduce the above copyright notice, 00013 this list of conditions and the following disclaimer in the documentation 00014 and/or other materials provided with the distribution. 00015 * Neither the name nicai-systems nor the names of its contributors may be 00016 used to endorse or promote products derived from this software without 00017 specific prior written permission. 00018 00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00020 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00021 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00022 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00023 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00024 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00025 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00027 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00028 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00029 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00030 00031 */ 00032 00040 #ifndef NIBOBEE_BGX1_H_ 00041 #define NIBOBEE_BGX1_H_ 00042 00043 #include <stdint.h> 00044 #include <avr/pgmspace.h> 00045 00046 #ifdef __cplusplus 00047 extern "C" { 00048 #endif 00049 00055 uint8_t bgx1_init(); 00056 00057 00061 void bgx1_reset(); 00062 00066 uint16_t bgx1_getVersion(); 00067 00072 uint8_t bgx1_getStatus(); 00073 00077 void bgx1_setStatus(uint8_t); 00078 00084 void bgx1_move(uint8_t x, uint8_t y); 00085 00090 void bgx1_mode(uint8_t mode); 00091 00096 void bgx1_fillAll(uint8_t pattern); 00097 00102 void bgx1_print(const char * text); 00103 00108 void bgx1_print_P(const char * text); 00109 00115 uint8_t bgx1_textWidth(const char * text); 00116 00122 uint8_t bgx1_textWidth_P(const char * text); 00123 00128 void bgx1_selectFont(uint8_t font); 00129 00134 void bgx1_hLine(uint8_t length); 00135 00140 void bgx1_vLine(uint8_t length); 00141 00147 void bgx1_box(uint8_t width, uint8_t height); 00148 00153 void bgx1_drawBitmap(uint8_t width, uint8_t height, const uint8_t bitmap[]); 00154 00159 void bgx1_drawBitmap_P(uint8_t width, uint8_t height, PGM_P bitmap); 00160 00166 void bgx1_lineTo(uint8_t x, uint8_t y); 00167 00171 void bgx1_termClear(); 00172 00178 void bgx1_termGoto(uint8_t col, uint8_t row); 00179 00184 void bgx1_termScroll(int8_t lines); 00185 00190 void bgx1_termPrint(const char * text); 00191 00196 void bgx1_termPrint_P(PGM_P text); 00197 00198 00202 extern uint8_t bgx1_DDR; 00203 00207 extern uint8_t bgx1_PORT; 00208 00212 extern uint8_t bgx1_PIN; 00213 00218 void bgx1_syncPort(); 00219 00223 uint16_t bgx1_getAnalog(uint8_t index); 00224 00225 00229 extern uint8_t bgx1_Leds; 00230 00234 extern uint8_t bgx1_Keys; 00235 00240 void bgx1_syncInterface(); 00241 00246 void bgx1_setIllumination(uint16_t illu); 00247 00248 00249 00250 00251 #ifdef __cplusplus 00252 } // extern "C" 00253 #endif 00254 00255 #endif // NIBO_BGX1_H_