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:
188:bcfe06ba3d64
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 188:bcfe06ba3d64 1 /*
AnnaBridge 188:bcfe06ba3d64 2 * mbed Microcontroller Library
AnnaBridge 188:bcfe06ba3d64 3 * Copyright (c) 2017-2018 Future Electronics
AnnaBridge 189:f392fc9709a3 4 * Copyright (c) 2018-2019 Cypress Semiconductor Corporation
AnnaBridge 189:f392fc9709a3 5 * SPDX-License-Identifier: Apache-2.0
AnnaBridge 188:bcfe06ba3d64 6 *
AnnaBridge 188:bcfe06ba3d64 7 * Licensed under the Apache License, Version 2.0 (the "License");
AnnaBridge 188:bcfe06ba3d64 8 * you may not use this file except in compliance with the License.
AnnaBridge 188:bcfe06ba3d64 9 * You may obtain a copy of the License at
AnnaBridge 188:bcfe06ba3d64 10 *
AnnaBridge 188:bcfe06ba3d64 11 * http://www.apache.org/licenses/LICENSE-2.0
AnnaBridge 188:bcfe06ba3d64 12 *
AnnaBridge 188:bcfe06ba3d64 13 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 188:bcfe06ba3d64 14 * distributed under the License is distributed on an "AS IS" BASIS,
AnnaBridge 188:bcfe06ba3d64 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 188:bcfe06ba3d64 16 * See the License for the specific language governing permissions and
AnnaBridge 188:bcfe06ba3d64 17 * limitations under the License.
AnnaBridge 188:bcfe06ba3d64 18 */
AnnaBridge 188:bcfe06ba3d64 19
AnnaBridge 188:bcfe06ba3d64 20 #include "cmsis.h"
AnnaBridge 188:bcfe06ba3d64 21 #include "device.h"
AnnaBridge 188:bcfe06ba3d64 22 #include "cy_syspm.h"
AnnaBridge 188:bcfe06ba3d64 23
AnnaBridge 189:f392fc9709a3 24 #if DEVICE_SLEEP
AnnaBridge 188:bcfe06ba3d64 25
AnnaBridge 188:bcfe06ba3d64 26 void hal_sleep(void)
AnnaBridge 188:bcfe06ba3d64 27 {
AnnaBridge 189:f392fc9709a3 28 Cy_SysPm_CpuEnterSleep(CY_SYSPM_WAIT_FOR_INTERRUPT);
AnnaBridge 188:bcfe06ba3d64 29 }
AnnaBridge 188:bcfe06ba3d64 30
AnnaBridge 188:bcfe06ba3d64 31 void hal_deepsleep(void)
AnnaBridge 188:bcfe06ba3d64 32 {
AnnaBridge 188:bcfe06ba3d64 33 #if DEVICE_LPTICKER
AnnaBridge 189:f392fc9709a3 34 Cy_SysPm_CpuEnterDeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT);
AnnaBridge 189:f392fc9709a3 35 #endif /* DEVICE_LPTICKER */
AnnaBridge 188:bcfe06ba3d64 36 }
AnnaBridge 188:bcfe06ba3d64 37
AnnaBridge 189:f392fc9709a3 38 #endif /* DEVICE_SLEEP */