From 06baa20150ece9b45d038234a04ed558ed2effab Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Sun, 17 May 2015 23:29:58 +1000 Subject: Remove deprecated samples --- samples/dashboard_4884/LCD4884.cpp | 293 ------------------------------------- 1 file changed, 293 deletions(-) delete mode 100644 samples/dashboard_4884/LCD4884.cpp (limited to 'samples/dashboard_4884/LCD4884.cpp') diff --git a/samples/dashboard_4884/LCD4884.cpp b/samples/dashboard_4884/LCD4884.cpp deleted file mode 100644 index 2cf234f..0000000 --- a/samples/dashboard_4884/LCD4884.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/* -Modified by Lauren -version 0.3 - -Any suggestions are welcome. - -Editors : Lauren from DFRobot - Stanley Huang -Date : Feb. 11, 2012 - -* Added LCD_putchar for basic console display -* Have the back light under control. -* Update the library and sketch to compatible with IDE V1.0 and earlier - -*/ - -#include "LCD4884.h" -#include "font_6x8.h" -#include "font_big.h" - -#if defined(ARDUINO) && ARDUINO >= 100 -#include "Arduino.h" -#else -#include "WProgram.h" -#include "WConstants.h" -#endif - - -extern "C" -{ -#include -} - -#define NUM_COL 14 -#define NUM_ROW 5 - -LCD4884::LCD4884():prev_char(0),char_mode(MENU_NORMAL) -{}; - -LCD4884 lcd = LCD4884(); - -void LCD4884::backlight(unsigned char dat) -{ - if(dat==1) - digitalWrite(LCD_BL,HIGH); - else - digitalWrite(LCD_BL,LOW); -} - -void LCD4884::LCD_init(void) -{ - for(unsigned char i = 2; i < 8; i++) { - pinMode(i,OUTPUT); - digitalWrite(i,LOW); - } - - digitalWrite(LCD_RST,LOW); - delayMicroseconds(1); - digitalWrite(LCD_RST,HIGH); - - digitalWrite(SPI_CS,LOW); - delayMicroseconds(1); - digitalWrite(SPI_CS,HIGH); - delayMicroseconds(1); - digitalWrite(LCD_BL,HIGH); - - LCD_write_byte(0x21, 0); - LCD_write_byte(0xc0, 0); - LCD_write_byte(0x06, 0); - LCD_write_byte(0x13, 0); - LCD_write_byte(0x20, 0); - LCD_clear(); - LCD_write_byte(0x0c, 0); - - digitalWrite(SPI_CS,LOW); -} - -void LCD4884::LCD_write_byte(unsigned char dat, unsigned char dat_type) -{ - digitalWrite(SPI_CS,LOW); - if (dat_type == 0) - digitalWrite(LCD_DC,LOW); - else - digitalWrite(LCD_DC,HIGH); - - for(unsigned char i=0; i<8; i++) { - if(dat & 0x80) { - digitalWrite(SPI_MOSI,HIGH); - } else { - digitalWrite(SPI_MOSI,LOW); - } - digitalWrite(SPI_SCK,LOW); - dat = dat << 1; - digitalWrite(SPI_SCK,HIGH); - } - digitalWrite(SPI_CS,HIGH); -} - -void LCD4884::LCD_draw_bmp_pixel(unsigned char X,unsigned char Y,unsigned char *map, - unsigned char Pix_x,unsigned char Pix_y) -{ - unsigned int i,n; - unsigned char row; - - if (Pix_y%8==0) - row=Pix_y/8; - else - row=Pix_y/8+1; - - for (n=0;n