Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Smoothie by
ReprapDiscountGLCD.h
00001 /* 00002 This file is part of Smoothie (http://smoothieware.org/). The motion control part is heavily based on Grbl (https://github.com/simen/grbl). 00003 Smoothie is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 00004 Smoothie 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 General Public License for more details. 00005 You should have received a copy of the GNU General Public License along with Smoothie. If not, see <http://www.gnu.org/licenses/>. 00006 */ 00007 #ifndef RRDGLCD_H 00008 #define RRDGLCD_H 00009 00010 #include "LcdBase.h" 00011 00012 #include "libs/Config.h" 00013 #include "rrdglcd/RrdGlcd.h" 00014 00015 class ReprapDiscountGLCD : public LcdBase { 00016 public: 00017 ReprapDiscountGLCD(); 00018 virtual ~ReprapDiscountGLCD(); 00019 00020 int getEncoderResolution() { return 2; } 00021 bool hasGraphics() { return true; } 00022 uint16_t get_screen_lines() { return 8; } 00023 00024 uint8_t readButtons(); 00025 int readEncoderDelta(); 00026 void write(const char* line, int len); 00027 void home(); 00028 void clear(); 00029 void display(); 00030 void setCursor(uint8_t col, uint8_t row); 00031 void init(); 00032 void buzz(long,uint16_t); 00033 // blit a glyph of w pixels wide and h pixels high to x, y. offset pixel position in glyph by x_offset, y_offset. 00034 // span is the width in bytes of the src bitmap 00035 // The glyph bytes will be 8 bits of X pixels, msbit->lsbit from top left to bottom right 00036 void bltGlyph(int x, int y, int w, int h, const uint8_t *glyph, int span= 0, int x_offset=0, int y_offset=0); 00037 void on_refresh(bool now=false); 00038 00039 private: 00040 RrdGlcd* glcd; 00041 uint8_t col; 00042 uint8_t row; 00043 00044 Pin spi_cs_pin; 00045 Pin encoder_a_pin; 00046 Pin encoder_b_pin; 00047 Pin click_pin; 00048 Pin pause_pin; 00049 Pin buzz_pin; 00050 }; 00051 00052 00053 #endif
Generated on Tue Jul 12 2022 20:09:02 by
1.7.2
