v1.1.0
authorKevin Townsend <kevin@ktownsend.com>
Mon, 9 Apr 2012 21:07:58 +0000 (23:07 +0200)
committerKevin Townsend <kevin@ktownsend.com>
Mon, 9 Apr 2012 21:07:58 +0000 (23:07 +0200)
13 files changed:
ChangeLog.txt
Makefile
build/codelite/LPC1343 Workspace.workspace.session
build/codelite/LPC1343_CodeBase.project
build/crossworks/LPC1343_CodeBase.hzp
build/crossworks/LPC1343_CodeBase.hzs
core/ssp/ssp.c
drivers/displays/tft/theme.h
drivers/displays/tft/touchscreen.c
main.c
project/commands/drawing/cmd_button.c
project/commands/drawing/cmd_progress.c
projectconfig.h

index 979788a..9f7f7da 100644 (file)
@@ -1,4 +1,4 @@
-v1.1.0 - Ongoing
+v1.1.0 - 9 April 2012
 ==============================================================================
 BREAKING CHANGES
 ------------------------------------------------------------------------------
index 379faa6..3e5c335 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,7 @@ OBJS += isl12022m.o
 
 # TFT LCD support
 VPATH += drivers/displays/tft drivers/displays/tft/hw 
-OBJS += drawing.o touchscreen.o colors.o bmp.o
+OBJS += drawing.o touchscreen.o colors.o theme.o bmp.o
 
 # GUI Controls
 VPATH += drivers/displays/tft/controls
index 81974c2..b59e362 100644 (file)
@@ -5,20 +5,20 @@
   <TabInfoArray Name="TabInfoArray">
     <TabInfo>
       <wxString Value="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\Makefile" Name="FileName"/>
-      <int Value="5" Name="FirstVisibleLine"/>
+      <int Value="59" Name="FirstVisibleLine"/>
       <int Value="84" Name="CurrentLine"/>
       <wxArrayString Name="Bookmarks"/>
     </TabInfo>
     <TabInfo>
       <wxString Value="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\projectconfig.h" Name="FileName"/>
-      <int Value="623" Name="FirstVisibleLine"/>
-      <int Value="646" Name="CurrentLine"/>
+      <int Value="0" Name="FirstVisibleLine"/>
+      <int Value="0" Name="CurrentLine"/>
       <wxArrayString Name="Bookmarks"/>
     </TabInfo>
     <TabInfo>
       <wxString Value="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" Name="FileName"/>
       <int Value="0" Name="FirstVisibleLine"/>
-      <int Value="14" Name="CurrentLine"/>
+      <int Value="6" Name="CurrentLine"/>
       <wxArrayString Name="Bookmarks"/>
     </TabInfo>
   </TabInfoArray>
index ad75d70..10d1983 100644 (file)
           <File Name="../../drivers/displays/tft/fonts/verdanabold14.c"/>
           <File Name="../../drivers/displays/tft/fonts/verdanabold14.h"/>
         </VirtualDirectory>
-        <VirtualDirectory Name="dialogues">
-          <File Name="../../drivers/displays/tft/dialogues/alphanumeric.c"/>
-          <File Name="../../drivers/displays/tft/dialogues/alphanumeric.h"/>
-        </VirtualDirectory>
         <File Name="../../drivers/displays/tft/bmp.c"/>
         <File Name="../../drivers/displays/tft/bmp.h"/>
         <File Name="../../drivers/displays/tft/colors.h"/>
           <VirtualDirectory Name="aa4"/>
         </VirtualDirectory>
         <File Name="../../drivers/displays/tft/colors.c"/>
+        <VirtualDirectory Name="controls">
+          <File Name="../../drivers/displays/tft/controls/button.c"/>
+          <File Name="../../drivers/displays/tft/controls/button.h"/>
+          <File Name="../../drivers/displays/tft/controls/hsbchart.c"/>
+          <File Name="../../drivers/displays/tft/controls/hsbchart.h"/>
+          <File Name="../../drivers/displays/tft/controls/huechart.c"/>
+          <File Name="../../drivers/displays/tft/controls/huechart.h"/>
+          <File Name="../../drivers/displays/tft/controls/label.c"/>
+          <File Name="../../drivers/displays/tft/controls/label.h"/>
+          <File Name="../../drivers/displays/tft/controls/labelcentered.c"/>
+          <File Name="../../drivers/displays/tft/controls/labelcentered.h"/>
+          <File Name="../../drivers/displays/tft/controls/progressbar.c"/>
+          <File Name="../../drivers/displays/tft/controls/progressbar.h"/>
+        </VirtualDirectory>
+        <File Name="../../drivers/displays/tft/theme.c"/>
+        <File Name="../../drivers/displays/tft/theme.h"/>
       </VirtualDirectory>
       <VirtualDirectory Name="bitmap">
         <VirtualDirectory Name="st7565">
