diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-02-08 16:27:58 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2022-03-28 20:50:41 +0200 |
commit | f4a31779e42cf93a58c316756670c78a3ea8322b (patch) | |
tree | e0d5c10b278292ea000e05afe7cc90f31de2e225 | |
parent | 106f844167942b303913edd4fe69d8ed3f708fd7 (diff) | |
download | hardware_replicant_libsamsung-ipc-f4a31779e42cf93a58c316756670c78a3ea8322b.tar.gz hardware_replicant_libsamsung-ipc-f4a31779e42cf93a58c316756670c78a3ea8322b.tar.bz2 hardware_replicant_libsamsung-ipc-f4a31779e42cf93a58c316756670c78a3ea8322b.zip |
tools: ipc-modem: move definitions in ipc-modem.h
This enables to add more definitions later and to also add functions
prototypes there.
This change contains no functional changes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | tools/ipc-modem.c | 18 | ||||
-rw-r--r-- | tools/ipc-modem.h | 42 |
2 files changed, 43 insertions, 17 deletions
diff --git a/tools/ipc-modem.c b/tools/ipc-modem.c index 1fbc778..ae410e6 100644 --- a/tools/ipc-modem.c +++ b/tools/ipc-modem.c @@ -37,9 +37,7 @@ #include <samsung-ipc.h> -#define MODEM_STATE_LPM 0 -#define MODEM_STATE_NORMAL 2 -#define MODEM_STATE_SIM_OK 4 +#include "ipc-modem.h" int state = MODEM_STATE_LPM; int seq; @@ -50,20 +48,6 @@ int call_done; char call_number[14]; char sim_pin[8]; -enum command { - CMD_NONE, - CMD_START, - CMD_BOOT, - CMD_POWER_ON, - CMD_POWER_OFF, -}; - -struct cmdline_opts { - enum command command; - bool debug; - bool dry_run; -}; - int seq_get(void) { if (seq == 0xff) diff --git a/tools/ipc-modem.h b/tools/ipc-modem.h new file mode 100644 index 0000000..6d54375 --- /dev/null +++ b/tools/ipc-modem.h @@ -0,0 +1,42 @@ +/* + * This file is part of libsamsung-ipc. + * + * Copyright (C) 2011 Simon Busch <morphis@gravedo.de> + * Copyright (C) 2011 Paul Kocialkowsk <contact@paulk.fr> + * Copyright (C) 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> + * + * libsamsung-ipc is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * libsamsung-ipc is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with libsamsung-ipc. If not, see <http://www.gnu.org/licenses/>. + */ +#ifndef IPC_MODEM_H +#define IPC_MODEM_H + +#define MODEM_STATE_LPM 0 +#define MODEM_STATE_NORMAL 2 +#define MODEM_STATE_SIM_OK 4 + +enum command { + CMD_NONE, + CMD_START, + CMD_BOOT, + CMD_POWER_ON, + CMD_POWER_OFF, +}; + +struct cmdline_opts { + enum command command; + bool debug; + bool dry_run; +}; + +#endif /* IPC_MODEM */ |