From: Kevin Townsend Date: Mon, 14 May 2012 20:27:58 +0000 (+0200) Subject: Prep for v1.2.0 X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/commitdiff_plain/64dba59a68ae8ae69cf5ef5b37a3980f7c430a25?ds=inline Prep for v1.2.0 --- diff --git a/ChangeLog.txt b/ChangeLog.txt index e083124..a625b35 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -2,7 +2,9 @@ v1.1.2 - ongoing ============================================================================== NEW FEATURES ------------------------------------------------------------------------------ +- Cleaned up /tools/testfirmware to include more recent blinky, etc. - Added basic TEA5767 drive +- Added core/cmd/ansi.h (rediscover the joy of ANSI graphics codes :) - Added fastHLine and fastVLine to lcdProperties_t for all lcd drivers (to known whether an accelerated vertical or horizontal line drawing function is present in the driver or not) @@ -10,6 +12,10 @@ NEW FEATURES - Added PWM command to CLI (thanks Miceuz) - Added optional callback in 32-bit timer ISR (thanks again Miceuz) +BUG FIXES/OPTIMISATIONS/ETC. +------------------------------------------------------------------------------ +- Minor accuracy improvement to pwm.c (off by 1 error) +- Fixed typos in cmd_pwm.c and cmd_tbl.h v1.1.1 - 14 April 2012 ============================================================================== diff --git a/build/codelite/LPC1343 Workspace.workspace.session b/build/codelite/LPC1343 Workspace.workspace.session index b59e362..c047e00 100644 --- a/build/codelite/LPC1343 Workspace.workspace.session +++ b/build/codelite/LPC1343 Workspace.workspace.session @@ -17,13 +17,19 @@ - - + + + + + + + + - + @@ -40,5 +46,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/codelite/LPC1343_CodeBase.project b/build/codelite/LPC1343_CodeBase.project index 10d1983..d2b88b4 100644 --- a/build/codelite/LPC1343_CodeBase.project +++ b/build/codelite/LPC1343_CodeBase.project @@ -370,7 +370,7 @@ - + @@ -380,7 +380,7 @@ - + # Make sure that we are using SWD monitor interface SWD diff --git a/build/crossworks/LPC1343_CodeBase.hzp b/build/crossworks/LPC1343_CodeBase.hzp index 49398d9..877fd7d 100644 --- a/build/crossworks/LPC1343_CodeBase.hzp +++ b/build/crossworks/LPC1343_CodeBase.hzp @@ -73,6 +73,7 @@ + @@ -122,6 +123,9 @@ + + + diff --git a/build/crossworks/LPC1343_CodeBase.hzs b/build/crossworks/LPC1343_CodeBase.hzs index d03e981..c110e89 100644 --- a/build/crossworks/LPC1343_CodeBase.hzs +++ b/build/crossworks/LPC1343_CodeBase.hzs @@ -24,7 +24,12 @@ - + + + + + + @@ -44,10 +49,10 @@ - - - + + + @@ -60,7 +65,7 @@ - + - + diff --git a/drivers/displays/tft/controls/button.c b/drivers/displays/tft/controls/button.c index db29382..c657823 100644 --- a/drivers/displays/tft/controls/button.c +++ b/drivers/displays/tft/controls/button.c @@ -59,9 +59,6 @@ /**************************************************************************/ void buttonRender(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t fontColor, char *text, theme_t theme) { - uint16_t brighter, darker; - uint16_t buttonEnd; - // Draw background gradient then outline drawGradient(x+2, y+2, x+width-2, y+height-2, theme.colorFill, theme.colorBorder); drawRoundedRectangle(x+1, y+1, x+width-1, y+height-1, theme.colorFill, 5, DRAW_CORNERS_ALL); diff --git a/drivers/displays/tft/hw/readme.txt b/drivers/displays/tft/hw/readme.txt index 9635fc6..f0fbc5a 100644 --- a/drivers/displays/tft/hw/readme.txt +++ b/drivers/displays/tft/hw/readme.txt @@ -2,6 +2,7 @@ HW-Specific TFT and RGB OLED Drivers ==================================== hx8340b - 176x220 16-bit display (Bit-banged SPI interface) +hx8347g - 240x320 16-bit display (8-bit interface) ILI9325 - 240x320 16-bit display (8-bit interface) ILI9328 - 240x320 16-bit display (8-bit interface) st7735 - 128x160 16-bit display (Bit-banged SPI interface) diff --git a/main.c b/main.c index bb2c280..80c0e8e 100644 --- a/main.c +++ b/main.c @@ -7,7 +7,7 @@ Software License Agreement (BSD License) - Copyright (c) 2012, microBuilder SARL + Copyright (c) 2011, microBuilder SARL All rights reserved. Redistribution and use in source and binary forms, with or without @@ -33,6 +33,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**************************************************************************/ +#include +#include +#include + #include "projectconfig.h" #include "sysinit.h" @@ -56,7 +60,7 @@ int main(void) uint32_t currentSecond, lastSecond; currentSecond = lastSecond = 0; - + while (1) { // Toggle LED once per second diff --git a/project/cmd_tbl.h b/project/cmd_tbl.h index 639503c..83d3880 100644 --- a/project/cmd_tbl.h +++ b/project/cmd_tbl.h @@ -159,7 +159,7 @@ cmd_t cmd_tbl[] = #endif #ifdef CFG_PWM - { "M", 0, 2, 0, cmd_pwm , "PWM Control" , "'M [] []'" }, + { "M", 2, 2, 0, cmd_pwm , "PWM Control" , "'M [] []'" }, #endif }; diff --git a/project/commands/cmd_pwm.c b/project/commands/cmd_pwm.c index 505470d..3d070d5 100644 --- a/project/commands/cmd_pwm.c +++ b/project/commands/cmd_pwm.c @@ -56,38 +56,29 @@ void cmd_pwm(uint8_t argc, char **argv) { int32_t frequencyTicks = 65535; int32_t dutyCycle = CFG_PWM_DEFAULT_DUTYCYCLE; - if(argc > 0) { - getNumber (argv[0], &dutyCycle); - if(dutyCycle < 1 || dutyCycle > 100) { - printf("Invalid duty cycle [1..65535]%s", CFG_PRINTF_NEWLINE); - return; - } - - if(argc > 1) { - getNumber (argv[1], &frequencyTicks); - if(frequencyTicks < 0 || frequencyTicks > 0xffff) { - printf("Invalid frequency [1..65535]%s", CFG_PRINTF_NEWLINE); - return; - } - } else { - frequencyTicks = 65535; - } - } else { - dutyCycle = CFG_PWM_DEFAULT_DUTYCYCLE; + getNumber (argv[0], &dutyCycle); + if(dutyCycle < 1 || dutyCycle > 100) + { + printf("Invalid duty cycle [1..65535]%s", CFG_PRINTF_NEWLINE); + return; } - if(! pwmStarted) { - printf("Initializing PWM%s", CFG_PRINTF_NEWLINE); - pwmInit(); + getNumber (argv[1], &frequencyTicks); + if(frequencyTicks < 0 || frequencyTicks > 0xffff) + { + printf("Invalid frequency [1..65535]%s", CFG_PRINTF_NEWLINE); + return; } - + printf("Setting frequency: %u ticks%s", (uint16_t) frequencyTicks, CFG_PRINTF_NEWLINE); pwmSetFrequencyInTicks(frequencyTicks); printf("Setting duty cycle: %u%%%s", (uint16_t) dutyCycle, CFG_PRINTF_NEWLINE); pwmSetDutyCycle(dutyCycle); - if(! pwmStarted) { - pwmStart(); - pwmStarted = 1; + if(! pwmStarted) + { + printf("Initializing PWM%s", CFG_PRINTF_NEWLINE); + pwmStart(); + pwmStarted = 1; } } #endif diff --git a/projectconfig.h b/projectconfig.h index 4bc4aec..d3743ce 100644 --- a/projectconfig.h +++ b/projectconfig.h @@ -196,12 +196,12 @@ LM75B 0x90 1001000x MCP24AA 0xA0 1010000x MCP4725 0xC0 1100000x *** - TEA5767 0xC0 1100000x *** + TEA5767 0xC0 1100000x *** TSL2561 0x72 0111001x TCS3414 0x72 0111001x PN532 0x48 0100100x SSD1306_I2C 0x78 0111100x // Assumes SA0 = GND - INA219 0xF0 10000000x // Assumes A0+A1 = GND + INA219 0xF0 10000000x // Assumes A0+A1 = GND [1] Alternative addresses may exists, but the addresses listed in this table are the values used in the code base