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.
Fork of mbed-src by
targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/mbed_overrides.c@136:f4bb33e41288, 2014-03-25 (annotated)
- Committer:
- mbed_official
- Date:
- Tue Mar 25 11:45:07 2014 +0000
- Revision:
- 136:f4bb33e41288
- Parent:
- targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/platform_init.c@134:4fb64af58963
- Child:
- 194:718a82ebba31
Synchronized with git revision 249f016cd89f731fa95b3e082c1bf1f8f3d2981a
Full URL: https://github.com/mbedmicro/mbed/commit/249f016cd89f731fa95b3e082c1bf1f8f3d2981a/
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 134:4fb64af58963 | 1 | /* mbed Microcontroller Library |
| mbed_official | 134:4fb64af58963 | 2 | * Copyright (c) 2006-2013 ARM Limited |
| mbed_official | 134:4fb64af58963 | 3 | * |
| mbed_official | 134:4fb64af58963 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| mbed_official | 134:4fb64af58963 | 5 | * you may not use this file except in compliance with the License. |
| mbed_official | 134:4fb64af58963 | 6 | * You may obtain a copy of the License at |
| mbed_official | 134:4fb64af58963 | 7 | * |
| mbed_official | 134:4fb64af58963 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| mbed_official | 134:4fb64af58963 | 9 | * |
| mbed_official | 134:4fb64af58963 | 10 | * Unless required by applicable law or agreed to in writing, software |
| mbed_official | 134:4fb64af58963 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| mbed_official | 134:4fb64af58963 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| mbed_official | 134:4fb64af58963 | 13 | * See the License for the specific language governing permissions and |
| mbed_official | 134:4fb64af58963 | 14 | * limitations under the License. |
| mbed_official | 134:4fb64af58963 | 15 | */ |
| mbed_official | 81:a9456fdf72fa | 16 | #include "gpio_api.h" |
| mbed_official | 81:a9456fdf72fa | 17 | #include "wait_api.h" |
| mbed_official | 81:a9456fdf72fa | 18 | |
| mbed_official | 134:4fb64af58963 | 19 | // called before main |
| mbed_official | 83:5a6f638110fe | 20 | void mbed_sdk_init() |
| mbed_official | 81:a9456fdf72fa | 21 | { |
| mbed_official | 81:a9456fdf72fa | 22 | gpio_t modemEn, modemRst, modemPwrOn, modemLvlOe, modemILvlOe, modemUsbDet; |
| mbed_official | 81:a9456fdf72fa | 23 | gpio_t gpsEn, gpsRst, led, modemRts; |
| mbed_official | 81:a9456fdf72fa | 24 | |
| mbed_official | 113:65a335a675de | 25 | // start with modem disabled |
| mbed_official | 114:826c6eb78fdc | 26 | gpio_init_out_ex(&modemEn, MDMEN, 0); |
| mbed_official | 114:826c6eb78fdc | 27 | gpio_init_out_ex(&modemRst, MDMRST, 1); |
| mbed_official | 114:826c6eb78fdc | 28 | gpio_init_out_ex(&modemPwrOn, MDMPWRON, 1); |
| mbed_official | 114:826c6eb78fdc | 29 | gpio_init_out_ex(&modemLvlOe, MDMLVLOE, 1); |
| mbed_official | 114:826c6eb78fdc | 30 | gpio_init_out_ex(&modemILvlOe, MDMILVLOE, 0); |
| mbed_official | 114:826c6eb78fdc | 31 | gpio_init_out_ex(&modemUsbDet, MDMUSBDET, 0); |
| mbed_official | 114:826c6eb78fdc | 32 | gpio_init_out_ex(&modemRts, MDMRTS, 0); |
| mbed_official | 113:65a335a675de | 33 | // start with gps disabled |
| mbed_official | 114:826c6eb78fdc | 34 | gpio_init_out_ex(&gpsEn, GPSEN, 0); |
| mbed_official | 114:826c6eb78fdc | 35 | gpio_init_out_ex(&gpsRst, GPSRST, 1); |
| mbed_official | 113:65a335a675de | 36 | // led should be off |
| mbed_official | 114:826c6eb78fdc | 37 | gpio_init_out_ex(&led, LED, 0); |
| mbed_official | 81:a9456fdf72fa | 38 | |
| mbed_official | 81:a9456fdf72fa | 39 | wait_ms(50); // when USB cable is inserted the interface chip issues |
| mbed_official | 81:a9456fdf72fa | 40 | // multiple resets to the target CPU We wait here for a short period to |
| mbed_official | 81:a9456fdf72fa | 41 | // prevent those resets from propagating to the modem and other |
| mbed_official | 81:a9456fdf72fa | 42 | // components. |
| mbed_official | 81:a9456fdf72fa | 43 | } |
