takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CellularDevice.cpp Source File

CellularDevice.cpp

00001 /*
00002  * Copyright (c) 2018, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #include "CellularDevice.h"
00019 #include "EventQueue.h"
00020 #include "CellularUtil.h"
00021 
00022 #ifdef CELLULAR_DEVICE
00023 #include CELLULAR_STRINGIFY(CELLULAR_DEVICE.h)
00024 #endif // CELLULAR_DEVICE
00025 
00026 namespace mbed {
00027 
00028 #ifdef CELLULAR_DEVICE
00029 MBED_WEAK CellularDevice *CellularDevice::get_default_instance()
00030 {
00031     static events::EventQueue event_queue(4 * EVENTS_EVENT_SIZE);
00032     static CELLULAR_DEVICE device(event_queue);
00033     return &device;
00034 }
00035 #else
00036 MBED_WEAK CellularDevice *CellularDevice::get_default_instance()
00037 {
00038     return NULL;
00039 }
00040 #endif // CELLULAR_DEVICE
00041 
00042 CellularDevice::CellularDevice() : _network_ref_count(0), _sms_ref_count(0), _power_ref_count(0), _sim_ref_count(0),
00043         _info_ref_count(0)
00044 {
00045 }
00046 
00047 events::EventQueue *CellularDevice::get_queue() const
00048 {
00049     return NULL;
00050 }
00051 
00052 }