index c05e75e..b58252b 100644 (file)
               <file file_name="../../drivers/displays/tft/controls/label.c"/>
               <file file_name="../../drivers/displays/tft/controls/labelcentered.c"/>
             </folder>
+            <file file_name="../../drivers/displays/tft/theme.c"/>
           </folder>
           <folder Name="character">
             <folder Name="samsung_20T202DA2JA">
   <configuration Name="Debug" build_debug_information="Yes" c_preprocessor_definitions="DEBUG" gcc_optimization_level="None" hidden="Yes" link_include_startup_code="No"/>
   <configuration Name="THUMB Flash Release" inherited_configurations="THUMB;Flash;Release"/>
   <configuration Name="Release" build_debug_information="No" build_remove_unused_symbols="Yes" c_additional_options="-g1" c_preprocessor_definitions="NDEBUG;STARTUP_FROM_RESET" gcc_optimization_level="Optimize For Size" hidden="Yes" link_include_startup_code="No"/>
-  <configuration Name="Common" arm_linker_allow_multiple_definition="Yes" c_user_include_directories="$(ProjectDir)/../../;$(ProjectDir)/../../Project/"/>
+  <configuration Name="Common" arm_gcc_target="arm-unknown-eabi" arm_library_optimization="Small" arm_linker_allow_multiple_definition="Yes" c_user_include_directories="$(ProjectDir)/../../;$(ProjectDir)/../../Project/"/>
 </solution>
index e77a2dd..430ec20 100644 (file)
@@ -27,7 +27,7 @@
   <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;drivers" name="unnamed" />
   <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;drivers;displays" name="unnamed" />
   <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;drivers;displays;tft" name="unnamed" />
-  <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;project" name="unnamed" />
+  <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;drivers;displays;tft;controls" name="unnamed" />
  </Project>
  <Register1>
   <RegisterWindow openNodes="GPIO2" binaryNodes="" hiddenNodes="" unsignedNodes="" visibleGroups="CPU;CoreDebug;GPIO2" decimalNodes="" octalNodes="" asciiNodes="" />
@@ -63,8 +63,7 @@
   <Watches active="0" update="Never" />
  </Watch4>
  <Files>
-  <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\projectconfig.h" y="554" path="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\projectconfig.h" left="0" selected="0" name="unnamed" top="507" />
-  <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" y="175" path="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" left="0" selected="1" name="unnamed" top="147" />
+  <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="27" debugPath="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" y="42" path="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" left="0" selected="1" name="unnamed" top="30" />
  </Files>
- <ARMCrossStudioWindow activeProject="LPC1343_CodeBase" autoConnectTarget="SEGGER J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\drivers\displays\tft\controls" fileDialogDefaultFilter="*.c" autoConnectCapabilities="388991" debugSearchPath="" buildConfiguration="THUMB Flash Release" />
+ <ARMCrossStudioWindow activeProject="LPC1343_CodeBase" autoConnectTarget="SEGGER J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\drivers\displays\tft" fileDialogDefaultFilter="" autoConnectCapabilities="388991" debugSearchPath="" buildConfiguration="THUMB Flash Release" />
 </session>
