mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Committer:
AnnaBridge
Date:
Wed Feb 20 22:31:08 2019 +0000
Revision:
189:f392fc9709a3
Parent:
160:d5399cc887bb
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 150:02e0a0aed4ec 1 /* mbed Microcontroller Library
<> 150:02e0a0aed4ec 2 * Copyright (c) 2016 u-blox
<> 150:02e0a0aed4ec 3 *
<> 150:02e0a0aed4ec 4 * Licensed under the Apache License, Version 2.0 (the "License");
<> 150:02e0a0aed4ec 5 * you may not use this file except in compliance with the License.
<> 150:02e0a0aed4ec 6 * You may obtain a copy of the License at
<> 150:02e0a0aed4ec 7 *
<> 150:02e0a0aed4ec 8 * http://www.apache.org/licenses/LICENSE-2.0
<> 150:02e0a0aed4ec 9 *
<> 150:02e0a0aed4ec 10 * Unless required by applicable law or agreed to in writing, software
<> 150:02e0a0aed4ec 11 * distributed under the License is distributed on an "AS IS" BASIS,
<> 150:02e0a0aed4ec 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<> 150:02e0a0aed4ec 13 * See the License for the specific language governing permissions and
<> 150:02e0a0aed4ec 14 * limitations under the License.
<> 150:02e0a0aed4ec 15 */
<> 150:02e0a0aed4ec 16
<> 150:02e0a0aed4ec 17 #include "sleep_api.h"
<> 150:02e0a0aed4ec 18
<> 150:02e0a0aed4ec 19 /* ----------------------------------------------------------------
<> 150:02e0a0aed4ec 20 * MACROS
<> 150:02e0a0aed4ec 21 * ----------------------------------------------------------------*/
<> 150:02e0a0aed4ec 22
<> 150:02e0a0aed4ec 23 /* ----------------------------------------------------------------
<> 150:02e0a0aed4ec 24 * TYPES
<> 150:02e0a0aed4ec 25 * ----------------------------------------------------------------*/
<> 150:02e0a0aed4ec 26
<> 150:02e0a0aed4ec 27 /* ----------------------------------------------------------------
<> 150:02e0a0aed4ec 28 * GLOBAL VARIABLES
<> 150:02e0a0aed4ec 29 * ----------------------------------------------------------------*/
<> 150:02e0a0aed4ec 30
<> 150:02e0a0aed4ec 31 /* ----------------------------------------------------------------
<> 150:02e0a0aed4ec 32 * FUNCTION PROTOTYPES
<> 150:02e0a0aed4ec 33 * ----------------------------------------------------------------*/
<> 150:02e0a0aed4ec 34
<> 150:02e0a0aed4ec 35 /* ----------------------------------------------------------------
<> 150:02e0a0aed4ec 36 * STATIC FUNCTIONS
<> 150:02e0a0aed4ec 37 * ----------------------------------------------------------------*/
<> 150:02e0a0aed4ec 38
<> 150:02e0a0aed4ec 39 /* ----------------------------------------------------------------
<> 150:02e0a0aed4ec 40 * MBED API CALLS
<> 150:02e0a0aed4ec 41 * ----------------------------------------------------------------*/
<> 150:02e0a0aed4ec 42
<> 160:d5399cc887bb 43 void hal_sleep(void)
<> 150:02e0a0aed4ec 44 {
<> 150:02e0a0aed4ec 45 __DSB();
<> 150:02e0a0aed4ec 46 __WFI();
<> 150:02e0a0aed4ec 47 __ISB();
<> 150:02e0a0aed4ec 48 }
<> 150:02e0a0aed4ec 49
<> 160:d5399cc887bb 50 void hal_deepsleep()
<> 150:02e0a0aed4ec 51 {
<> 160:d5399cc887bb 52 hal_sleep();
<> 150:02e0a0aed4ec 53 }