Skip to content

Commit

Permalink
Merged upstream NuttX
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed Jun 5, 2013
2 parents bf40bc8 + 44af858 commit 2a98c0f
Show file tree
Hide file tree
Showing 63 changed files with 6,869 additions and 714 deletions.
52 changes: 31 additions & 21 deletions NxWidgets/ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,25 +347,35 @@

1.8 2013-xx-xx Gregory Nutt <[email protected]>

* NxWM::CMediaPlayer: shell application for an MP3 Media Player with
Kconfig settings to enable it. I plan to write this app to help
develop and test the MP3 codec chip driver. It really doesn't do
anything yet except display a text box saying "Coming soon", and I
need to minimize the icon size a bit. From Ken Pettit (2013-5-11).
* NxWidgets/nxwm/src/glyph_mediaplayer.cxx: Smaller version of the
media player glyph. From Ken Pettit (2013-5-12).
* NxWidgets/nxwm/include/ccalibration.hxx and src/ccalibration.cxx:
Fix a race condition that would cause the calibration screen
to fail to come up when its icon was touched (From Ken Pettit,
2013-5-12).
* Kconfig: Default priorities for NxWidget and NxWM threads
should be 100, not 50, to be consistent with other default priorities.
* NxWidgets::CGlyphSliderHorizontal and NxWidgets::CGlyphSliderHorizontalGrip:
New widgets added by Ken Pettit (2013-5-15).
* NxWidgets/UnitTests/CGlyphSliderHorizontal: Addes a unit test for the
NxWidgets::CGlyphSliderHorizontal class. From Ken Pettit (2013-5-17) .
* NxWidgets::CGlyphSliderHorizontal: Fix a drawing error. From Ken
Pettit (2013-5-17).
* UnitTests/*/Makefile and .gitignore: Update the way that NSH
the Unit Tests are registered as built-in NSH applications (2013-5-30).
* NxWM::CMediaPlayer: shell application for an MP3 Media Player with
Kconfig settings to enable it. I plan to write this app to help
develop and test the MP3 codec chip driver. It really doesn't do
anything yet except display a text box saying "Coming soon", and I
need to minimize the icon size a bit. From Ken Pettit (2013-5-11).
* NxWidgets/nxwm/src/glyph_mediaplayer.cxx: Smaller version of the
media player glyph. From Ken Pettit (2013-5-12).
* NxWidgets/nxwm/include/ccalibration.hxx and src/ccalibration.cxx:
Fix a race condition that would cause the calibration screen
to fail to come up when its icon was touched (From Ken Pettit,
2013-5-12).
* Kconfig: Default priorities for NxWidget and NxWM threads
should be 100, not 50, to be consistent with other default priorities.
* NxWidgets::CGlyphSliderHorizontal and NxWidgets::CGlyphSliderHorizontalGrip:
New widgets added by Ken Pettit (2013-5-15).
* NxWidgets/UnitTests/CGlyphSliderHorizontal: Addes a unit test for the
NxWidgets::CGlyphSliderHorizontal class. From Ken Pettit (2013-5-17) .
* NxWidgets::CGlyphSliderHorizontal: Fix a drawing error. From Ken
Pettit (2013-5-17).
* UnitTests/*/Makefile and .gitignore: Update the way that NSH
the Unit Tests are registered as built-in NSH applications (2013-5-30).
* NxWidgets::CImage: Allow a NULL pointer for a bitmap. Add protection
to prevent dereferencing the NULL pointer. From Petteri Aimonen
(2013-6-4).
* NxWidgets::CNumericEdit: Delay before auto-incrementing now varies:
A longer delay is required to start auto-incrementing and speed increases
while pressed. From Petteri Aimonen (2013-6-4).
* NxWM::CTaskbar: Add a method to redraw the taskbar and the current
application. This should only be necessary if the display loses
state due to e.g. powerdown or other manual intervention. From
Petteri Aimonen (2013-6-4).

