Skip to content

Commit f5f6389

Browse files
authored
Merge pull request #13849 from kalle16lab/add-apollo3-sleep
Add apollo3 sleep
2 parents f84cf8c + 6bf039d commit f5f6389

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2020 Arm Limited and affiliates.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#include "sleep_api.h"
18+
#include "am_hal_sysctrl.h"
19+
20+
void hal_sleep(void)
21+
{
22+
am_hal_sysctrl_sleep(AM_HAL_SYSCTRL_SLEEP_NORMAL);
23+
}
24+
25+
void hal_deepsleep(void)
26+
{
27+
am_hal_sysctrl_sleep(AM_HAL_SYSCTRL_SLEEP_DEEP);
28+
}

targets/targets.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7228,7 +7228,7 @@
72287228
"features": ["BLE"],
72297229
"default_toolchain": "GCC_ARM",
72307230
"supported_toolchains": [
7231-
"GCC_ARM",
7231+
"GCC_ARM",
72327232
"ARMC6"
72337233
],
72347234
"public": false,
@@ -7246,20 +7246,22 @@
72467246
"STDIO_MESSAGES",
72477247
"FLASH",
72487248
"SPI",
7249-
"I2C"
7249+
"I2C",
7250+
"SLEEP"
72507251
],
72517252
"components": [
72527253
"FLASHIAP"
72537254
],
72547255
"macros": [
72557256
"CORDIO_ZERO_COPY_HCI",
7256-
"USE_AMBIQ_DRIVER"
7257+
"USE_AMBIQ_DRIVER",
7258+
"MBED_TICKLESS"
72577259
]
72587260
},
72597261
"AMA3B1KK": {
72607262
"public": false,
72617263
"inherits": ["FAMILY_Apollo3"],
7262-
"macros_add": ["AM_PACKAGE_BGA"]
7264+
"macros_add": ["AM_PACKAGE_BGA", "MBED_TICKLESS"]
72637265
},
72647266
"SFE_ARTEMIS": {
72657267
"inherits": ["AMA3B1KK"]
@@ -7279,7 +7281,7 @@
72797281
},
72807282
"SFE_ARTEMIS_THING_PLUS": {
72817283
"inherits": ["AMA3B1KK"]
7282-
},
7284+
},
72837285
"SFE_EDGE": {
72847286
"inherits": ["AMA3B1KK"],
72857287
"components_add": ["lis2dh12", "hm01b0"]

0 commit comments

Comments
 (0)