Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GSM: do not check for __has_include in library main include#778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
facchinm merged 1 commit intoarduino:mainfrompennam:__has_include_fix
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionslibraries/GSM/src/GSM.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,7 @@
*/

#include "GSM.h"
#include "GSMDebug.h"

#include "mbed.h"
#include "CellularLog.h"
Expand Down
24 changes: 1 addition & 23 deletionslibraries/GSM/src/GSM.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,27 +63,6 @@
#endif
#endif

#if defined __has_include
#if __has_include ("Arduino_DebugUtils.h")
#include "Arduino_DebugUtils.h"
#define GSM_DEBUG_ENABLE 1
#else
#define DEBUG_ERROR(fmt, ...)
#define DEBUG_WARNING(fmt, ...)
#define DEBUG_INFO(fmt, ...)
#define DEBUG_DEBUG(fmt, ...)
#define DEBUG_VERBOSE(fmt, ...)
#define GSM_DEBUG_ENABLE 0
#endif
#else
#define DEBUG_ERROR(fmt, ...)
#define DEBUG_WARNING(fmt, ...)
#define DEBUG_INFO(fmt, ...)
#define DEBUG_DEBUG(fmt, ...)
#define DEBUG_VERBOSE(fmt, ...)
#define GSM_DEBUG_ENABLE 0
#endif

namespace arduino {

typedef void* (*voidPrtFuncPtr)(void);
Expand DownExpand Up@@ -159,7 +138,6 @@ class GSMClass : public MbedSocketClass {
*/
const uint16_t _retry_timeout[6] = {1, 2, 4, 8, 16, 32};

#if GSM_DEBUG_ENABLE
static constexpr int RSSI_UNKNOWN = 99;
static const char * const sim_state_str[];
static const char * const reg_type_str[];
Expand All@@ -172,7 +150,7 @@ class GSMClass : public MbedSocketClass {
static const char * getSIMStateString(const mbed::CellularDevice::SimState state);
static const char * getRegistrationStateString(const mbed::CellularNetwork::RegistrationStatus state);
void onStatusChange(nsapi_event_t ev, intptr_t in);
#endif

void reset();
bool isReady(const int timeout = 5000);
};
Expand Down
1 change: 1 addition & 0 deletionslibraries/GSM/src/GSMDebug.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,6 +18,7 @@
*/

#include <GSM.h>
#include <GSMDebug.h>

#if GSM_DEBUG_ENABLE

Expand Down
44 changes: 44 additions & 0 deletionslibraries/GSM/src/GSMDebug.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
/*
GSMDebug.h
Copyright (c) 2021 Arduino SA. All right reserved.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library 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
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef GSMDEBUG_H
#define GSMDEBUG_H

#if defined __has_include
#if __has_include ("Arduino_DebugUtils.h")
#include "Arduino_DebugUtils.h"
#define GSM_DEBUG_ENABLE 1
#else
#define DEBUG_ERROR(fmt, ...)
#define DEBUG_WARNING(fmt, ...)
#define DEBUG_INFO(fmt, ...)
#define DEBUG_DEBUG(fmt, ...)
#define DEBUG_VERBOSE(fmt, ...)
#define GSM_DEBUG_ENABLE 0
#endif
#else
#define DEBUG_ERROR(fmt, ...)
#define DEBUG_WARNING(fmt, ...)
#define DEBUG_INFO(fmt, ...)
#define DEBUG_DEBUG(fmt, ...)
#define DEBUG_VERBOSE(fmt, ...)
#define GSM_DEBUG_ENABLE 0
#endif

#endif /* GSMDEBUG_H*/

[8]ページ先頭

©2009-2025 Movatter.jp