Kamcho Library 02.00.03  lib.kamcho.02.00.03.287
Data Structures | Enumerations | Functions | Variables
pmu_device.h File Reference
#include <stdint.h>
#include "hdf.h"

Go to the source code of this file.

Data Structures

struct  PMU_WakeupTime
 The data structure of wakeup timer settings. More...
 

Enumerations

enum  PMU_WAKEUP_TIME_t {
  PMU_WAKEUP_TIME_100, PMU_WAKEUP_TIME_200, PMU_WAKEUP_TIME_500, PMU_WAKEUP_TIME_1000,
  PMU_WAKEUP_TIME_2000, PMU_WAKEUP_TIME_4000, PMU_WAKEUP_TIME_6000, PMU_WAKEUP_TIME_8000,
  PMU_WAKEUP_TIME_10000, PMU_WAKEUP_TIME_12000, PMU_WAKEUP_TIME_MAX = PMU_WAKEUP_TIME_12000
}
 The enumeration of wakeup time. More...
 
enum  PMU_BROWNOUT_MODE_t { PMU_BROWNOUT_NONE, PMU_BROWNOUT_RESET, PMU_BROWNOUT_INTERRUPT }
 The enumeration of brownout mode. More...
 

Functions

void PMU_devSleepLowPwr (PMU_WAKEUP_TIME_t time)
 Sleep in Low power mode then Continue. More...
 
void PMU_devSleepLowPwrReboot (PMU_WAKEUP_TIME_t time)
 Sleep in Low power mode and Reboot. More...
 
void PMU_devBrownOutInit (PMU_BROWNOUT_MODE_t brown, uint32_t volt, void *cb)
 Initialize brownout settings. More...
 
void PMU_devSetPowerModeBattery (void)
 Set system power to battery mode. More...
 
void PMU_devSetPowerModeLDO (void)
 Set system power to LDO mode. More...
 

Variables

static const struct PMU_WakeupTime PMU_WAKEUP_TIME_tbl [PMU_WAKEUP_TIME_MAX+1]
 The wakeup timer settings for each enumeration of wakeup time. More...
 

Detailed Description

This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.

Enumeration Type Documentation

The enumeration of brownout mode.

Enumerator
PMU_BROWNOUT_NONE 
PMU_BROWNOUT_RESET 
PMU_BROWNOUT_INTERRUPT 

The enumeration of wakeup time.

Enumerator
PMU_WAKEUP_TIME_100 
PMU_WAKEUP_TIME_200 
PMU_WAKEUP_TIME_500 
PMU_WAKEUP_TIME_1000 
PMU_WAKEUP_TIME_2000 
PMU_WAKEUP_TIME_4000 
PMU_WAKEUP_TIME_6000 
PMU_WAKEUP_TIME_8000 
PMU_WAKEUP_TIME_10000 
PMU_WAKEUP_TIME_12000 
PMU_WAKEUP_TIME_MAX 

Function Documentation

void PMU_devBrownOutInit ( PMU_BROWNOUT_MODE_t  brown,
uint32_t  volt,
void *  cb 
)

Initialize brownout settings.

Parameters
brownThe enumeration of brownout mode.
voltThe brownout voltage.
cbThe pointer to the call back function for brown interrupt.
void PMU_devSetPowerModeBattery ( void  )

Set system power to battery mode.

void PMU_devSetPowerModeLDO ( void  )

Set system power to LDO mode.

void PMU_devSleepLowPwr ( PMU_WAKEUP_TIME_t  time)

Sleep in Low power mode then Continue.

Parameters
timeThe enumeration of sleep time.
Returns
None This function puts the system in low power mode and then sleep for the time defined, then wake up and continue to run. This function can only be used for the hardware which is configured to support low power mode. Need to be very cautious to use this function to avoid of entering a deep sleep mode unrecoverable.
void PMU_devSleepLowPwrReboot ( PMU_WAKEUP_TIME_t  time)

Sleep in Low power mode and Reboot.

Parameters
timeThe enumeration of sleep time
Returns
None This function puts the system in low power mode and then sleep for the time defined, then reboot when the timer expires. This function can only be used for the hardware which is configured to support low power mode. Need to be very cautious to use this function to avoid of entering a deep sleep mode unrecoverable.

Variable Documentation

const struct PMU_WakeupTime PMU_WAKEUP_TIME_tbl[PMU_WAKEUP_TIME_MAX+1]
static
Initial value:
=
{
[PMU_WAKEUP_TIME_100] = {.manissa = 4, .exp = 7},
[PMU_WAKEUP_TIME_200] = {.manissa = 4, .exp = 8},
[PMU_WAKEUP_TIME_500] = {.manissa = 10, .exp = 8},
[PMU_WAKEUP_TIME_1000] = {.manissa = 10, .exp = 9},
[PMU_WAKEUP_TIME_2000] = {.manissa = 10, .exp = 10},
[PMU_WAKEUP_TIME_4000] = {.manissa = 10, .exp = 11},
[PMU_WAKEUP_TIME_6000] = {.manissa = 15, .exp = 11},
[PMU_WAKEUP_TIME_8000] = {.manissa = 10, .exp = 12},
[PMU_WAKEUP_TIME_10000] = {.manissa = 12, .exp = 12},
[PMU_WAKEUP_TIME_12000] = {.manissa = 15, .exp = 12},
}
Definition: pmu_device.h:28
Definition: pmu_device.h:30
Definition: pmu_device.h:22
Definition: pmu_device.h:31
Definition: pmu_device.h:26
Definition: pmu_device.h:23
Definition: pmu_device.h:24
Definition: pmu_device.h:25
Definition: pmu_device.h:27
Definition: pmu_device.h:29

The wakeup timer settings for each enumeration of wakeup time.