来自中国的硬件平台
Dependents: mbed_in_china_blink_led
Fork of mbed-src by
Revision 136:f4bb33e41288, committed 2014-03-25
- Comitter:
- mbed_official
- Date:
- Tue Mar 25 11:45:07 2014 +0000
- Parent:
- 135:067cc8ba23da
- Child:
- 137:f9a97811e98c
- Commit message:
- Synchronized with git revision 249f016cd89f731fa95b3e082c1bf1f8f3d2981a
Full URL: https://github.com/mbedmicro/mbed/commit/249f016cd89f731fa95b3e082c1bf1f8f3d2981a/
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/mbed_overrides.c Tue Mar 25 11:45:07 2014 +0000 @@ -0,0 +1,32 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "gpio_api.h" + +// called before main - implement here if board needs it ortherwise, let +// the application override this if necessary +//void mbed_sdk_init() +//{ +// +//} + +// Change the NMI pin to an input. This allows NMI pin to +// be used as a low power mode wakeup. The application will +// need to change the pin back to NMI_b or wakeup only occurs once! +void NMI_Handler(void) +{ + gpio_t gpio; + gpio_init_in(&gpio, PTB5); +}
--- a/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL05Z/platform_init.c Tue Mar 25 10:15:07 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "gpio_api.h" - -// called before main - implement here if board needs it ortherwise, let -// the application override this if necessary -//void mbed_sdk_init() -//{ -// -//} - -// Change the NMI pin to an input. This allows NMI pin to -// be used as a low power mode wakeup. The application will -// need to change the pin back to NMI_b or wakeup only occurs once! -void NMI_Handler(void) -{ - gpio_t gpio; - gpio_init_in(&gpio, PTB5); -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/mbed_overrides.c Tue Mar 25 11:45:07 2014 +0000 @@ -0,0 +1,32 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "gpio_api.h" + +// called before main - implement here if board needs it ortherwise, let +// the application override this if necessary +//void mbed_sdk_init() +//{ +// +//} + +// Change the NMI pin to an input. This allows NMI pin to +// be used as a low power mode wakeup. The application will +// need to change the pin back to NMI_b or wakeup only occurs once! +void NMI_Handler(void) +{ + gpio_t gpio; + gpio_init_in(&gpio, PTA4); +}
--- a/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL25Z/platform_init.c Tue Mar 25 10:15:07 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "gpio_api.h" - -// called before main - implement here if board needs it ortherwise, let -// the application override this if necessary -//void mbed_sdk_init() -//{ -// -//} - -// Change the NMI pin to an input. This allows NMI pin to -// be used as a low power mode wakeup. The application will -// need to change the pin back to NMI_b or wakeup only occurs once! -void NMI_Handler(void) -{ - gpio_t gpio; - gpio_init_in(&gpio, PTA4); -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/mbed_overrides.c Tue Mar 25 11:45:07 2014 +0000 @@ -0,0 +1,32 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "gpio_api.h" + +// called before main - implement here if board needs it ortherwise, let +// the application override this if necessary +//void mbed_sdk_init() +//{ +// +//} + +// Change the NMI pin to an input. This allows NMI pin to +// be used as a low power mode wakeup. The application will +// need to change the pin back to NMI_b or wakeup only occurs once! +void NMI_Handler(void) +{ + gpio_t gpio; + gpio_init_in(&gpio, PTA4); +}
--- a/targets/hal/TARGET_Freescale/TARGET_KLXX/TARGET_KL46Z/platform_init.c Tue Mar 25 10:15:07 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "gpio_api.h" - -// called before main - implement here if board needs it ortherwise, let -// the application override this if necessary -//void mbed_sdk_init() -//{ -// -//} - -// Change the NMI pin to an input. This allows NMI pin to -// be used as a low power mode wakeup. The application will -// need to change the pin back to NMI_b or wakeup only occurs once! -void NMI_Handler(void) -{ - gpio_t gpio; - gpio_init_in(&gpio, PTA4); -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/mbed_overrides.c Tue Mar 25 11:45:07 2014 +0000 @@ -0,0 +1,43 @@ +/* mbed Microcontroller Library + * Copyright (c) 2006-2013 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "gpio_api.h" +#include "wait_api.h" + +// called before main +void mbed_sdk_init() +{ + gpio_t modemEn, modemRst, modemPwrOn, modemLvlOe, modemILvlOe, modemUsbDet; + gpio_t gpsEn, gpsRst, led, modemRts; + + // start with modem disabled + gpio_init_out_ex(&modemEn, MDMEN, 0); + gpio_init_out_ex(&modemRst, MDMRST, 1); + gpio_init_out_ex(&modemPwrOn, MDMPWRON, 1); + gpio_init_out_ex(&modemLvlOe, MDMLVLOE, 1); + gpio_init_out_ex(&modemILvlOe, MDMILVLOE, 0); + gpio_init_out_ex(&modemUsbDet, MDMUSBDET, 0); + gpio_init_out_ex(&modemRts, MDMRTS, 0); + // start with gps disabled + gpio_init_out_ex(&gpsEn, GPSEN, 0); + gpio_init_out_ex(&gpsRst, GPSRST, 1); + // led should be off + gpio_init_out_ex(&led, LED, 0); + + wait_ms(50); // when USB cable is inserted the interface chip issues + // multiple resets to the target CPU We wait here for a short period to + // prevent those resets from propagating to the modem and other + // components. +}
--- a/targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/platform_init.c Tue Mar 25 10:15:07 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* mbed Microcontroller Library - * Copyright (c) 2006-2013 ARM Limited - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "gpio_api.h" -#include "wait_api.h" - -// called before main -void mbed_sdk_init() -{ - gpio_t modemEn, modemRst, modemPwrOn, modemLvlOe, modemILvlOe, modemUsbDet; - gpio_t gpsEn, gpsRst, led, modemRts; - - // start with modem disabled - gpio_init_out_ex(&modemEn, MDMEN, 0); - gpio_init_out_ex(&modemRst, MDMRST, 1); - gpio_init_out_ex(&modemPwrOn, MDMPWRON, 1); - gpio_init_out_ex(&modemLvlOe, MDMLVLOE, 1); - gpio_init_out_ex(&modemILvlOe, MDMILVLOE, 0); - gpio_init_out_ex(&modemUsbDet, MDMUSBDET, 0); - gpio_init_out_ex(&modemRts, MDMRTS, 0); - // start with gps disabled - gpio_init_out_ex(&gpsEn, GPSEN, 0); - gpio_init_out_ex(&gpsRst, GPSRST, 1); - // led should be off - gpio_init_out_ex(&led, LED, 0); - - wait_ms(50); // when USB cable is inserted the interface chip issues - // multiple resets to the target CPU We wait here for a short period to - // prevent those resets from propagating to the modem and other - // components. -}