================
- Added driver for Sharp Memory Display
/drivers/lcd/bitmap/sharpmem
+- Added SPI Flash example
+ /tools/examples/spiflash/*
+- Added write function to SPI Flash driver
+ /drivers/spiflash/*
v0.9.5 - 3 August 2011
======================
VPATH += drivers/sensors/tcs3414 drivers/sensors/tsl2561
OBJS += tcs3414.o tsl2561.o
+# SPI Flash
+VPATH += drivers/spiflash/w25q16bv
+OBJS += w25q16bv.o
+
##########################################################################
# Library files
##########################################################################
<?xml version="1.0" encoding="utf-8"?>
<Session Name="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\build\codelite\LPC1343 Workspace.workspace">
- <int Value="1" Name="m_selectedTab"/>
+ <int Value="0" Name="m_selectedTab"/>
<wxString Value="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\build\codelite\LPC1343 Workspace.workspace" Name="m_workspaceName"/>
<TabInfoArray Name="TabInfoArray">
<TabInfo>
<wxString Value="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" Name="FileName"/>
- <int Value="40" Name="FirstVisibleLine"/>
- <int Value="41" Name="CurrentLine"/>
+ <int Value="0" Name="FirstVisibleLine"/>
+ <int Value="11" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
</TabInfo>
<TabInfo>
<wxString Value="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\Makefile" Name="FileName"/>
- <int Value="54" Name="FirstVisibleLine"/>
- <int Value="63" Name="CurrentLine"/>
+ <int Value="161" Name="FirstVisibleLine"/>
+ <int Value="167" Name="CurrentLine"/>
+ <wxArrayString Name="Bookmarks"/>
+ </TabInfo>
+ <TabInfo>
+ <wxString Value="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\projectconfig.h" Name="FileName"/>
+ <int Value="45" Name="FirstVisibleLine"/>
+ <int Value="10" Name="CurrentLine"/>
<wxArrayString Name="Bookmarks"/>
</TabInfo>
</TabInfoArray>
<File Name="../../drivers/rtc/isl12022m/isl12022m.h"/>
</VirtualDirectory>
</VirtualDirectory>
+ <VirtualDirectory Name="spiflash">
+ <File Name="../../drivers/spiflash/spiflash.h"/>
+ <VirtualDirectory Name="w25q16bv">
+ <File Name="../../drivers/spiflash/w25q16bv/w25q16bv.c"/>
+ <File Name="../../drivers/spiflash/w25q16bv/w25q16bv.h"/>
+ </VirtualDirectory>
+ </VirtualDirectory>
</VirtualDirectory>
<VirtualDirectory Name="lpc1xxx">
<File Name="../../lpc1xxx/linkscript.ld"/>
<ProjectSessionItem path="LPC1343_CodeBase" name="unnamed" />
<ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase" name="unnamed" />
<ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files" name="unnamed" />
- <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;drivers" name="unnamed" />
- <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;drivers;lcd" name="unnamed" />
- <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;drivers;lcd;tft" name="unnamed" />
- <ProjectSessionItem path="LPC1343_CodeBase;LPC1343_CodeBase;Source Files;drivers;lcd;tft;hw" name="unnamed" />
</Project>
<Register1>
<RegisterWindow openNodes="USB;USB/USBRxPLen;USB/USBTxPLen;USB/USBCtrl" binaryNodes="" hiddenNodes="" unsignedNodes="" visibleGroups="CPU;USB" decimalNodes="" octalNodes="" asciiNodes="" />
</TraceWindow>
<Watch1>
<Watches active="1" update="Each Second" >
- <Watchpoint linenumber="66" radix="10" name="msTicks" expression="msTicks" filename="c:/documents and settings/kevin/my documents/my dropbox/microbuilder/code/lpc1343/lpc1343_codebase/core/systick/systick.c" />
- <Watchpoint linenumber="138" radix="16" name="timer32_0_counter" expression="timer32_0_counter" filename="c:/documents and settings/kevin/my documents/my dropbox/microbuilder/code/lpc1343/lpc1343_codebase/core/timer32/timer32.c" />
- <Watchpoint linenumber="155" radix="-1" name="xTickCount" expression="xTickCount" filename="c:/documents and settings/kevin/my documents/my dropbox/microbuilder/code/lpc1343/lpc1343_codebase/freertos/tasks.c" />
<Watchpoint linenumber="155" radix="16" name="Tick" expression="Tick" filename="c:/documents and settings/kevin/my documents/my dropbox/microbuilder/code/lpc1343/lpc1343_codebase/freertos/tasks.c" />
+ <Watchpoint linenumber="155" radix="-1" name="xTickCount" expression="xTickCount" filename="c:/documents and settings/kevin/my documents/my dropbox/microbuilder/code/lpc1343/lpc1343_codebase/freertos/tasks.c" />
+ <Watchpoint linenumber="138" radix="16" name="timer32_0_counter" expression="timer32_0_counter" filename="c:/documents and settings/kevin/my documents/my dropbox/microbuilder/code/lpc1343/lpc1343_codebase/core/timer32/timer32.c" />
+ <Watchpoint linenumber="66" radix="10" name="msTicks" expression="msTicks" filename="c:/documents and settings/kevin/my documents/my dropbox/microbuilder/code/lpc1343/lpc1343_codebase/core/systick/systick.c" />
</Watches>
</Watch1>
<Watch2>
<Watches active="0" update="Never" />
</Watch4>
<Files>
- <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="52" debugPath="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" y="65" path="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" left="0" selected="1" name="unnamed" top="46" />
+ <SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="76" debugPath="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" y="34" path="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\main.c" left="0" selected="1" name="unnamed" top="0" />
</Files>
<ARMCrossStudioWindow activeProject="LPC1343_CodeBase" autoConnectTarget="Segger J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Dropbox\microBuilder\Code\LPC1343\LPC1343_CodeBase_GIT\drivers\lcd\tft\hw" fileDialogDefaultFilter="*.c" autoConnectCapabilities="388991" debugSearchPath="" buildConfiguration="THUMB Flash Release" />
</session>
// Send individual characters
// We need to manually calculate width in pages since this is screwy with variable width fonts
//uint8_t heightPages = charWidth % 8 ? charWidth / 8 : charWidth / 8 + 1;
- drawCharBitmap(currentX, y, color, &fontInfo->data[charOffset], charWidth, fontInfo->height);
+ drawCharBitmap(currentX, y, color, (const char *)(&fontInfo->data[charOffset]), charWidth, fontInfo->height);
// next char X
currentX += charWidth + 1;
{
if (!_w25q16bvInitialised) spiflashInit();
- uint32_t i;
-
// ToDo: Put the WP pin in an appropriate state if required
W25Q16BV_SELECT();
spiflashError_e spiflashWritePage (uint32_t address, uint8_t *buffer, uint32_t len)
{
uint8_t status;
- uint32_t currentpage, totalpages;
- uint32_t a, i, timeout;
- a = i = 0;
+ uint32_t i;
if (!_w25q16bvInitialised) spiflashInit();
#include "core/cmd/cmd.h"
#endif
+/**************************************************************************/
+/*!
+ Approximates a 1 millisecond delay using "nop". This is less
+ accurate than a dedicated timer, but is useful in certain situations.
+
+ The number of ticks to delay depends on the optimisation level set
+ when compiling (-O). Depending on the compiler settings, one of the
+ two defined values for 'delay' should be used.
+*/
+/**************************************************************************/
+void delayms(uint32_t ms)
+{
+ uint32_t delay = ms * ((CFG_CPU_CCLK / 100) / 45); // Release Mode (-Os)
+ // uint32_t delay = ms * ((CFG_CPU_CCLK / 100) / 120); // Debug Mode (No optimisations)
+
+ while (delay > 0)
+ {
+ __asm volatile ("nop");
+ delay--;
+ }
+}
+
/**************************************************************************/
/*!
Main program entry point. After reset, normal code execution will