diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 80d889b3b5..adb52afce7 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3417,4 +3417,6 @@ not an ILI93xx. * configs/shenzhou/src/up_ssd1289.c: The LCD is basically functional on the Shenzhou board. + * graphics/nxmu: Correct some bad parameter checking that caused + failures when DEBUG was enabled. diff --git a/nuttx/Kconfig b/nuttx/Kconfig index f4f6abe7e0..0fe6eb0f7c 100644 --- a/nuttx/Kconfig +++ b/nuttx/Kconfig @@ -230,7 +230,11 @@ config DEBUG_VERBOSE bool "Enable Debug Verbose Output" default n ---help--- - Enables verbose debug output (assuming debug output is enabled) + Enables verbose debug output (assuming debug output is enabled). As a + general rule, when DEBUG is enabled only errors will be reported in the debug + output. But if you also enable DEBUG_VERBOSE, then very chatty (and + often annoying) output will be generated. This means there are two levels + of debug output: errors-only and everything. config DEBUG_ENABLE bool "Enable Debug Controls" diff --git a/nuttx/drivers/input/ads7843e.c b/nuttx/drivers/input/ads7843e.c index 555ce34806..07e5e515df 100644 --- a/nuttx/drivers/input/ads7843e.c +++ b/nuttx/drivers/input/ads7843e.c @@ -572,7 +572,7 @@ static void ads7843e_worker(FAR void *arg) /* Check for pen up or down by reading the PENIRQ GPIO. */ pendown = config->pendown(config); -dbg("pendown: %d\n", pendown); // REMOVE ME + /* Handle the change from pen down to pen up */ if (!pendown) @@ -643,7 +643,6 @@ dbg("pendown: %d\n", pendown); // REMOVE ME /* Exit, re-enabling ADS7843E interrupts */ errout: -dbg("Exiting\n"); // REMOVE ME (void)ads7843e_sendcmd(priv, ADS7843_CMD_ENABPINIRQ); config->enable(config, true); } diff --git a/nuttx/graphics/nxmu/nx_block.c b/nuttx/graphics/nxmu/nx_block.c index 2f069f0962..3a051f9d7d 100644 --- a/nuttx/graphics/nxmu/nx_block.c +++ b/nuttx/graphics/nxmu/nx_block.c @@ -111,8 +111,8 @@ int nx_block(NXWINDOW hwnd, FAR void *arg) #ifdef CONFIG_DEBUG if (!hwnd) { - errno = EINVAL; - return NULL; + set_errno(EINVAL); + return ERROR; } #endif diff --git a/nuttx/graphics/nxmu/nxmu_sendclient.c b/nuttx/graphics/nxmu/nxmu_sendclient.c index 8b7f121042..a59fa23634 100644 --- a/nuttx/graphics/nxmu/nxmu_sendclient.c +++ b/nuttx/graphics/nxmu/nxmu_sendclient.c @@ -93,9 +93,9 @@ int nxmu_sendclient(FAR struct nxfe_conn_s *conn, FAR const void *msg, /* Sanity checking */ #ifdef CONFIG_DEBUG - if (!conn || conn->swrmq) + if (!conn || !conn->swrmq) { - errno = EINVAL; + set_errno(EINVAL); return ERROR; } #endif diff --git a/nuttx/graphics/nxmu/nxmu_sendserver.c b/nuttx/graphics/nxmu/nxmu_sendserver.c index 7007b81da9..03ece4e7f7 100644 --- a/nuttx/graphics/nxmu/nxmu_sendserver.c +++ b/nuttx/graphics/nxmu/nxmu_sendserver.c @@ -93,9 +93,9 @@ int nxmu_sendserver(FAR struct nxfe_conn_s *conn, FAR const void *msg, /* Sanity checking */ #ifdef CONFIG_DEBUG - if (!conn || conn->cwrmq) + if (!conn || !conn->cwrmq) { - errno = EINVAL; + set_errno(EINVAL); return ERROR; } #endif