mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-07-16 03:04:21 +08:00
Rename CONFIG_NXCONSOLE* to CONFIG_NXTERM*
This commit is contained in:
parent
d78a62aaf0
commit
d4488e79ca
@ -87,7 +87,7 @@ Installing and Building the Unit Tests
|
|||||||
|
|
||||||
d) Special configuration requirements for the nxwm unit test:
|
d) Special configuration requirements for the nxwm unit test:
|
||||||
|
|
||||||
CONFIG_NXCONSOLE=y
|
CONFIG_NXTERM=y
|
||||||
CONFIG_NX_MULTIUSER=y
|
CONFIG_NX_MULTIUSER=y
|
||||||
|
|
||||||
e) Other .config file changes -- NSH configurations only.
|
e) Other .config file changes -- NSH configurations only.
|
||||||
|
@ -220,7 +220,7 @@ namespace NXWidgets
|
|||||||
* directed to the widgets within the window.
|
* directed to the widgets within the window.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
inline void redirectNxConsole(NXCONSOLE handle)
|
inline void redirectNxConsole(NXCONSOLE handle)
|
||||||
{
|
{
|
||||||
setNxConsole(handle);
|
setNxConsole(handle);
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/nx/nxglib.h>
|
#include <nuttx/nx/nxglib.h>
|
||||||
#include <nuttx/nx/nx.h>
|
#include <nuttx/nx/nx.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
# include <nuttx/nx/nxconsole.h>
|
# include <nuttx/nx/nxconsole.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ namespace NXWidgets
|
|||||||
private:
|
private:
|
||||||
CWidgetControl *m_widgetControl; /**< The widget control instance for this window */
|
CWidgetControl *m_widgetControl; /**< The widget control instance for this window */
|
||||||
struct nx_callback_s m_callbacks; /**< C-callable vtable of callback function pointers */
|
struct nx_callback_s m_callbacks; /**< C-callable vtable of callback function pointers */
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
NXCONSOLE m_nxconsole; /**< The NxConsole handle for redirection of keyboard input */
|
NXCONSOLE m_nxconsole; /**< The NxConsole handle for redirection of keyboard input */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ namespace NXWidgets
|
|||||||
* directed to the widgets within the window.
|
* directed to the widgets within the window.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
inline void setNxConsole(NXCONSOLE handle)
|
inline void setNxConsole(NXCONSOLE handle)
|
||||||
{
|
{
|
||||||
m_nxconsole = handle;
|
m_nxconsole = handle;
|
||||||
|
@ -241,7 +241,7 @@ namespace NXWidgets
|
|||||||
* directed to the widgets within the window.
|
* directed to the widgets within the window.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
inline void redirectNxConsole(NXCONSOLE handle)
|
inline void redirectNxConsole(NXCONSOLE handle)
|
||||||
{
|
{
|
||||||
setNxConsole(handle);
|
setNxConsole(handle);
|
||||||
|
@ -210,7 +210,7 @@ namespace NXWidgets
|
|||||||
* directed to the widgets within the window.
|
* directed to the widgets within the window.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
inline void redirectNxConsole(NXCONSOLE handle)
|
inline void redirectNxConsole(NXCONSOLE handle)
|
||||||
{
|
{
|
||||||
setNxConsole(handle);
|
setNxConsole(handle);
|
||||||
|
@ -214,7 +214,7 @@ namespace NXWidgets
|
|||||||
* directed to the widgets within the window.
|
* directed to the widgets within the window.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
inline void redirectNxConsole(NXCONSOLE handle)
|
inline void redirectNxConsole(NXCONSOLE handle)
|
||||||
{
|
{
|
||||||
setNxConsole(handle);
|
setNxConsole(handle);
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
# include <nuttx/nx/nxconsole.h>
|
# include <nuttx/nx/nxconsole.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ namespace NXWidgets
|
|||||||
* directed to the widgets within the window.
|
* directed to the widgets within the window.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
virtual void redirectNxConsole(NXCONSOLE handle) = 0;
|
virtual void redirectNxConsole(NXCONSOLE handle) = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -188,8 +188,8 @@
|
|||||||
* reducing the AND of these three conditions to a single condition.
|
* reducing the AND of these three conditions to a single condition.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(CONFIG_NX_KBD) || !defined(CONFIG_NXCONSOLE)
|
#if !defined(CONFIG_NX_KBD) || !defined(CONFIG_NXTERM)
|
||||||
# undef CONFIG_NXCONSOLE_NXKBDIN
|
# undef CONFIG_NXTERM_NXKBDIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* NX Server/Device Configuration *******************************************/
|
/* NX Server/Device Configuration *******************************************/
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
# include <nuttx/nx/nxconsole.h>
|
# include <nuttx/nx/nxconsole.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ CCallback::CCallback(CWidgetControl *widgetControl)
|
|||||||
|
|
||||||
// Keyboard input is initially direct to the widgets within the window
|
// Keyboard input is initially direct to the widgets within the window
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
m_nxconsole = (NXCONSOLE)0;
|
m_nxconsole = (NXCONSOLE)0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -209,7 +209,7 @@ void CCallback::newKeyboardEvent(NXHANDLE hwnd, uint8_t nCh,
|
|||||||
// (default) OR is NX keyboard input being re-directed to an NxConsole
|
// (default) OR is NX keyboard input being re-directed to an NxConsole
|
||||||
// driver?
|
// driver?
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
if (This->m_nxconsole)
|
if (This->m_nxconsole)
|
||||||
{
|
{
|
||||||
// Keyboard input is going to an NxConsole
|
// Keyboard input is going to an NxConsole
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
* CONFIG_HAVE_CXX : C++ support is required
|
* CONFIG_HAVE_CXX : C++ support is required
|
||||||
* CONFIG_NX : NX must enabled
|
* CONFIG_NX : NX must enabled
|
||||||
* CONFIG_NX_MULTIUSER=y : NX must be configured in multiuse mode
|
* CONFIG_NX_MULTIUSER=y : NX must be configured in multiuse mode
|
||||||
* CONFIG_NXCONSOLE=y : For NxConsole support
|
* CONFIG_NXTERM=y : For NxConsole support
|
||||||
* CONFIG_SCHED_ONEXIT : Support for on_exit()
|
* CONFIG_SCHED_ONEXIT : Support for on_exit()
|
||||||
*
|
*
|
||||||
* General settings:
|
* General settings:
|
||||||
@ -89,8 +89,8 @@
|
|||||||
* selected
|
* selected
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_NXWM_NXCONSOLE) && !defined(CONFIG_NXCONSOLE)
|
#if defined(CONFIG_NXWM_NXCONSOLE) && !defined(CONFIG_NXTERM)
|
||||||
# warning "NxConsole support may be needed (CONFIG_NXCONSOLE)"
|
# warning "NxConsole support may be needed (CONFIG_NXTERM)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -278,7 +278,7 @@ bool CNxConsole::run(void)
|
|||||||
// Re-direct NX keyboard input to the new NxConsole driver
|
// Re-direct NX keyboard input to the new NxConsole driver
|
||||||
|
|
||||||
DEBUGASSERT(g_nxconvars.nxcon != 0);
|
DEBUGASSERT(g_nxconvars.nxcon != 0);
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
window->redirectNxConsole(g_nxconvars.nxcon);
|
window->redirectNxConsole(g_nxconvars.nxcon);
|
||||||
#endif
|
#endif
|
||||||
// Save the handle to use in the stop method
|
// Save the handle to use in the stop method
|
||||||
@ -331,7 +331,7 @@ void CNxConsole::stop(void)
|
|||||||
{
|
{
|
||||||
// Re-store NX keyboard input routing
|
// Re-store NX keyboard input routing
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
NXWidgets::INxWindow *window = m_window->getWindow();
|
NXWidgets::INxWindow *window = m_window->getWindow();
|
||||||
window->redirectNxConsole((NXCONSOLE)0);
|
window->redirectNxConsole((NXCONSOLE)0);
|
||||||
#endif
|
#endif
|
||||||
@ -455,7 +455,7 @@ int CNxConsole::nxconsole(int argc, char *argv[])
|
|||||||
|
|
||||||
// Open the NxConsole driver
|
// Open the NxConsole driver
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
fd = open(devname, O_RDWR);
|
fd = open(devname, O_RDWR);
|
||||||
#else
|
#else
|
||||||
fd = open(devname, O_WRONLY);
|
fd = open(devname, O_WRONLY);
|
||||||
@ -474,19 +474,19 @@ int CNxConsole::nxconsole(int argc, char *argv[])
|
|||||||
(void)std::fflush(stdout);
|
(void)std::fflush(stdout);
|
||||||
(void)std::fflush(stderr);
|
(void)std::fflush(stderr);
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
(void)std::fclose(stdin);
|
(void)std::fclose(stdin);
|
||||||
#endif
|
#endif
|
||||||
(void)std::fclose(stdout);
|
(void)std::fclose(stdout);
|
||||||
(void)std::fclose(stderr);
|
(void)std::fclose(stderr);
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
(void)std::dup2(fd, 0);
|
(void)std::dup2(fd, 0);
|
||||||
#endif
|
#endif
|
||||||
(void)std::dup2(fd, 1);
|
(void)std::dup2(fd, 1);
|
||||||
(void)std::dup2(fd, 2);
|
(void)std::dup2(fd, 2);
|
||||||
|
|
||||||
#ifdef CONFIG_NXCONSOLE_NXKBDIN
|
#ifdef CONFIG_NXTERM_NXKBDIN
|
||||||
(void)std::fdopen(0, "r");
|
(void)std::fdopen(0, "r");
|
||||||
#endif
|
#endif
|
||||||
(void)std::fdopen(1, "w");
|
(void)std::fdopen(1, "w");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user