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-dev by
targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_KL82Z/TARGET_FRDM/mbed_overrides.c@162:16168a1438f3, 2017-04-08 (annotated)
- Committer:
- funshine
- Date:
- Sat Apr 08 17:03:55 2017 +0000
- Revision:
- 162:16168a1438f3
- Parent:
- 154:37f96f9d4de2
add code to handle serial port rx error in uart_irq()
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
<> | 154:37f96f9d4de2 | 1 | /* mbed Microcontroller Library |
<> | 154:37f96f9d4de2 | 2 | * Copyright (c) 2006-2013 ARM Limited |
<> | 154:37f96f9d4de2 | 3 | * |
<> | 154:37f96f9d4de2 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
<> | 154:37f96f9d4de2 | 5 | * you may not use this file except in compliance with the License. |
<> | 154:37f96f9d4de2 | 6 | * You may obtain a copy of the License at |
<> | 154:37f96f9d4de2 | 7 | * |
<> | 154:37f96f9d4de2 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
<> | 154:37f96f9d4de2 | 9 | * |
<> | 154:37f96f9d4de2 | 10 | * Unless required by applicable law or agreed to in writing, software |
<> | 154:37f96f9d4de2 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
<> | 154:37f96f9d4de2 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<> | 154:37f96f9d4de2 | 13 | * See the License for the specific language governing permissions and |
<> | 154:37f96f9d4de2 | 14 | * limitations under the License. |
<> | 154:37f96f9d4de2 | 15 | */ |
<> | 154:37f96f9d4de2 | 16 | #include "gpio_api.h" |
<> | 154:37f96f9d4de2 | 17 | #include "pinmap.h" |
<> | 154:37f96f9d4de2 | 18 | #include "fsl_clock_config.h" |
<> | 154:37f96f9d4de2 | 19 | |
<> | 154:37f96f9d4de2 | 20 | // called before main - implement here if board needs it otherwise, let |
<> | 154:37f96f9d4de2 | 21 | // the application override this if necessary |
<> | 154:37f96f9d4de2 | 22 | void mbed_sdk_init() |
<> | 154:37f96f9d4de2 | 23 | { |
<> | 154:37f96f9d4de2 | 24 | BOARD_BootClockRUN(); |
<> | 154:37f96f9d4de2 | 25 | } |
<> | 154:37f96f9d4de2 | 26 | |
<> | 154:37f96f9d4de2 | 27 | // Enable the RTC oscillator if available on the board |
<> | 154:37f96f9d4de2 | 28 | void rtc_setup_oscillator(RTC_Type *base) |
<> | 154:37f96f9d4de2 | 29 | { |
<> | 154:37f96f9d4de2 | 30 | /* Enable the RTC oscillator */ |
<> | 154:37f96f9d4de2 | 31 | RTC->CR |= RTC_CR_OSCE_MASK; |
<> | 154:37f96f9d4de2 | 32 | } |
<> | 154:37f96f9d4de2 | 33 | |
<> | 154:37f96f9d4de2 | 34 | // Change the NMI pin to an input. This allows NMI pin to |
<> | 154:37f96f9d4de2 | 35 | // be used as a low power mode wakeup. The application will |
<> | 154:37f96f9d4de2 | 36 | // need to change the pin back to NMI_b or wakeup only occurs once! |
<> | 154:37f96f9d4de2 | 37 | void NMI_Handler(void) |
<> | 154:37f96f9d4de2 | 38 | { |
<> | 154:37f96f9d4de2 | 39 | gpio_t gpio; |
<> | 154:37f96f9d4de2 | 40 | gpio_init_in(&gpio, PTA4); |
<> | 154:37f96f9d4de2 | 41 | } |