From 6440c1f6e96bd05845519b32c7897533df75a8f3 Mon Sep 17 00:00:00 2001 From: "Kamal Mostafa, KA6MAL" Date: Sun, 27 Feb 2011 23:26:13 +0000 Subject: [PATCH] source warnings cleanup: rotorez_rot_reset wrapper for stop ... and moved "API local implementation" static declarations from .h into .c git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@3065 7ae35d74-ebe9-4afe-98af-79ac388436b8 --- rotorez/rotorez.c | 30 ++++++++++++++++++++++++++++-- rotorez/rotorez.h | 19 ------------------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/rotorez/rotorez.c b/rotorez/rotorez.c index 551461503..65e3d09fc 100644 --- a/rotorez/rotorez.c +++ b/rotorez/rotorez.c @@ -49,6 +49,27 @@ #include "rotorez.h" +/* + * API local implementation + * + */ + +static int rotorez_rot_init(ROT *rot); +static int rotorez_rot_cleanup(ROT *rot); + +static int rotorez_rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elevation); +static int rotorez_rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); +static int erc_rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); + +static int rotorez_rot_reset(ROT *rot, rot_reset_t reset); +static int rotorez_rot_stop(ROT *rot); +static int dcu1_rot_stop(ROT *rot); + +static int rotorez_rot_set_conf(ROT *rot, token_t token, const char *val); + +static const char *rotorez_rot_get_info(ROT *rot); + + /* * Private data structure */ @@ -213,7 +234,7 @@ const struct rot_caps dcu_rot_caps = { .rot_cleanup = rotorez_rot_cleanup, .set_position = rotorez_rot_set_position, .stop = dcu1_rot_stop, - .reset = rotorez_rot_stop, /* Not a typo! */ + .reset = rotorez_rot_reset, .get_info = rotorez_rot_get_info, }; @@ -258,7 +279,7 @@ const struct rot_caps erc_rot_caps = { .set_position = rotorez_rot_set_position, .get_position = erc_rot_get_position, .stop = dcu1_rot_stop, - .reset = rotorez_rot_stop, /* Not a typo! */ + .reset = rotorez_rot_reset, // .stop = rotorez_rot_stop, // .set_conf = rotorez_rot_set_conf, .get_info = rotorez_rot_get_info, @@ -542,6 +563,11 @@ static int rotorez_rot_stop(ROT *rot) { return RIG_OK; } +static int rotorez_rot_reset(ROT *rot, rot_reset_t reset) { + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + return rotorez_rot_stop(rot); +} /* * Stop rotation on DCU-1 diff --git a/rotorez/rotorez.h b/rotorez/rotorez.h index e369f6669..b109ce9fe 100644 --- a/rotorez/rotorez.h +++ b/rotorez/rotorez.h @@ -47,24 +47,5 @@ extern const struct rot_caps erc_rot_caps; #define TOK_OVRSHT TOKEN_BACKEND(3) #define TOK_UNSTICK TOKEN_BACKEND(4) -/* - * API local implementation - * - */ - -static int rotorez_rot_init(ROT *rot); -static int rotorez_rot_cleanup(ROT *rot); - -static int rotorez_rot_set_position(ROT *rot, azimuth_t azimuth, elevation_t elevation); -static int rotorez_rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); -static int erc_rot_get_position(ROT *rot, azimuth_t *azimuth, elevation_t *elevation); - -static int rotorez_rot_stop(ROT *rot); -static int dcu1_rot_stop(ROT *rot); - -static int rotorez_rot_set_conf(ROT *rot, token_t token, const char *val); - -static const char *rotorez_rot_get_info(ROT *rot); - #endif /* _ROT_ROTOREZ_H */