Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
GPSProvider.cpp@3:47aaf0ebde35, 2014-11-04 (annotated)
- Committer:
- rgrover1
- Date:
- Tue Nov 04 11:31:49 2014 +0000
- Revision:
- 3:47aaf0ebde35
- Parent:
- 2:0893ad528287
- Child:
- 4:f35227b1f341
- Child:
- 8:47fa213225c3
improvements from Jie;; add support for ioctl()
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rgrover1 | 0:792e9343fd39 | 1 | /* mbed Microcontroller Library |
| rgrover1 | 0:792e9343fd39 | 2 | * Copyright (c) 2006-2014 ARM Limited |
| rgrover1 | 0:792e9343fd39 | 3 | * |
| rgrover1 | 0:792e9343fd39 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| rgrover1 | 0:792e9343fd39 | 5 | * you may not use this file except in compliance with the License. |
| rgrover1 | 0:792e9343fd39 | 6 | * You may obtain a copy of the License at |
| rgrover1 | 0:792e9343fd39 | 7 | * |
| rgrover1 | 0:792e9343fd39 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| rgrover1 | 0:792e9343fd39 | 9 | * |
| rgrover1 | 0:792e9343fd39 | 10 | * Unless required by applicable law or agreed to in writing, software |
| rgrover1 | 0:792e9343fd39 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| rgrover1 | 0:792e9343fd39 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| rgrover1 | 0:792e9343fd39 | 13 | * See the License for the specific language governing permissions and |
| rgrover1 | 0:792e9343fd39 | 14 | * limitations under the License. |
| rgrover1 | 0:792e9343fd39 | 15 | */ |
| rgrover1 | 0:792e9343fd39 | 16 | |
| rgrover1 | 0:792e9343fd39 | 17 | #include "mbed.h" |
| rgrover1 | 0:792e9343fd39 | 18 | #include "GPSProviderImplBase.h" |
| rgrover1 | 0:792e9343fd39 | 19 | #include "GPSProvider.h" |
| rgrover1 | 0:792e9343fd39 | 20 | |
| rgrover1 | 0:792e9343fd39 | 21 | bool |
| rgrover1 | 0:792e9343fd39 | 22 | GPSProvider::setPowerMode(PowerMode_t power) |
| rgrover1 | 0:792e9343fd39 | 23 | { |
| rgrover1 | 0:792e9343fd39 | 24 | return impl->setPowerMode(power); |
| rgrover1 | 0:792e9343fd39 | 25 | } |
| rgrover1 | 0:792e9343fd39 | 26 | |
| rgrover1 | 0:792e9343fd39 | 27 | void |
| rgrover1 | 0:792e9343fd39 | 28 | GPSProvider::reset(void) |
| rgrover1 | 0:792e9343fd39 | 29 | { |
| rgrover1 | 0:792e9343fd39 | 30 | impl->reset(); |
| rgrover1 | 0:792e9343fd39 | 31 | } |
| rgrover1 | 0:792e9343fd39 | 32 | |
| rgrover1 | 0:792e9343fd39 | 33 | void |
| rgrover1 | 0:792e9343fd39 | 34 | GPSProvider::start(void) |
| rgrover1 | 0:792e9343fd39 | 35 | { |
| rgrover1 | 0:792e9343fd39 | 36 | impl->start(); |
| rgrover1 | 0:792e9343fd39 | 37 | } |
| rgrover1 | 0:792e9343fd39 | 38 | |
| rgrover1 | 0:792e9343fd39 | 39 | void |
| rgrover1 | 0:792e9343fd39 | 40 | GPSProvider::stop(void) |
| rgrover1 | 0:792e9343fd39 | 41 | { |
| rgrover1 | 0:792e9343fd39 | 42 | impl->stop(); |
| rgrover1 | 0:792e9343fd39 | 43 | } |
| rgrover1 | 1:c1122f8eec82 | 44 | |
| rgrover1 | 1:c1122f8eec82 | 45 | void |
| rgrover1 | 1:c1122f8eec82 | 46 | GPSProvider::process(void) |
| rgrover1 | 1:c1122f8eec82 | 47 | { |
| rgrover1 | 1:c1122f8eec82 | 48 | impl->process(); |
| rgrover1 | 1:c1122f8eec82 | 49 | } |
| rgrover1 | 1:c1122f8eec82 | 50 | |
| rgrover1 | 1:c1122f8eec82 | 51 | bool |
| rgrover1 | 1:c1122f8eec82 | 52 | GPSProvider::haveDeviceInfo(void) const |
| rgrover1 | 1:c1122f8eec82 | 53 | { |
| rgrover1 | 1:c1122f8eec82 | 54 | return impl->haveDeviceInfo(); |
| rgrover1 | 1:c1122f8eec82 | 55 | } |
| rgrover1 | 1:c1122f8eec82 | 56 | |
| rgrover1 | 1:c1122f8eec82 | 57 | const char * |
| rgrover1 | 1:c1122f8eec82 | 58 | GPSProvider::getDeviceInfo(void) const |
| rgrover1 | 1:c1122f8eec82 | 59 | { |
| rgrover1 | 1:c1122f8eec82 | 60 | return impl->getDeviceInfo(); |
| rgrover1 | 1:c1122f8eec82 | 61 | } |
| rgrover1 | 1:c1122f8eec82 | 62 | |
| rgrover1 | 3:47aaf0ebde35 | 63 | uint32_t |
| rgrover1 | 3:47aaf0ebde35 | 64 | GPSProvider::ioctl(uint32_t command, void *arg) |
| rgrover1 | 3:47aaf0ebde35 | 65 | { |
| rgrover1 | 3:47aaf0ebde35 | 66 | return impl->ioctl(command, arg); |
| rgrover1 | 3:47aaf0ebde35 | 67 | } |
| rgrover1 | 3:47aaf0ebde35 | 68 | |
| rgrover1 | 1:c1122f8eec82 | 69 | bool |
| rgrover1 | 1:c1122f8eec82 | 70 | GPSProvider::locationAvailable(void) const |
| rgrover1 | 1:c1122f8eec82 | 71 | { |
| rgrover1 | 1:c1122f8eec82 | 72 | return impl->locationAvailable(); |
| rgrover1 | 1:c1122f8eec82 | 73 | } |
| rgrover1 | 1:c1122f8eec82 | 74 | |
| rgrover1 | 1:c1122f8eec82 | 75 | const GPSProvider::LocationUpdateParams_t * |
| rgrover1 | 1:c1122f8eec82 | 76 | GPSProvider::getLastLocation(void) const |
| rgrover1 | 1:c1122f8eec82 | 77 | { |
| rgrover1 | 1:c1122f8eec82 | 78 | return impl->getLastLocation(); |
| rgrover1 | 1:c1122f8eec82 | 79 | } |
| rgrover1 | 1:c1122f8eec82 | 80 | |
| rgrover1 | 1:c1122f8eec82 | 81 | void |
| rgrover1 | 1:c1122f8eec82 | 82 | GPSProvider::onLocationUpdate(LocationUpdateCallback_t callback) |
| rgrover1 | 1:c1122f8eec82 | 83 | { |
| rgrover1 | 1:c1122f8eec82 | 84 | impl->onLocationUpdate(callback); |
| rgrover1 | 1:c1122f8eec82 | 85 | } |
| rgrover1 | 2:0893ad528287 | 86 | |
| rgrover1 | 2:0893ad528287 | 87 | void |
| rgrover1 | 2:0893ad528287 | 88 | GPSProvider::lpmGetImmediateLocation(void) |
| rgrover1 | 2:0893ad528287 | 89 | { |
| rgrover1 | 2:0893ad528287 | 90 | impl->lpmGetImmediateLocation(); |
| rgrover1 | 2:0893ad528287 | 91 | } |