File ns_peripherals_power.h
FileList > includes-api > ns_peripherals_power.h
Go to the source code of this file
NeuralSPOT Power Management Library. More...
#include "ns_core.h"
#include "am_bsp.h"
#include "am_mcu_apollo.h"
#include "am_util.h"
Classes
Type | Name |
---|---|
struct | ns_power_config_t Power Mode Definitino. |
Public Types
Type | Name |
---|---|
enum | ns_power_mode_e |
Public Attributes
Type | Name |
---|---|
const ns_power_config_t | ns_audio_default Good for AI that uses audio peripherals. |
const ns_power_config_t | ns_debug_default Enables all things. |
const ns_power_config_t | ns_development_default Enables most things. |
const ns_power_config_t | ns_good_default Reasonable settings for more applications. |
const ns_power_config_t | ns_mlperf_mode1 Good power/perf setting. |
const ns_power_config_t | ns_mlperf_mode2 Good power/perf setting. |
const ns_power_config_t | ns_mlperf_mode3 Good power/perf setting. |
const ns_core_api_t | ns_power_V0_0_1 Power Control Utilities. |
const ns_core_api_t | ns_power_V1_0_0 |
const ns_core_api_t | ns_power_current_version |
const ns_core_api_t | ns_power_oldest_supported_version |
Public Functions
Type | Name |
---|---|
void | ns_deep_sleep (void) neuralSPOT-aware deep_sleep - turns off certain systems off before sleeping and turns them back upon waking. |
uint32_t | ns_power_config (const ns_power_config_t * pCfg) Set SOC Power Mode. |
uint32_t | ns_set_performance_mode (ns_power_mode_e eAIPowerMode) Sets CPU frequency to one of the ns_power_modes. |
Macros
Type | Name |
---|---|
define | NS_POWER_API_ID 0xCA0007 |
define | NS_POWER_CURRENT_VERSION NS_POWER_V1_0_0 |
define | NS_POWER_OLDEST_SUPPORTED_VERSION NS_POWER_V0_0_1 |
define | NS_POWER_V0_0_1 { .major = 0, .minor = 0, .revision = 1 } |
define | NS_POWER_V1_0_0 { .major = 1, .minor = 0, .revision = 0 } |
Detailed Description
Author:
Carlos Morales
Version:
0.1
Date:
2022-09-02
Copyright:
Copyright (c) 2022
Public Types Documentation
enum ns_power_mode_e
enum ns_power_mode_e {
NS_MINIMUM_PERF = 0,
NS_MEDIUM_PERF = 1,
NS_MAXIMUM_PERF = 2
};
Public Attributes Documentation
variable ns_audio_default
const ns_power_config_t ns_audio_default;
variable ns_debug_default
const ns_power_config_t ns_debug_default;
variable ns_development_default
const ns_power_config_t ns_development_default;
variable ns_good_default
const ns_power_config_t ns_good_default;
variable ns_mlperf_mode1
const ns_power_config_t ns_mlperf_mode1;
variable ns_mlperf_mode2
const ns_power_config_t ns_mlperf_mode2;
variable ns_mlperf_mode3
const ns_power_config_t ns_mlperf_mode3;
variable ns_power_V0_0_1
const ns_core_api_t ns_power_V0_0_1;
variable ns_power_V1_0_0
const ns_core_api_t ns_power_V1_0_0;
variable ns_power_current_version
const ns_core_api_t ns_power_current_version;
variable ns_power_oldest_supported_version
const ns_core_api_t ns_power_oldest_supported_version;
Public Functions Documentation
function ns_deep_sleep
void ns_deep_sleep (
void
)
function ns_power_config
Set SOC Power Mode.
uint32_t ns_power_config (
const ns_power_config_t * pCfg
)
Parameters:
- ns_power_config_t Desired power mode
Returns:
uint32_t success/failure
function ns_set_performance_mode
Sets CPU frequency to one of the ns_power_modes.
uint32_t ns_set_performance_mode (
ns_power_mode_e eAIPowerMode
)
Parameters:
eAIPowerMode
Returns:
uint32_t status
Sets CPU frequency to one of the ns_power_modes.
Macro Definition Documentation
define NS_POWER_API_ID
#define NS_POWER_API_ID 0xCA0007
define NS_POWER_CURRENT_VERSION
#define NS_POWER_CURRENT_VERSION NS_POWER_V1_0_0
define NS_POWER_OLDEST_SUPPORTED_VERSION
#define NS_POWER_OLDEST_SUPPORTED_VERSION NS_POWER_V0_0_1
define NS_POWER_V0_0_1
#define NS_POWER_V0_0_1 { .major = 0, .minor = 0, .revision = 1 }
define NS_POWER_V1_0_0
#define NS_POWER_V1_0_0 { .major = 1, .minor = 0, .revision = 0 }
The documentation for this class was generated from the following file neuralSPOT/neuralspot/ns-peripherals/includes-api/ns_peripherals_power.h