mirror of https://github.com/ARMmbed/mbed-os.git
Typedef OnboardCellularInterface to EasyCellularConnection
parent
c9c3f85311
commit
e53b93114e
|
|
@ -38,7 +38,6 @@ namespace mbed {
|
|||
|
||||
static events::EventQueue at_queue(8 * EVENTS_EVENT_SIZE);
|
||||
static CELLULAR_DEVICE cellularDevice(at_queue);
|
||||
static char device_info_buf[2048];
|
||||
|
||||
CellularConnectionFSM::CellularConnectionFSM() :
|
||||
_serial(0), _state(STATE_INIT), _next_state(_state), _status_callback(0), _network(0), _power(0), _sim(0), _queue(
|
||||
|
|
@ -160,6 +159,7 @@ bool CellularConnectionFSM::open_sim()
|
|||
void CellularConnectionFSM::device_ready()
|
||||
{
|
||||
CellularInformation *info = _cellularDevice->open_information(_serial);
|
||||
char device_info_buf[2048]; // may be up to 2048 according to 3GPP
|
||||
|
||||
if (info->get_manufacturer(device_info_buf, sizeof(device_info_buf)) == NSAPI_ERROR_OK) {
|
||||
tr_info("Cellular device manufacturer: %s", device_info_buf);
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ using namespace events;
|
|||
//#define MBED_TRACE_MAX_LEVEL TRACE_LEVEL_DEBUG
|
||||
#include "CellularLog.h"
|
||||
|
||||
// this is intentionally TRACE_LEVEL_INFO
|
||||
#if MBED_TRACE_MAX_LEVEL >= TRACE_LEVEL_INFO
|
||||
#if MBED_CONF_MBED_TRACE_ENABLE
|
||||
#define at_debug(format, ...) do { if (_debug_on) debug(format, ## __VA_ARGS__); } while (0)
|
||||
#else
|
||||
#define at_debug(...)
|
||||
|
|
@ -78,11 +77,7 @@ ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char
|
|||
_urc_matched(false),
|
||||
_error_found(false),
|
||||
_max_resp_length(MAX_RESP_LENGTH),
|
||||
#if MBED_TRACE_MAX_LEVEL == TRACE_LEVEL_DEBUG
|
||||
_debug_on(true),
|
||||
#else
|
||||
_debug_on(false),
|
||||
#endif
|
||||
_cmd_start(false)
|
||||
{
|
||||
//enable_debug(true);
|
||||
|
|
|
|||
|
|
@ -12,8 +12,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "OnboardCellularInterface.h"
|
||||
|
||||
#ifndef CELLULAR_DEVICE
|
||||
|
||||
#if MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE
|
||||
|
||||
#include "onboard_modem_api.h"
|
||||
|
|
@ -52,3 +55,5 @@ void OnboardCellularInterface::modem_power_down()
|
|||
::onboard_modem_power_down();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // CELLULAR_DEVICE
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@
|
|||
#ifndef ONBOARD_CELLULAR_INTERFACE_
|
||||
#define ONBOARD_CELLULAR_INTERFACE_
|
||||
|
||||
#if MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE
|
||||
#include "EasyCellularConnection.h"
|
||||
#ifdef CELLULAR_DEVICE
|
||||
typedef mbed::EasyCellularConnection OnboardCellularInterface;
|
||||
#elif MODEM_ON_BOARD && MODEM_ON_BOARD_UART && NSAPI_PPP_AVAILABLE
|
||||
|
||||
#include "UARTCellularInterface.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue