anyThing Connected Team / mbed-dev

Dependents:   BREAK_SENSOR_LED

Fork of mbed-dev by mbed official

Committer:
AnnaBridge
Date:
Fri May 26 12:39:01 2017 +0100
Revision:
165:e614a9f1c9e2
This updates the lib to the mbed lib v 143

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 165:e614a9f1c9e2 1 /* mbed Microcontroller Library
AnnaBridge 165:e614a9f1c9e2 2 * Copyright (c) 2006-2017 ARM Limited
AnnaBridge 165:e614a9f1c9e2 3 *
AnnaBridge 165:e614a9f1c9e2 4 * Licensed under the Apache License, Version 2.0 (the "License");
AnnaBridge 165:e614a9f1c9e2 5 * you may not use this file except in compliance with the License.
AnnaBridge 165:e614a9f1c9e2 6 * You may obtain a copy of the License at
AnnaBridge 165:e614a9f1c9e2 7 *
AnnaBridge 165:e614a9f1c9e2 8 * http://www.apache.org/licenses/LICENSE-2.0
AnnaBridge 165:e614a9f1c9e2 9 *
AnnaBridge 165:e614a9f1c9e2 10 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 165:e614a9f1c9e2 11 * distributed under the License is distributed on an "AS IS" BASIS,
AnnaBridge 165:e614a9f1c9e2 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 165:e614a9f1c9e2 13 * See the License for the specific language governing permissions and
AnnaBridge 165:e614a9f1c9e2 14 * limitations under the License.
AnnaBridge 165:e614a9f1c9e2 15 */
AnnaBridge 165:e614a9f1c9e2 16 #include "gpio_api.h"
AnnaBridge 165:e614a9f1c9e2 17
AnnaBridge 165:e614a9f1c9e2 18 #define CRC16
AnnaBridge 165:e614a9f1c9e2 19 #include "crc.h"
AnnaBridge 165:e614a9f1c9e2 20 #include "fsl_clock_config.h"
AnnaBridge 165:e614a9f1c9e2 21
AnnaBridge 165:e614a9f1c9e2 22 // called before main
AnnaBridge 165:e614a9f1c9e2 23 void mbed_sdk_init()
AnnaBridge 165:e614a9f1c9e2 24 {
AnnaBridge 165:e614a9f1c9e2 25 BOARD_BootClockRUN();
AnnaBridge 165:e614a9f1c9e2 26 }
AnnaBridge 165:e614a9f1c9e2 27
AnnaBridge 165:e614a9f1c9e2 28 // Change the NMI pin to an input. This allows NMI pin to
AnnaBridge 165:e614a9f1c9e2 29 // be used as a low power mode wakeup. The application will
AnnaBridge 165:e614a9f1c9e2 30 // need to change the pin back to NMI_b or wakeup only occurs once!
AnnaBridge 165:e614a9f1c9e2 31 void NMI_Handler(void)
AnnaBridge 165:e614a9f1c9e2 32 {
AnnaBridge 165:e614a9f1c9e2 33 gpio_t gpio;
AnnaBridge 165:e614a9f1c9e2 34 gpio_init_in(&gpio, PTA4);
AnnaBridge 165:e614a9f1c9e2 35 }
AnnaBridge 165:e614a9f1c9e2 36
AnnaBridge 165:e614a9f1c9e2 37 // Enable the RTC oscillator if available on the board
AnnaBridge 165:e614a9f1c9e2 38 void rtc_setup_oscillator(RTC_Type *base)
AnnaBridge 165:e614a9f1c9e2 39 {
AnnaBridge 165:e614a9f1c9e2 40 /* Enable the RTC oscillator */
AnnaBridge 165:e614a9f1c9e2 41 RTC->CR |= RTC_CR_OSCE_MASK;
AnnaBridge 165:e614a9f1c9e2 42 }
AnnaBridge 165:e614a9f1c9e2 43