SIM: Fix some bad naming changes associated with the simulated touchscreen.

This commit is contained in:
Gregory Nutt 2017-04-20 07:50:55 -06:00
parent e57fa0ef7e
commit 547f6c7cc3
3 changed files with 22 additions and 17 deletions

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/sim/src/up_internal.h * arch/sim/src/up_internal.h
* *
* Copyright (C) 2007, 2009, 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2009, 2011-2012, 2014, 2016-2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -230,7 +230,7 @@ void up_longjmp(xcpt_reg_t *jb, int val) noreturn_function;
/* up_simsmp.c ************************************************************/ /* up_simsmp.c ************************************************************/
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
int sim_cpu0_initialize(void); int sim_cpu0_initialize(void);
void sim_cpu0_start(void); void sim_cpu0_start(void);
#endif #endif
@ -261,8 +261,8 @@ void up_registerblockdevice(void);
/* up_simuart.c ***********************************************************/ /* up_simuart.c ***********************************************************/
void simuart_start(void); void simuart_start(void);
int simuart_putc(int ch); int simuart_putc(int ch);
int simuart_getc(void); int simuart_getc(void);
bool simuart_checkc(void); bool simuart_checkc(void);
void simuart_terminate(void); void simuart_terminate(void);
@ -295,6 +295,11 @@ int up_x11cmap(unsigned short first, unsigned short len,
#endif #endif
#endif #endif
/* up_touchscreen.c *******************************************************/
int sim_tsc_initialize(int minor);
void sim_tsc_uninitialize(void);
/* up_eventloop.c *********************************************************/ /* up_eventloop.c *********************************************************/
#if defined(CONFIG_SIM_X11FB) && \ #if defined(CONFIG_SIM_X11FB) && \

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/sim/src/up_touchscreen.c * arch/sim/src/up_touchscreen.c
* *
* Copyright (C) 2011-2012, 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2012, 2016-2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -624,11 +624,7 @@ errout:
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Name: sim_tsc_initialize
****************************************************************************/
/****************************************************************************
* Name: board_tsc_setup
* *
* Description: * Description:
* Configure the simulated touchscreen. This will register the driver as * Configure the simulated touchscreen. This will register the driver as
@ -643,7 +639,7 @@ errout:
* *
****************************************************************************/ ****************************************************************************/
int board_tsc_setup(int minor) int sim_tsc_initialize(int minor)
{ {
FAR struct up_dev_s *priv = (FAR struct up_dev_s *)&g_simtouchscreen; FAR struct up_dev_s *priv = (FAR struct up_dev_s *)&g_simtouchscreen;
char devname[DEV_NAMELEN]; char devname[DEV_NAMELEN];
@ -699,7 +695,7 @@ errout_with_priv:
} }
/**************************************************************************** /****************************************************************************
* Name: board_tsc_teardown * Name: sim_tsc_uninitialize
* *
* Description: * Description:
* Uninitialized the simulated touchscreen * Uninitialized the simulated touchscreen
@ -712,7 +708,7 @@ errout_with_priv:
* *
****************************************************************************/ ****************************************************************************/
void board_tsc_teardown(void) void sim_tsc_uninitialize(void)
{ {
FAR struct up_dev_s *priv = (FAR struct up_dev_s *)&g_simtouchscreen; FAR struct up_dev_s *priv = (FAR struct up_dev_s *)&g_simtouchscreen;
char devname[DEV_NAMELEN]; char devname[DEV_NAMELEN];

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* config/sim/src/sim_touchscreen.c * config/sim/src/sim_touchscreen.c
* *
* Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2011, 2016-2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -54,6 +54,8 @@
# include <nuttx/video/vnc.h> # include <nuttx/video/vnc.h>
#endif #endif
#include "up_internal.h"
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
@ -159,17 +161,19 @@ int board_tsc_setup(int minor)
/* Finally, initialize the touchscreen simulation on the X window */ /* Finally, initialize the touchscreen simulation on the X window */
ret = board_tsc_setup(minor); ret = sim_tsc_initialize(minor);
if (ret < 0) if (ret < 0)
{ {
ierr("ERROR: board_tsc_setup failed: %d\n", ret); ierr("ERROR: sim_tsc_initialize failed: %d\n", ret);
goto errout_with_nx; goto errout_with_nx;
} }
return OK; return OK;
errout_with_nx: errout_with_nx:
nx_close(g_simtc.hnx); nx_close(g_simtc.hnx);
goto errout; goto errout;
errout_with_fb: errout_with_fb:
up_fbuninitialize(0); up_fbuninitialize(0);
errout: errout:
@ -190,7 +194,7 @@ void board_tsc_teardown(void)
{ {
/* Shut down the touchscreen driver */ /* Shut down the touchscreen driver */
sim_tcuninitialize(); sim_tsc_uninitialize();
/* Close NX */ /* Close NX */