mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/platform_init.c@114:826c6eb78fdc, 2014-03-10 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Mar 10 13:45:07 2014 +0000
- Revision:
- 114:826c6eb78fdc
- Parent:
- 113:65a335a675de
- Child:
- 134:4fb64af58963
Synchronized with git revision f34be808744ffa690544bdc2c4354133a5565ffc
Full URL: https://github.com/mbedmicro/mbed/commit/f34be808744ffa690544bdc2c4354133a5565ffc/
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 81:a9456fdf72fa | 1 | |
mbed_official | 81:a9456fdf72fa | 2 | #include "gpio_api.h" |
mbed_official | 81:a9456fdf72fa | 3 | #include "wait_api.h" |
mbed_official | 81:a9456fdf72fa | 4 | |
mbed_official | 81:a9456fdf72fa | 5 | // called before main |
mbed_official | 83:5a6f638110fe | 6 | void mbed_sdk_init() |
mbed_official | 81:a9456fdf72fa | 7 | { |
mbed_official | 81:a9456fdf72fa | 8 | gpio_t modemEn, modemRst, modemPwrOn, modemLvlOe, modemILvlOe, modemUsbDet; |
mbed_official | 81:a9456fdf72fa | 9 | gpio_t gpsEn, gpsRst, led, modemRts; |
mbed_official | 81:a9456fdf72fa | 10 | |
mbed_official | 113:65a335a675de | 11 | // start with modem disabled |
mbed_official | 114:826c6eb78fdc | 12 | gpio_init_out_ex(&modemEn, MDMEN, 0); |
mbed_official | 114:826c6eb78fdc | 13 | gpio_init_out_ex(&modemRst, MDMRST, 1); |
mbed_official | 114:826c6eb78fdc | 14 | gpio_init_out_ex(&modemPwrOn, MDMPWRON, 1); |
mbed_official | 114:826c6eb78fdc | 15 | gpio_init_out_ex(&modemLvlOe, MDMLVLOE, 1); |
mbed_official | 114:826c6eb78fdc | 16 | gpio_init_out_ex(&modemILvlOe, MDMILVLOE, 0); |
mbed_official | 114:826c6eb78fdc | 17 | gpio_init_out_ex(&modemUsbDet, MDMUSBDET, 0); |
mbed_official | 114:826c6eb78fdc | 18 | gpio_init_out_ex(&modemRts, MDMRTS, 0); |
mbed_official | 113:65a335a675de | 19 | // start with gps disabled |
mbed_official | 114:826c6eb78fdc | 20 | gpio_init_out_ex(&gpsEn, GPSEN, 0); |
mbed_official | 114:826c6eb78fdc | 21 | gpio_init_out_ex(&gpsRst, GPSRST, 1); |
mbed_official | 113:65a335a675de | 22 | // led should be off |
mbed_official | 114:826c6eb78fdc | 23 | gpio_init_out_ex(&led, LED, 0); |
mbed_official | 81:a9456fdf72fa | 24 | |
mbed_official | 81:a9456fdf72fa | 25 | wait_ms(50); // when USB cable is inserted the interface chip issues |
mbed_official | 81:a9456fdf72fa | 26 | // multiple resets to the target CPU We wait here for a short period to |
mbed_official | 81:a9456fdf72fa | 27 | // prevent those resets from propagating to the modem and other |
mbed_official | 81:a9456fdf72fa | 28 | // components. |
mbed_official | 81:a9456fdf72fa | 29 | } |