index 284945c..b6beef2 100644 (file)
@@ -2,8 +2,6 @@
 /*! 
     @file     ssp.c
     @author   K. Townsend (microBuilder.eu)
-    @date     22 March 2010
-    @version  0.10
 
     @section DESCRIPTION
 
@@ -40,7 +38,7 @@
 
     Software License Agreement (BSD License)
 
-    Copyright (c) 2010, microBuilder SARL
+    Copyright (c) 2012, K. Townsend
     All rights reserved.
 
     Redistribution and use in source and binary forms, with or without
@@ -181,7 +179,7 @@ void sspInit (uint8_t portNum, sspClockPolarity_t polarity, sspClockPhase_t phas
     gpioSetValue(SSP0_CSPORT, SSP0_CSPIN, 1);
     gpioSetPullup(&IOCON_PIO0_2, gpioPullupMode_Inactive);  // Board has external pull-up
   
-    /* If SSP0CLKDIV = DIV1 -- (PCLK / (CPSDVSR × [SCR+1])) = (72,000,000 / (2 x [8 + 1])) = 4.0 MHz */
+    /* If SSP0CLKDIV = DIV1 -- (PCLK / (CPSDVSR  [SCR+1])) = (72,000,000 / (2 x [8 + 1])) = 4.0 MHz */
     uint32_t configReg = ( SSP_SSP0CR0_DSS_8BIT   // Data size = 8-bit
                   | SSP_SSP0CR0_FRF_SPI           // Frame format = SPI
                   | SSP_SSP0CR0_SCR_8);           // Serial clock rate = 8
index a8758e3..e2a3e78 100644 (file)
@@ -86,18 +86,6 @@ typedef struct theme_s
   uint16_t colorFillAlt;                    // Slightly lighter or darker fill for window and control backgrounds
 } theme_t;
 
-// Grayscale Theme (Default Setting)
-theme_t themeGrayscale =                  { COLOR_WHITE,                  // Background Color
-                                            COLOR_GRAY_128,               // Border Color
-                                            COLOR_GRAY_80,                // Border Darker
-                                            COLOR_BLACK,                  // Text Color
-                                            COLOR_GRAY_50,                // Alt. Text Color
-                                            COLOR_GRAY_200,               // Fill (Normal)
-                                            COLOR_GRAY_225 };             // Fill (Alternate)
-
-// Default theme
-#define THEME_DEFAULT                       themeGrayscale
-
 // Default font
 #if CFG_TFTLCD_USEAAFONTS
   #define THEME_FONT                        DejaVuSansCondensedBold14_AA2
@@ -105,4 +93,6 @@ theme_t themeGrayscale =                  { COLOR_WHITE,                  // Bac
   #define THEME_FONT                        dejaVuSans9ptFontInfo
 #endif
 
-#endif
\ No newline at end of file
+theme_t themeGetDefault(void);
+
+#endif
index 6e31824..1ac7821 100644 (file)
@@ -170,7 +170,7 @@ uint32_t tsReadY(void)
 /**************************************************************************/
 void tsCalibCenterText(char* text, uint16_t y, uint16_t color)
 {
-  labelcenteredRender(lcdGetWidth()/2, y, COLOR_WHITE, color, text, THEME_DEFAULT);
+  labelcenteredRender(lcdGetWidth()/2, y, COLOR_WHITE, color, text, themeGetDefault());
 }
 
 /**************************************************************************/
diff --git a/main.c b/main.c
index ba5cd42..bb2c280 100644 (file)
--- a/main.c
+++ b/main.c
     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 /**************************************************************************/
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-
 #include "projectconfig.h"
 #include "sysinit.h"
 
index bfa321b..9af4310 100644 (file)
@@ -74,7 +74,7 @@ void cmd_button(uint8_t argc, char **argv)
   if (argc == 5)
   {
     // Render the button with no text
-    buttonRender(x, y, w, h, (uint16_t)fontcolor, NULL, THEME_DEFAULT);
+    buttonRender(x, y, w, h, (uint16_t)fontcolor, NULL, themeGetDefault());
   }
   else
   {
@@ -91,7 +91,7 @@ void cmd_button(uint8_t argc, char **argv)
     *data_ptr++ = '\0';
 
     // Render the button with text
-    buttonRender(x, y, w, h, (uint16_t)fontcolor, (char *)&data, THEME_DEFAULT);
+    buttonRender(x, y, w, h, (uint16_t)fontcolor, (char *)&data, themeGetDefault());
   }
 }
 
index a8b9e56..dbd5dec 100644 (file)
@@ -77,7 +77,7 @@ void cmd_progress(uint8_t argc, char **argv)
   }
 
   // Draw the progress bar (always use rounded corners for simplicity sake)
-  progressbarRender(x, y, w, h, percent, progressfill, THEME_DEFAULT);
+  progressbarRender(x, y, w, h, percent, progressfill, themeGetDefault());
 }
 
 #endif  
