A web server for monitoring and controlling a MakerBot Replicator over the USB host and ethernet.
Dependencies: IAP NTPClient RTC mbed-rtos mbed Socket lwip-sys lwip BurstSPI
Fork of LPC1768_Mini-DK by
modifs.h
00001 /* 00002 Authors : Erik Olieman/Frank Vannieuwkerke 00003 ------------------------------------------ 00004 00005 11/12/2012 Initial code (ported from Peter Drescher's code - http://mbed.org/cookbook/SPI-driven-QVGA-TFT 00006 Replaced DMA code with SPI code - modified several functions to fit ILI9320. 00007 00008 12/12/2012 (SPI_TFT) Replaced circle and fillcircle with draw_ellipse and fill_ellipse 00009 Modified rect and fillrect: use width and height parameters instead of x1,y1 00010 00011 31/12/2012 lpc1768 SPI port: problem when using SD and TFT simultaneously - solution provided by Erik Olieman 00012 see note http://mbed.org/comments/cr/83/2654/#c4768 00013 00014 Code readability and speed 00015 1. created separate structure for mini-DK (base for library) 00016 2. Removed wr_dat_only routine (uses 8 bit transfer = slow) in SPI_TFT 00017 Replaced each wr_dat_only with 00018 _spi.format(16,3); 00019 ..... 00020 _spi.write(...); 00021 ..... 00022 _spi.format(8,3); 00023 3. Creation of Mini-DK.h with all declarations specific to the mini-DK board. 00024 00025 Removed reset pin from SPI_TFT (not needed - pin is connected to main reset). 00026 00027 Separated SPI_TFT from TouchADS7843 00028 00029 In main.cpp 00030 ----------- 00031 TouchScreenADS7843 initialisation: pointer to SPI_TFT needed for calibration, drawcross and drawpoint routines. 00032 00033 Moved following global touch var declarations from main.cpp back to touch.cpp/.h 00034 Matrix matrix; 00035 Coordinate display; 00036 Coordinate screen; 00037 NOTE : i did not create a class with var readback, just used plain C notation. 00038 These vars can be accessed from other code through <classname>.<varname> 00039 example : TP.display.x 00040 Only drawback : Each element of these vars needs to be initialised separately. 00041 (initialisation of these vars is not possible with array notation). 00042 00043 In Touch.cpp/.h 00044 --------------- 00045 TouchScreenADS7843 constructor: added pointer to SPI_TFT - needed for calibration, drawcross and drawpoint routines. 00046 If LCD calls are not needed, initialise TouchScreenADS7843 with NULL pointer for LCD. 00047 00048 Removed TP_Init - moved TP_init code to constructor. 00049 00050 Variables in call to TouchPanel_Calibrate, Read_Ads7846, getDisplayPoint are no longer needed. 00051 Modified these routines accordingly in touch.cpp/.h (pointers no longer needed) 00052 00053 Read_Ads7846: is also called in TouchPanel_Calibrate (Touch.cpp) with other var. 00054 Modified Read_Ads7846 to allow call with/without (parameter). 00055 When called without (parameter) - screen variable is used, otherwise (parameter) is used. 00056 in Touch.h - unsigned char Read_Ads7846(Coordinate * screenPtr); replaced with 00057 unsigned char Read_Ads7846(Coordinate * screenPtr = NULL); 00058 in Touch.cpp - if (screenPtr == NULL) screenPtr = &screen; added. 00059 00060 00061 00062 00063 In SPI_TFT 00064 ---------- 00065 Changed the SPI object to a BurstSPI object 00066 All cases where large numbers of bytes are written (filled rect, cls, etc) have been replaced by fastWrite functions for higher speed 00067 mbed library updated to this century 00068 Colorwheel stepsize reduced to 1 in main.cpp 00069 00070 Known issues: claim function for stdout does not work 00071 Removed stream name from TextDisplay (not used in current mbed version) 00072 00073 00074 03/01/2013 General cleaning: 00075 SPI_TFT::window function changed to use ints instead of unsigned ints, and made virtual to remove warnings. 00076 In SPI_TFT.cpp GraphicsDiplay initialization moved to front to remove warnings 00077 In Touch.cpp TFT pointer initialization moved to front to remove warnings 00078 In Mini_DK.h Added SD card pins 00079 Added two macros to enable/disable the LCD MISO pin, allowing use of both SD card and LCD 00080 Usage (in your main function): 00081 ENABLE_LCD_MISO when you want to read from LCD 00082 DISABLE_LCD_MISO when you want to read from SD 00083 Faster SPI write: BurstSPI libary added. 00084 _spi.write replaced with _spi.fastWrite 00085 (http://mbed.org/users/Sissors/code/BurstSPI/docs/600eecd89a78/BurstSPI_8cpp_source.html) 00086 Code cleanup & comments added. 00087 Separate Mini_DK library created. 00088 00089 04/01/2013 Added ability to use bitmaps from any filesystem. 00090 Added conversion to be able to use 24 bit bitmaps. 00091 NOTE : Don't forget to load the official mbed SDFileSystem library!! 00092 00093 06/01/2013 Bug fix in Bitmap function: orientation. 00094 Added IAP (In-Application programming): internal Flash memory access library. 00095 Added option to use a background image: #define USE_FLASH_BUFFER introduced in SPI_TFT.h 00096 When omitted, the bitmap is NOT copied to flash memory. 00097 Bitmap function: comments about return codes updated. 00098 Background image remains static when orientation is changed. 00099 Constructor modified in SPI_TFT: backgroundOrientation = 0; 00100 changed to 00101 #ifdef USE_FLASH_BUFFER 00102 backgroundOrientation = 0; 00103 #endif 00104 00105 08/01/2013 Stream & claim issues resolved: mbed library has been updated by the mbed team to allow 00106 stream name => claim function can be used again. 00107 Changed 'TextDisplay::TextDisplay(const char *name) : Stream()' back to 00108 TextDisplay::TextDisplay(const char *name) : Stream(name) in TextDisplay.cpp 00109 #define USE_FLASH_BUFFER (SPI_TFT.h) replaced with #define NO_FLASH_BUFFER (Mini_DK.h). When copy to flash 00110 is not needed, enable this option. 00111 00112 09/01/2013 Code cleanup: modifs.h streamlined. 00113 SPI_TFT.cpp and SPI_TFT.h comments. 00114 Touch.cpp commnets. 00115 00116 */
Generated on Tue Jul 12 2022 17:52:03 by 1.7.2