sleep_ex_api.h File Reference

This file provides mbed API for SLEEP. More...

`#include "device.h"`

## Data Structures

struct | _SLEEP_WKUP_EVENT_
struct | _SLEEP_WKUP_EVENT_

## Functions

void | deepsleep_ex (uint32_t wakeup_event, uint32_t sleep_duration)
| To make the system entering the Deep Sleep power saving mode. The CPU, memory and peripheral power is off when entering deep sleep power saving mode. The program needs to be reload and all peripheral needs be re-configure when system resume. More...
void | standby_wakeup_event_del (uint32_t wakeup_event)
| To delete a wake up event for wakeing up the system from the deep standby power saving mode. More...
Ameba Common
void | sleep_ex (uint32_t wakeup_event, uint32_t sleep_duration)
| To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt, G-Timer timeout, etc. befor entering power saving mode. More...
void | sleep_ex_selective (uint32_t wakeup_event, uint32_t sleep_duration, uint32_t clk_sourec_enable, uint32_t sdr_enable)
| To make the system entering the Clock Gated power saving. This function just make the system to enter the clock gated power saving mode and pending on wake up event waitting. The user application need to configure the peripheral to generate system wake up event, like GPIO interrupt , G-Timer timeout, etc. befor entering power saving mode. More...

## Ameba1 Only

#define | SLEEP_WAKEUP_BY_GTIMER (SLP_GTIMER)
#define | SLEEP_WAKEUP_BY_NFC (SLP_NFC)
#define | STANDBY_WAKEUP_BY_NFC (BIT1)
#define | STANDBY_WAKEUP_BY_PA5 (BIT4)
#define | STANDBY_WAKEUP_BY_PC7 (BIT5)
#define | STANDBY_WAKEUP_BY_PD5 (BIT6)
#define | STANDBY_WAKEUP_BY_PE3 (BIT7)
typedef struct _SLEEP_WKUP_EVENT_ | SLEEP_WAKEUP_EVENT
typedef struct _SLEEP_WKUP_EVENT_ * | PSLEEP_WAKEUP_EVENT
void | deepstandby_ex (void)
| To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume. More...
void | standby_wakeup_event_add (uint32_t wakeup_event, uint32_t sleep_duration_ms, uint32_t gpio_active)
| To add a wake up event to wake up the system from the deep standby power saving mode. More...

## AmebaZ Only

#define | SLEEP_WAKEUP_BY_STIMER (SLP_STIMER)
#define | SLEEP_WAKEUP_BY_GPIO_INT (SLP_GPIO)
#define | SLEEP_WAKEUP_BY_WLAN (SLP_WL)
#define | SLEEP_WAKEUP_BY_SDIO (SLP_SDIO)
#define | SLEEP_WAKEUP_BY_USB (SLP_USB)
#define | STANDBY_WAKEUP_BY_STIMER (BIT0)
#define | DSLEEP_WAKEUP_BY_TIMER (DS_TIMER33)
#define | DSLEEP_WAKEUP_BY_GPIO (DS_GPIO)
#define | SLEEP_WAKEUP_BY_STIMER (BIT_SYSON_WEVT_SYSTIM_MSK)
#define | SLEEP_WAKEUP_BY_GPIO_INT (BIT_SYSON_WEVT_GPIO_MSK)
#define | SLEEP_WAKEUP_BY_WLAN (BIT_SYSON_WEVT_WLAN_MSK)
#define | SLEEP_WAKEUP_BY_SDIO (BIT_SYSON_WEVT_SDIO_MSK)
#define | SLEEP_WAKEUP_BY_USB (BIT_SYSON_WEVT_USB_MSK)
#define | SLEEP_WAKEUP_BY_GPIO (BIT_SYSON_WEVT_GPIO_DSTBY_MSK)
#define | SLEEP_WAKEUP_BY_UART (BIT_SYSON_WEVT_UART0_MSK | BIT_SYSON_WEVT_UART1_MSK)
#define | SLEEP_WAKEUP_BY_I2C (BIT_SYSON_WEVT_I2C0_MSK | BIT_SYSON_WEVT_I2C1_MSK)
#define | SLEEP_WAKEUP_BY_RTC (BIT_SYSON_WEVT_RTC_MSK)
#define | STANDBY_WAKEUP_BY_STIMER (BIT_SYSON_WEVT_A33_AND_A33GPIO_MSK)
#define | STANDBY_WAKEUP_BY_GPIO (BIT_SYSON_WEVT_GPIO_DSTBY_MSK)
#define | STANDBY_WAKEUP_BY_RTC (BIT_SYSON_WEVT_RTC_MSK)
#define | DSLEEP_WAKEUP_BY_TIMER BIT(0)
#define | DSLEEP_WAKEUP_BY_GPIO BIT(2)
void | deepstandby_ex (uint32_t sleep_duration_ms)
| To make the system entering the Deep Standby power saving. The CPU, memory and part fo peripheral power is off when entering deep standby power saving mode. The program needs to be reload from the flash at system resume. More...
void | standby_wakeup_event_add (uint32_t wakeup_event, uint32_t gpio_active)
| To add a wake up event to wake up the system from the deep standby power saving mode. More...

## Detailed Description

This file provides mbed API for SLEEP.

mbed Microcontroller Library

Author

Version
  V1.0.0

Attention

Copyright (c) 2006-2013 ARM Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.