test public

Dependencies:   HttpServer_snapshot_mbed-os

Committer:
anhtran
Date:
Fri Oct 18 03:09:43 2019 +0000
Revision:
0:e9fd5575b10e
abc

Who changed what in which revision?

UserRevisionLine numberNew contents of line
anhtran 0:e9fd5575b10e 1 /**********************************************************************************************************************
anhtran 0:e9fd5575b10e 2 * DISCLAIMER
anhtran 0:e9fd5575b10e 3 * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No
anhtran 0:e9fd5575b10e 4 * other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
anhtran 0:e9fd5575b10e 5 * applicable laws, including copyright laws.
anhtran 0:e9fd5575b10e 6 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
anhtran 0:e9fd5575b10e 7 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
anhtran 0:e9fd5575b10e 8 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM
anhtran 0:e9fd5575b10e 9 * EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES
anhtran 0:e9fd5575b10e 10 * SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO
anhtran 0:e9fd5575b10e 11 * THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
anhtran 0:e9fd5575b10e 12 * Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of
anhtran 0:e9fd5575b10e 13 * this software. By using this software, you agree to the additional terms and conditions found by accessing the
anhtran 0:e9fd5575b10e 14 * following link:
anhtran 0:e9fd5575b10e 15 * http://www.renesas.com/disclaimer
anhtran 0:e9fd5575b10e 16 *
anhtran 0:e9fd5575b10e 17 * Copyright (C) 2019 Renesas Electronics Corporation. All rights reserved.
anhtran 0:e9fd5575b10e 18 *********************************************************************************************************************/
anhtran 0:e9fd5575b10e 19 /**************************************************************************//**
anhtran 0:e9fd5575b10e 20 * @file DeepStandby.h
anhtran 0:e9fd5575b10e 21 * @brief DeepStandby API
anhtran 0:e9fd5575b10e 22 ******************************************************************************/
anhtran 0:e9fd5575b10e 23
anhtran 0:e9fd5575b10e 24 #ifndef DEEP_STANDBY_H
anhtran 0:e9fd5575b10e 25 #define DEEP_STANDBY_H
anhtran 0:e9fd5575b10e 26
anhtran 0:e9fd5575b10e 27 #include "mbed.h"
anhtran 0:e9fd5575b10e 28
anhtran 0:e9fd5575b10e 29 /** A class to communicate a DeepStandby
anhtran 0:e9fd5575b10e 30 *
anhtran 0:e9fd5575b10e 31 */
anhtran 0:e9fd5575b10e 32 class DeepStandby {
anhtran 0:e9fd5575b10e 33 public:
anhtran 0:e9fd5575b10e 34
anhtran 0:e9fd5575b10e 35 typedef struct {
anhtran 0:e9fd5575b10e 36 bool button0; /*!< Works with GR_LYCHEE, RZ_A2M_EVB and SEMB1402. */
anhtran 0:e9fd5575b10e 37 bool button1; /*!< Works with GR_LYCHEE, RZ_A2M_EVB and RZ_A2M_SBEV. */
anhtran 0:e9fd5575b10e 38 bool rtc; /*!< Works with RZ_A1, GR_LYCHEE, RZ_A2M_EVB, RZ_A2M_SBEV and SEMB1402. */
anhtran 0:e9fd5575b10e 39 } cancel_src_simple_t;
anhtran 0:e9fd5575b10e 40
anhtran 0:e9fd5575b10e 41 /** Set deep standby mode
anhtran 0:e9fd5575b10e 42 *
anhtran 0:e9fd5575b10e 43 * @param src Factors that cancel deep standby.
anhtran 0:e9fd5575b10e 44 */
anhtran 0:e9fd5575b10e 45 static void SetDeepStandbySimple(cancel_src_simple_t *src);
anhtran 0:e9fd5575b10e 46
anhtran 0:e9fd5575b10e 47 /** Get deep standby cancel source
anhtran 0:e9fd5575b10e 48 *
anhtran 0:e9fd5575b10e 49 * @param src Factor that canceled deep standby.
anhtran 0:e9fd5575b10e 50 * @return true : Deep standby canceled. false : Reset start.
anhtran 0:e9fd5575b10e 51 */
anhtran 0:e9fd5575b10e 52 static bool GetCancelSourceSimple(cancel_src_simple_t *src);
anhtran 0:e9fd5575b10e 53
anhtran 0:e9fd5575b10e 54
anhtran 0:e9fd5575b10e 55
anhtran 0:e9fd5575b10e 56 typedef struct {
anhtran 0:e9fd5575b10e 57 uint8_t rramkp; /*!< Value of RRAMKP register */
anhtran 0:e9fd5575b10e 58 uint16_t dsssr; /*!< Value of DSSSR register */
anhtran 0:e9fd5575b10e 59 uint16_t dsesr; /*!< Value of DSESR register */
anhtran 0:e9fd5575b10e 60 uint16_t usbdsssr; /*!< Value of USBDSSSR register (Used only with RZ/A2M) */
anhtran 0:e9fd5575b10e 61 } cancel_src_direct_t;
anhtran 0:e9fd5575b10e 62
anhtran 0:e9fd5575b10e 63 /** Set deep standby mode
anhtran 0:e9fd5575b10e 64 *
anhtran 0:e9fd5575b10e 65 * @param src Factors that cancel deep standby.
anhtran 0:e9fd5575b10e 66 */
anhtran 0:e9fd5575b10e 67 static void SetDeepStandbyDirect(cancel_src_direct_t *src);
anhtran 0:e9fd5575b10e 68
anhtran 0:e9fd5575b10e 69 /** Get deep standby cancel source
anhtran 0:e9fd5575b10e 70 *
anhtran 0:e9fd5575b10e 71 * @param dsfr Value of DSFR register
anhtran 0:e9fd5575b10e 72 * @param usbdsfr Value of USBDSFR register
anhtran 0:e9fd5575b10e 73 * @return true : Deep standby canceled. false : Reset start.
anhtran 0:e9fd5575b10e 74 */
anhtran 0:e9fd5575b10e 75 static bool GetCancelSourceDirect(uint16_t *dsfr, uint8_t *usbdsfr);
anhtran 0:e9fd5575b10e 76
anhtran 0:e9fd5575b10e 77 };
anhtran 0:e9fd5575b10e 78 #endif