Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers STModCellular.h Source File

STModCellular.h

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 #ifndef STMOD_CELLULAR_H_
00019 #define STMOD_CELLULAR_H_
00020 
00021 #include "QUECTEL_UG96.h"
00022 #include "QUECTEL_BG96.h"
00023 #include "DigitalOut.h"
00024 #include "DigitalIn.h"
00025 
00026 /* List of supported STMOD+ cellular expansion boards */
00027 #define STMOD_BG96 0
00028 #define STMOD_UG96 1
00029 
00030 
00031 #if (MBED_CONF_STMOD_CELLULAR_TYPE == STMOD_BG96)
00032 #define STMOD_CELLULAR_MODEM QUECTEL_BG96
00033 #endif
00034 
00035 #if (MBED_CONF_STMOD_CELLULAR_TYPE == STMOD_UG96)
00036 #define STMOD_CELLULAR_MODEM QUECTEL_UG96
00037 #endif
00038 
00039 namespace mbed {
00040 
00041 class STModCellular : public STMOD_CELLULAR_MODEM {
00042 private:
00043     DigitalOut m_powerkey;
00044     DigitalOut m_reset;
00045     DigitalOut m_simsel0;
00046     DigitalOut m_simsel1;
00047     DigitalOut m_mdmdtr;
00048     DigitalIn m_sim_reset;
00049     DigitalIn m_sim_clk;
00050     DigitalIn m_sim_data;
00051 public:
00052     STModCellular(FileHandle *fh);
00053     virtual nsapi_error_t soft_power_on();
00054     virtual nsapi_error_t soft_power_off();
00055     virtual ~STModCellular();
00056 };
00057 
00058 } // namespace mbed
00059 #endif // STMOD_CELLULAR_H_