From 547f6c7cc3575c367536e9c7e7dc9fc5d7cbebe1 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 20 Apr 2017 07:50:55 -0600 Subject: [PATCH] SIM: Fix some bad naming changes associated with the simulated touchscreen. --- arch/sim/src/up_internal.h | 13 +++++++++---- arch/sim/src/up_touchscreen.c | 14 +++++--------- configs/sim/src/sim_touchscreen.c | 12 ++++++++---- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index 7ca32a479e..9b26f11041 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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 ************************************************************/ #ifdef CONFIG_SMP -int sim_cpu0_initialize(void); +int sim_cpu0_initialize(void); void sim_cpu0_start(void); #endif @@ -261,8 +261,8 @@ void up_registerblockdevice(void); /* up_simuart.c ***********************************************************/ void simuart_start(void); -int simuart_putc(int ch); -int simuart_getc(void); +int simuart_putc(int ch); +int simuart_getc(void); bool simuart_checkc(void); void simuart_terminate(void); @@ -295,6 +295,11 @@ int up_x11cmap(unsigned short first, unsigned short len, #endif #endif +/* up_touchscreen.c *******************************************************/ + +int sim_tsc_initialize(int minor); +void sim_tsc_uninitialize(void); + /* up_eventloop.c *********************************************************/ #if defined(CONFIG_SIM_X11FB) && \ diff --git a/arch/sim/src/up_touchscreen.c b/arch/sim/src/up_touchscreen.c index 4c327bb683..b8b864c89b 100644 --- a/arch/sim/src/up_touchscreen.c +++ b/arch/sim/src/up_touchscreen.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -624,11 +624,7 @@ errout: ****************************************************************************/ /**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_tsc_setup + * Name: sim_tsc_initialize * * Description: * 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; char devname[DEV_NAMELEN]; @@ -699,7 +695,7 @@ errout_with_priv: } /**************************************************************************** - * Name: board_tsc_teardown + * Name: sim_tsc_uninitialize * * Description: * 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; char devname[DEV_NAMELEN]; diff --git a/configs/sim/src/sim_touchscreen.c b/configs/sim/src/sim_touchscreen.c index c81c88325e..54a9921606 100644 --- a/configs/sim/src/sim_touchscreen.c +++ b/configs/sim/src/sim_touchscreen.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -54,6 +54,8 @@ # include #endif +#include "up_internal.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -159,17 +161,19 @@ int board_tsc_setup(int minor) /* Finally, initialize the touchscreen simulation on the X window */ - ret = board_tsc_setup(minor); + ret = sim_tsc_initialize(minor); 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; } + return OK; errout_with_nx: nx_close(g_simtc.hnx); goto errout; + errout_with_fb: up_fbuninitialize(0); errout: @@ -190,7 +194,7 @@ void board_tsc_teardown(void) { /* Shut down the touchscreen driver */ - sim_tcuninitialize(); + sim_tsc_uninitialize(); /* Close NX */