index f0fc30c..449cc59 100644 (file)
                               addition to CFG_INTERFACE_ENABLEIRQ if
                               this is also enabled.  The character used
                               is defined below.
+    CFG_INTERFACE_LONGSYSINFO If this is set to 1 extra information will
+                              be included in the Sys Info ('V') command
+                              on the CLI. This can be useful when trying
+                              to debug problems on remote HW, or with 
+                              unknown firmware.  It will also use about
+                              0.5KB flash, though, so only enable it is
+                              necessary.
 
     NOTE:                     The command-line interface will use either
                               USB-CDC or UART depending on whether
       #define CFG_INTERFACE_IRQPIN        (7)
       #define CFG_INTERFACE_SHORTERRORS   (0)
       #define CFG_INTERFACE_CONFIRMREADY  (0)
+      #define CFG_INTERFACE_LONGSYSINFO   (0)
     #endif
 
     #ifdef CFG_BRD_LPC1343_REFDESIGN_MINIMAL
       #define CFG_INTERFACE_IRQPIN        (7)
       #define CFG_INTERFACE_SHORTERRORS   (0)
       #define CFG_INTERFACE_CONFIRMREADY  (0)
+      #define CFG_INTERFACE_LONGSYSINFO   (0)
     #endif
 
     #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE_USB
       #define CFG_INTERFACE_SHORTERRORS_TOOMANYARGS       ">"
       #define CFG_INTERFACE_SHORTERRORS_TOOFEWARGS        "<"
       #define CFG_INTERFACE_CONFIRMREADY_TEXT             "."
+      #define CFG_INTERFACE_LONGSYSINFO   (0)
     #endif
 
     #ifdef CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART
       #define CFG_INTERFACE_SHORTERRORS_TOOMANYARGS       ">"
       #define CFG_INTERFACE_SHORTERRORS_TOOFEWARGS        "<"
       #define CFG_INTERFACE_CONFIRMREADY_TEXT             "."
+      #define CFG_INTERFACE_LONGSYSINFO   (0)
     #endif
 
     #ifdef CFG_BRD_LPC1343_802154USBSTICK
       #define CFG_INTERFACE_IRQPIN        (7)
       #define CFG_INTERFACE_SHORTERRORS   (0)
       #define CFG_INTERFACE_CONFIRMREADY  (0)
+      #define CFG_INTERFACE_LONGSYSINFO   (0)
     #endif
        
     #ifdef CFG_BRD_LPC1343_OLIMEX_P
       #define CFG_INTERFACE_IRQPIN        (7)
       #define CFG_INTERFACE_SHORTERRORS   (0)
       #define CFG_INTERFACE_CONFIRMREADY  (0)
+      #define CFG_INTERFACE_LONGSYSINFO   (0)
     #endif
 
     #ifdef CFG_BRD_LPC1343_LPCXPRESSO
       #define CFG_INTERFACE_IRQPIN        (7)
       #define CFG_INTERFACE_SHORTERRORS   (0)
       #define CFG_INTERFACE_CONFIRMREADY  (0)
+      #define CFG_INTERFACE_LONGSYSINFO   (0)
     #endif
 /*=========================================================================*/
 
     #ifdef CFG_BRD_LPC1343_REFDESIGN
       // #define CFG_TFTLCD
       #define CFG_TFTLCD_INCLUDESMALLFONTS   (0)
-      #define CFG_TFTLCD_USEAAFONTS          (1)
+      #define CFG_TFTLCD_USEAAFONTS          (0)
       #define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50)
       #define CFG_TFTLCD_TS_KEYPADDELAY      (100)
     #endif
     #if defined CFG_BRD_LPC1343_TFTLCDSTANDALONE_USB || defined CFG_BRD_LPC1343_TFTLCDSTANDALONE_UART
       #define CFG_TFTLCD
       #define CFG_TFTLCD_INCLUDESMALLFONTS   (0)
-      #define CFG_TFTLCD_USEAAFONTS          (1)
+      #define CFG_TFTLCD_USEAAFONTS          (0)
       #define CFG_TFTLCD_TS_DEFAULTTHRESHOLD (50)
       #define CFG_TFTLCD_TS_KEYPADDELAY      (100)
     #endif
This page took 0.044972 seconds and 4 git commands to generate.