Macros | Typedefs | Enumerations | Functions | Variables
gr533x_hal_pwr_mgmt.h File Reference

This file contains all the functions prototypes for the HAL module driver. More...

`#include "gr533x_hal_def.h"`
`#include <stdio.h>`
`#include <stdbool.h>`

Go to the source code of this file.

## Macros
#define | ALL_DEVICES_SLEEP (0xFFFFFFFFU)
#define | ALL_DEVICES_BACKUP (0x00000000U)

## Typedefs
typedef hal_status_t(* | p_device_suspend_func) (void *p_dev_handle)
| HAL_PWR_SUSPEND Callback function definition. More...
typedef hal_status_t(* | p_device_resume_func) (void *p_dev_handle)
| HAL_PWR_RESUME Callback function definition. More...

## Enumerations
enum | periph_device_number_t { PERIPH_DEVICE_NUM_SPIM = 0, PERIPH_DEVICE_NUM_SPIS, PERIPH_DEVICE_NUM_I2C0, PERIPH_DEVICE_NUM_I2C1, PERIPH_DEVICE_NUM_UART0, PERIPH_DEVICE_NUM_UART1, PERIPH_DEVICE_NUM_PWM0, PERIPH_DEVICE_NUM_PWM1, PERIPH_DEVICE_NUM_DMA0, PERIPH_DEVICE_NUM_AES, PERIPH_DEVICE_NUM_RNG, PERIPH_DEVICE_NUM_SNSADC, PERIPH_DEVICE_NUM_CLK_CALIB, MAX_PERIPH_DEVICE_NUM }
| Peripheral Device ID definition. More...
enum | periph_state_t { IDLE = 0, ACTIVE }
| Peripheral Device State definition. More...

## Functions
void | hal_pwr_mgmt_device_suspend_register (periph_device_number_t dev_num, p_device_suspend_func my_device_suspend_function)
| Set peripheral suspend function. More...
void | hal_pwr_mgmt_device_suspend_release (periph_device_number_t dev_num)
| Release peripheral suspend function. More...
void | hal_pwr_mgmt_device_resume_register (periph_device_number_t dev_num, p_device_resume_func my_device_resume_function)
| Set peripheral resume function. More...
void | hal_pwr_mgmt_device_resume_release (periph_device_number_t dev_num)
| Release peripheral resume function. More...
void | hal_pwr_mgmt_save_device_handle (periph_device_number_t dev_num, void *p_dev)
| Store the specified peripheral handle. More...
void | hal_pwr_mgmt_clear_device_handle (periph_device_number_t dev_num)
| Clear the specified peripheral handle. More...
void | hal_pwr_mgmt_set_device_state (periph_device_number_t dev_num, periph_state_t state)
| Store the specified peripheral state. More...
void | hal_pwr_mgmt_set_device_renew_flag (periph_device_number_t dev_num)
| Store the specified peripheral backup flag. More...
void | hal_pwr_mgmt_clear_device_sleep_flag (periph_device_number_t dev_num)
| Store the specified peripheral sleep flag. More...

## Variables
volatile uint32_t | g_devices_state
volatile uint32_t | g_devices_renew
volatile uint32_t | g_devices_sleep
p_device_suspend_func | devices_suspend_cb [MAX_PERIPH_DEVICE_NUM]
p_device_resume_func | devices_resume_cb [MAX_PERIPH_DEVICE_NUM]
void * | devices_handle [MAX_PERIPH_DEVICE_NUM]

## Detailed Description

This file contains all the functions prototypes for the HAL module driver.

Author
  BLE Driver Team

Attention
  #####Copyright (c) 2019 GOODIX All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file gr533x_hal_pwr_mgmt.h.