summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-12 10:53:29 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-12 10:53:29 -0600
commite7b8284f85e94b738dff37ae80f0874bb1c32b94 (patch)
treed622041fb0102ab6cf74a80d0688e70f51d86af6
parentc22f584912f0a49a1d25e4e040baa10419ce7a37 (diff)
downloadnuttx-e7b8284f85e94b738dff37ae80f0874bb1c32b94.tar.gz
nuttx-e7b8284f85e94b738dff37ae80f0874bb1c32b94.tar.bz2
nuttx-e7b8284f85e94b738dff37ae80f0874bb1c32b94.zip
Cosmetic update to comments
-rw-r--r--NxWidgets/nxwm/src/ccalibration.cxx4
-rw-r--r--NxWidgets/nxwm/src/ctouchscreen.cxx11
-rw-r--r--nuttx/configs/stm3240g-eval/README.txt8
-rw-r--r--nuttx/include/fixedmath.h56
4 files changed, 53 insertions, 26 deletions
diff --git a/NxWidgets/nxwm/src/ccalibration.cxx b/NxWidgets/nxwm/src/ccalibration.cxx
index 74be1fd09..2a65662ff 100644
--- a/NxWidgets/nxwm/src/ccalibration.cxx
+++ b/NxWidgets/nxwm/src/ccalibration.cxx
@@ -1010,7 +1010,7 @@ void CCalibration::stateMachine(void)
m_calibData[CALIB_LOWER_LEFT_INDEX].y = m_touchPos.y;
#endif
- // Clear the previous screen by re-drawing it using the backgro9und
+ // Clear the previous screen by re-drawing it using the background
// color. That is much faster than clearing the whole display
m_screenInfo.lineColor = CONFIG_NXWM_CALIBRATION_BACKGROUNDCOLOR;
@@ -1289,7 +1289,7 @@ CCalibrationFactory::CCalibrationFactory(CTaskbar *taskbar, CTouchscreen *touchs
IApplication *CCalibrationFactory::create(void)
{
// Call CTaskBar::openFullScreenWindow to create a full screen window for
- // the calibation application
+ // the calibration application
CFullScreenWindow *window = m_taskbar->openFullScreenWindow();
if (!window)
diff --git a/NxWidgets/nxwm/src/ctouchscreen.cxx b/NxWidgets/nxwm/src/ctouchscreen.cxx
index 545405b81..dc462727d 100644
--- a/NxWidgets/nxwm/src/ctouchscreen.cxx
+++ b/NxWidgets/nxwm/src/ctouchscreen.cxx
@@ -228,7 +228,7 @@ void CTouchscreen::setCalibrationData(const struct SCalibrationData &caldata)
* This function is not re-entrant: There may be only one thread waiting for
* raw touchscreen data.
*
- * @return True if the raw touchscreen data was sucessfully obtained
+ * @return True if the raw touchscreen data was successfully obtained
*/
bool CTouchscreen::waitRawTouchData(struct touch_sample_s *touch)
@@ -265,7 +265,7 @@ bool CTouchscreen::waitRawTouchData(struct touch_sample_s *touch)
/**
* The touchscreen listener thread. This is the entry point of a thread that
- * listeners for and dispatches touchscreens events to the NX server.
+ * listeners for and dispatches touchscreen events to the NX server.
*
* @param arg. The CTouchscreen 'this' pointer cast to a void*.
* @return This function normally does not return but may return NULL on
@@ -320,7 +320,7 @@ FAR void *CTouchscreen::listener(FAR void *arg)
// 3. Normal operation, reading touchscreen data and forwarding it to NX
// Check if we need to collect touchscreen data. That is, that we are enabled,
- // AND have calibratation data OR if we need to collect data for the calbration
+ // AND have calibration data OR if we need to collect data for the calibration
// process.
while ((!This->m_enabled || !This->m_calibrated) && !This->m_capture)
@@ -431,7 +431,7 @@ void CTouchscreen::handleMouseInput(struct touch_sample_s *sample)
DEBUGASSERT(sample == &m_sample);
- // Check if normal processing of touchscreen data is enaable. Check if
+ // Check if normal processing of touchscreen data is enabled. Check if
// we have been given calibration data.
if (!m_enabled || !m_calibrated)
@@ -443,7 +443,7 @@ void CTouchscreen::handleMouseInput(struct touch_sample_s *sample)
}
// Now we will inject the touchscreen into NX as mouse input. First
- // massage the data a litle so that it behaves a little more like a
+ // massage the data a little so that it behaves a little more like a
// mouse with only a left button
//
// Was the button up or down?
@@ -592,4 +592,3 @@ void CTouchscreen::handleMouseInput(struct touch_sample_s *sample)
NXHANDLE handle = m_server->getServer();
(void)nx_mousein(handle, x, y, buttons);
}
-
diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt
index b7e7bf94a..00a469aae 100644
--- a/nuttx/configs/stm3240g-eval/README.txt
+++ b/nuttx/configs/stm3240g-eval/README.txt
@@ -1067,6 +1067,14 @@ Where <subdir> is one of the following:
you do this a lot, you will probably want to invest a little time
to develop a tool to automate these steps.
+ STATUS:
+ 2014-10-11: This worked at one time, but today I am getting a
+ failure inside of the GCC library. This occurred with the
+ computations at the end of touchscreen calibration. The
+ NuttX code seems to be working correctly, but there is some
+ problem with how the GCC integer math is hooked in??? I did
+ not dig into this very deeply.
+
nettest:
-------
diff --git a/nuttx/include/fixedmath.h b/nuttx/include/fixedmath.h
index 69bb8394a..e1a778650 100644
--- a/nuttx/include/fixedmath.h
+++ b/nuttx/include/fixedmath.h
@@ -99,7 +99,7 @@
#define b32MIN 0x8000000000000000 /* Min value of b16_t */
#define ub32MIN 0x0000000000000000 /* Min value of ub16_t */
-/* Conversions between b16 and b8 *****************************************/
+/* Conversions between b32, b16, and b8 ***********************************/
#define b8tob16(b) (((b16_t)(b)) << 8)
#define ub8toub16(b) (((ub16_t)(b)) << 8)
@@ -173,12 +173,20 @@
#define b16idiv(i,j) (((i)<<16)/j) /* Division of integer, b16 result */
#ifdef CONFIG_HAVE_LONG_LONG
-# define b16mulb16(a,b) b32tob16((b32_t)(a)*(b32_t)(b)) /* Muliplication */
-# define ub16mulub16(a,b) ub32toub16((ub32_t)(a)*(ub32_t)(b)
-# define b16sqr(a) b16mulb16(a,a) /* Square */
-# define ub16sqr(a) ub16mulub16(a,a) /* Square */
-# define b16divb16(a,b) b16tob32(a)/(b32_t)(b) /* Division */
-# define ub16divub16(a,b) ub16toub32(a)/(ub32_t)(b)
+/* Multiplication operators */
+
+# define b16mulb16(a,b) b32tob16((b32_t)(a)*(b32_t)(b))
+# define ub16mulub16(a,b) ub32toub16((ub32_t)(a)*(ub32_t)(b))
+
+/* Square operators */
+
+# define b16sqr(a) b16mulb16(a,a)
+# define ub16sqr(a) ub16mulub16(a,a)
+
+/* Division operators */
+
+# define b16divb16(a,b) b32tob16(b16tob32(a)/(b32_t)(b))
+# define ub16divub16(a,b) ub32toub16(ub16toub32(a)/(ub32_t)(b))
#endif
/**************************************************************************
@@ -195,32 +203,44 @@ typedef uint64_t ub32_t;
#endif
/**************************************************************************
- * Global Functions
+ * Public Functions
**************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
-extern "C" {
+extern "C"
+{
#else
#define EXTERN extern
#endif
#ifndef CONFIG_HAVE_LONG_LONG
-EXTERN b16_t b16mulb16(b16_t m1, b16_t m2);
-EXTERN ub16_t ub16mulub16(ub16_t m1, ub16_t m2);
-EXTERN b16_t b16sqr(b16_t a);
-EXTERN ub16_t ub16sqr(ub16_t a);
-EXTERN b16_t b16divb16(b16_t num, b16_t denom);
-EXTERN ub16_t ub16divub16(ub16_t num, ub16_t denom);
+/* Multiplication operators */
+
+b16_t b16mulb16(b16_t m1, b16_t m2);
+ub16_t ub16mulub16(ub16_t m1, ub16_t m2);
+
+/* Square operators */
+
+b16_t b16sqr(b16_t a);
+ub16_t ub16sqr(ub16_t a);
+
+/* Division operators */
+
+b16_t b16divb16(b16_t num, b16_t denom);
+ub16_t ub16divub16(ub16_t num, ub16_t denom);
#endif
-EXTERN b16_t b16sin(b16_t rad);
-EXTERN b16_t b16cos(b16_t rad);
-EXTERN b16_t b16atan2(b16_t y, b16_t x);
+/* Trigonometric Functions */
+
+b16_t b16sin(b16_t rad);
+b16_t b16cos(b16_t rad);
+b16_t b16atan2(b16_t y, b16_t x);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
+
#endif /* __INCLUDE_FIXEDMATH_H */