34 changes: 22 additions & 12 deletions NxWidgets/libnxwidgets/src/cimage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,29 @@ CImage::CImage(CWidgetControl *pWidgetControl, nxgl_coord_t x, nxgl_coord_t y,

void CImage::getPreferredDimensions(CRect &rect) const
{
nxgl_coord_t width = m_bitmap->getWidth();
nxgl_coord_t height = m_bitmap->getHeight();

if (!m_flags.borderless)
if (!m_bitmap)
{
width += (m_borderSize.left + m_borderSize.right);
height += (m_borderSize.top + m_borderSize.bottom);
rect.setX(m_rect.getX());
rect.setY(m_rect.getY());
rect.setWidth(0);
rect.setHeight(0);
}
else
{
nxgl_coord_t width = m_bitmap->getWidth();
nxgl_coord_t height = m_bitmap->getHeight();

rect.setX(m_rect.getX());
rect.setY(m_rect.getY());
rect.setWidth(width);
rect.setHeight(height);
if (!m_flags.borderless)
{
width += (m_borderSize.left + m_borderSize.right);
height += (m_borderSize.top + m_borderSize.bottom);
}

rect.setX(m_rect.getX());
rect.setY(m_rect.getY());
rect.setWidth(width);
rect.setHeight(height);
}
}

/**
Expand Down Expand Up @@ -440,7 +450,7 @@ void CImage::onReleaseOutside(nxgl_coord_t x, nxgl_coord_t y)

void CImage::setImageLeft(nxgl_coord_t column)
{
if (column > 0 && column <= m_bitmap->getWidth())
if (m_bitmap && column > 0 && column <= m_bitmap->getWidth())
{
m_origin.x = column;
}
Expand All @@ -455,7 +465,7 @@ void CImage::setImageLeft(nxgl_coord_t column)

void CImage::setImageTop(nxgl_coord_t row)
{
if (row > 0 && row <= m_bitmap->getHeight())
if (m_bitmap && row > 0 && row <= m_bitmap->getHeight())
{
m_origin.x = row;
}
Expand Down
14 changes: 11 additions & 3 deletions NxWidgets/libnxwidgets/src/cnumericedit.cxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* NxWidgets/libnxwidgets/include/cnumericedit.cxx
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <[email protected]>
* Petteri Aimonen <[email protected]>
*
Expand Down Expand Up @@ -216,15 +216,23 @@ void CNumericEdit::handleActionEvent(const CWidgetEventArgs &e)
{
m_timercount++;

int increment = m_increment;
// Increment the value at increasing speed.
// Ignore the first 3 timer ticks so that single clicks
// only increment by one.

int increment = 0;
if (m_timercount > 50)
{
increment = m_increment * 100;
}
else if (m_timercount > 10)
else if (m_timercount > 20)
{
increment = m_increment * 10;
}
else if (m_timercount > 3)
{
increment = m_increment;
}

if (m_button_minus->isClicked())
{
Expand Down
24 changes: 16 additions & 8 deletions NxWidgets/nxwm/include/ctaskbar.hxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* NxWidgets/nxwm/include/cnxtaskbar.hxx
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -89,7 +89,7 @@ namespace NxWM
/**
* This structure represents an application and its associated icon image
*/

struct STaskbarSlot
{
IApplication *app; /**< A reference to the icon */
Expand All @@ -108,7 +108,7 @@ namespace NxWM
bool m_started; /**< True if window manager has been started */

/**
* Create a raw window.
* Create a raw window.
*
* 1) Create a dumb NXWidgets::CWidgetControl instance (See not).
* 2) Pass the dumb NXWidgets::CWindowMessenger instance to the window constructor
Expand All @@ -134,7 +134,7 @@ namespace NxWM
*
* @return A partially initialized application window instance.
*/

NXWidgets::CNxTkWindow *openFramedWindow(void);

/**
Expand All @@ -155,15 +155,15 @@ namespace NxWM
virtual bool createTaskbarWindow(void);

/**
* Create the background window.
* Create the background window.
*
* @return true on success
*/

virtual bool createBackgroundWindow(void);

/**
* Create the background image.
* Create the background image.
*
* @return true on success
*/
Expand Down Expand Up @@ -247,7 +247,7 @@ namespace NxWM
/**
* Connect to the server
*/

bool connect(void);

/**
Expand Down Expand Up @@ -409,7 +409,15 @@ namespace NxWM
*/

void getDisplaySize(FAR struct nxgl_size_s &size);


/**
* Force a redraw of the taskbar and current application.
* This should only be necessary if the display loses state due to e.g. powerdown
* or other manual intervention.
*/

inline void redraw() { redrawTopApplication(); }

/**
* Simulate a mouse click or release on the icon at index. This method
* is only available during automated testing of NxWM.
Expand Down
29 changes: 29 additions & 0 deletions nuttx/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -4868,3 +4868,32 @@
the SAM4L (2013-6-2).
* libc/stdio/lib_dprintd.c and lib_vdprintf.c: Add dprintf() and
vdprintf() (the latter from Andrew Tridgell, 2013-6-2).
* sched/sem_holder.c: Modify assertion that is reported to cause
false alarm assertions (2013-6-2).
* arch/arm/include/sam34/sam4l_irq.h and
arch/arm/src/sam34/chip/sam4l_memorymap.h: Add interrupt and memory
map definitions for the AT91SAM4L (2013-6-3).
* arch/arm/src/sam34/chip/sam4l_vectors.h and arm/src/sam34/sam_vectors.S:
Add interrupt vector support for the SAM4L family (2013-6-3).
* arch/include/sam34/chip.h: Add chip definitions for the SAM4L
family (2013-6-3).
* configs/sam4l-xplained: A partial configuration that will (eventually)
support the SAM4L Xplained Pro developement board (2013-6-3).
* arch/arm/src/sam34/chip/sam4l_pinmap.h: Initial cut as SAM4L
pin mapping (2013-6-3).
* arch/arm/src/stm32/stm32*_dma.*: Add a new interface function,
stm32_dmacapable() that can be used to determine if DMA is
possible from the specified memory address. From Petteri Aimonen
(2013-6-4).
* arch/arm/src/stm32/stm32_spi.c: If CONFIG_STM32_DMACAPABLE is
defined, use stm32_dmacapable() to determine if it is possible
to perform DMA from the specified address. This change is
important for the STM32 F4 which may have SPI data buffers
allocated on the stack in CCM memory which cannot support the
DMA. From Petteri Aimonen (2013-6-4).
* nuttx/arch/arm/src/sam34/sam4l_gpio.h: Created GPIO driver
header file for the SAM4L. Also renamed the SAM3U header
file to sam3u_gpio.h (2013-6-4).
* nuttx/arch/arm/src/sam34/sam4l_gpio.c: Created GPIO driver for
the SAM4L (2013-6-4).

2 changes: 2 additions & 0 deletions nuttx/Documentation/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ <h1><big><font color="#3c34ec"><i>NuttX README Files</i></font></big></h1>
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/rgmp/README.txt"><b><i>README.txt</i></b></a>></a>
| | |- sam3u-ek/
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/sam3u-ek/README.txt"><b><i>README.txt</i></b></a>
| | |- sam4l-xplained/
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/sam4l-xplained/README.txt"><b><i>README.txt</i></b></a>
| | |- shenzhou/
| | | `- <a href="http://sourceforge.net/p/nuttx/git/ci/master/tree/nuttx/configs/shenzhou/README.txt"><b><i>README.txt</i></b></a>
| | |- sim/
Expand Down
2 changes: 2 additions & 0 deletions nuttx/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,8 @@ nuttx
| | `- README.txt
| |- sam3u-ek/
| | `- README.txt
| |- sam4l-xplained/
| | `- README.txt
| |- sim/
| | |- include/README.txt
| | |- src/README.txt
Expand Down
8 changes: 7 additions & 1 deletion nuttx/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ config ARCH_CHIP_KINETIS
bool "Freescale Kinetis"
select ARCH_CORTEXM4
select ARCH_HAVE_MPU
select ARCH_HAVE_FPU
select ARCH_HAVE_RAMFUNCS
select ARCH_RAMFUNCS
---help---
Expand Down Expand Up @@ -100,6 +101,7 @@ config ARCH_CHIP_LPC43XX
select ARCH_HAVE_CMNVECTOR
select ARMV7M_CMNVECTOR
select ARCH_HAVE_MPU
select ARCH_HAVE_FPU
---help---
NPX LPC43XX architectures (ARM Cortex-M4).

Expand Down Expand Up @@ -205,10 +207,14 @@ config ARMV7M_CMNVECTOR
logic or the common vector logic. This applies only to ARMv7-M
architectures.

config ARCH_HAVE_FPU
bool
default n

config ARCH_FPU
bool "FPU support"
default y
depends on ARCH_CORTEXM4
depends on ARCH_HAVE_FPU
---help---
Build in support for the ARM Cortex-M4 Floating Point Unit (FPU).
Check your chip specifications first; not all Cortex-M4 chips support the FPU.
Expand Down
Loading

0 comments on commit 2a98c0f

Please sign in to comment.