Projekte
workwind
BGX1 firmware
gfx.h
Projekte
Forum
Doku
Öffentliche Projekte
Startseite
Beispielprogramme
Projekte von anderen
Welcome
Username
Passwort
Eingeloggt bleiben
Zugangsdaten vergessen?
Registrieren
Projektverwaltung
⇨ Please choose! ⇦
——————————————————
✎ Create new project...
★ Browse existing projects...
——————————————————
⚬ MotorTest#1
⚬ C Tutorial 8#1
⚬ NIBO2 C Project#1
⚙ C Tutorial 15#1
⚬ 2010_11_18_el_test001#1
BGX1 firmware
adc.c
adc.h
battery.xbm
bgx1_protocol.h
Biene.xbm
display.c
display.h
exclamation.xbm
gfx.c
gfx.h
i2c.c
i2c.h
i2cconf.h
images.c
images.h
iodefs.h
iodefs_bgx1.h
main.c
MarsRover.xbm
Nase.xbm
nicai_logo.xbm
pwm.c
pwm.h
question.xbm
smily1.xbm
smily2.xbm
Project details
Compiler settings
Nachrichten
Sie sind nicht eingeloggt.
Neuigkeiten
★
NiboRoboLib 3.6
2017-01-17: Neue Version 3.6
★
NiboRoboLib 3.4.1
2016-04-16: Neue Version 3.4.1
★
Coding Tutorial
2015-11-22: Jetzt auch für den NIBO burger!
Site-Statistic
7430 private projects
378 public projects
16178470 lines compiled
58188 builds
NIBO
@
bgx1_firmware/gfx.h [read only]
/* BSD-License: Copyright (c) 2007 by Nils Springob, nicai-systems, Germany All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name nicai-systems nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! @file gfx.h * @brief Routinen zur Ansteuerung eines LC-Grafik-Displays * @author Nils Springob (nils@nicai-systems.de) * @date 2007-07-16 * * Dieser Teil stellt Funktionen zur Textausgabe auf dem Grafikdisplay zur * Verfügung. * Alle Funktionen arbeiten blockierend, das heisst sie kehren erst zurück * wenn die Daten übertragen wurden. */ #ifndef NIBOBEE_GFX_H_ #define NIBOBEE_GFX_H_ #include <stdint.h> #include <avr/pgmspace.h> #ifdef __cplusplus extern "C" { #endif typedef struct { uint8_t width; uint8_t height; uint8_t data[]; } bitmap_t; enum { GFX_DM_JAM1=0, GFX_DM_JAM2=1, GFX_DM_COMP=2, GFX_DM_JAM1_INV=4, GFX_DM_JAM2_INV=5, GFX_DM_COMP_INV=6 }; /*! * Initialisiert das Grafik Display. Die Funktion @ref display_init() muss * vorher aufgerufen werden! */ void gfx_init(); /*! * Liefert aktuelle X Position des Grafikcursors */ uint8_t gfx_get_x(); /*! * Liefert aktuelle Y Position des Grafikcursors */ uint8_t gfx_get_y(); /*! * Setzt Grafikcursor auf angegebene Position * @param x X-Position des Cursors (0..127) * @param y Y-Position des Cursors (0..63) */ void gfx_move(uint8_t x, uint8_t y); /*! * Setzt den Zeichenmodus * @param mode Zeichenmodus */ void gfx_draw_mode(uint8_t mode); /*! * Fulle gesamten Bildschirm mit angegebener Bitfolge * @param val Bitmaske */ void gfx_fill(uint8_t val); /*! * Liefert Breite in Pixeln für angegebenes Zeichen * @param ch Zeichen * @return Breite in Pixeln */ uint8_t gfx_char_width(char ch); /*! * Liefert Breite in Pixeln für Nullterminierten String * @param txt Nullterminierter String * @return Breite in Pixeln */ uint8_t gfx_text_width(const char *txt); /*! * Liefert Breite in Pixeln für Nullterminierten String im FLASH * @param txt Nullterminierter String im FLASH * @return Breite in Pixeln */ uint8_t gfx_text_width_P(PGM_P txt); /*! * Gibt angegebenes Zeichen an der aktuellen Grafikposition aus. * @param c Zeichen */ void gfx_print_char(char c); /*! * Gibt angegebenen Nullterminierten String an der aktuellen Grafikposition aus. * @param txt Nullterminierter String */ void gfx_print_text(const char *txt); /*! * Gibt angegebenen Nullterminierten String im FLASH an der aktuellen Grafikposition aus. * @param txt Nullterminierter String im FLASH */ void gfx_print_text_P(PGM_P txt); /*! * Gibt angegebene Bitmap an der aktuellen Grafikposition aus. */ void gfx_draw_xbm(uint8_t w, uint8_t h, uint8_t * data); /*! * Gibt angegebene Bitmap an der aktuellen Grafikposition aus. */ void gfx_draw_xbm_P(uint8_t w, uint8_t h, PGM_P data); /*! * Setzt den Proportionalitaetsmodus. * @param prop 0=fix, 1=Proportional */ void gfx_set_proportional(uint8_t prop); /*! * Liefert den aktuellen Proportionalitaetsmodus. * @return 0=fix, 1=Proportional */ uint8_t gfx_get_proportional(void); /*! * Zeichnet eine horizontale Linie von der aktuellen Position nach rechts * @param length Länge der Linie */ void gfx_hline(uint8_t length); /*! * Zeichnet eine vertikale Linie von der aktuellen Position nach unten * @param length Länge der Linie */ void gfx_vline(uint8_t length); /*! * Zeichnet ein Rechteck. * @param width Breite * @param height Höhe */ void gfx_box(uint8_t width, uint8_t height); void gfx_lineTo(uint8_t x, uint8_t y); void gfx_term_clear(); void gfx_term_goto(uint8_t col, uint8_t row); void gfx_term_scroll(uint8_t lines); void gfx_term_print(const char * text); #ifdef __cplusplus } // extern "C" #endif #endif // NIBOBEE_GFX_H_
Compiler results:
Werbung
Online
andreasnew290004031
Banane
blairembley00135154
bobbiedevereaux394
chandradillion322729
claysadleir964730
deandnv25751532757234
dianeiek83169264258
drusillapayne578806
elberttelfer568
elissa90h1495041949
elvialavender09
freddymunson4969971
harold532781508
hersheldraper36
jamierapp475936
janellegard4477
lenoretousignant247
margaretasykes113416
margenebales8570025
marina42362450713
maxiepalfreyman85
natashamoyes64624093
shaneldisher04604335
shellachen05598945
warrenhinder6456
zackirvin72719811111