Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed by
power_api.h
00001 /**************************************************************************** 00002 * $Id:: power_api.h 6249 2011-01-25 19:23:47Z usb01267 $ 00003 * Project: NXP LPC11Uxx software example 00004 * 00005 * Description: 00006 * Power API Header File for NXP LPC11Uxx Device Series 00007 * 00008 **************************************************************************** 00009 * Software that is described herein is for illustrative purposes only 00010 * which provides customers with programming information regarding the 00011 * products. This software is supplied "AS IS" without any warranties. 00012 * NXP Semiconductors assumes no responsibility or liability for the 00013 * use of the software, conveys no license or title under any patent, 00014 * copyright, or mask work right to the product. NXP Semiconductors 00015 * reserves the right to make changes in the software without 00016 * notification. NXP Semiconductors also make no representation or 00017 * warranty that such application will be suitable for the specified 00018 * use without further testing or modification. 00019 ****************************************************************************/ 00020 #ifndef __LPC11UXX_POWER_API_H__ 00021 #define __LPC11UXX_POWER_API_H__ 00022 00023 #ifdef __cplusplus 00024 extern "C" { 00025 #endif 00026 00027 #define PWRROMD_PRESENT 00028 00029 typedef struct _PWRD { 00030 void (*set_pll)(unsigned int cmd[], unsigned int resp[]); 00031 void (*set_power)(unsigned int cmd[], unsigned int resp[]); 00032 } PWRD; 00033 00034 typedef struct _ROM { 00035 #ifdef USBROMD_PRESENT 00036 const USB * pUSBD; 00037 #else 00038 const unsigned p_usbd; 00039 #endif /* USBROMD_PRESENT */ 00040 const unsigned p_clib; 00041 const unsigned p_cand; 00042 #ifdef PWRROMD_PRESENT 00043 const PWRD * pPWRD; 00044 #else 00045 const unsigned p_pwrd; 00046 #endif /* PWRROMD_PRESENT */ 00047 const unsigned p_dev1; 00048 const unsigned p_dev2; 00049 const unsigned p_dev3; 00050 const unsigned p_dev4; 00051 } ROM; 00052 00053 //PLL setup related definitions 00054 #define CPU_FREQ_EQU 0 //main PLL freq must be equal to the specified 00055 #define CPU_FREQ_LTE 1 //main PLL freq must be less than or equal the specified 00056 #define CPU_FREQ_GTE 2 //main PLL freq must be greater than or equal the specified 00057 #define CPU_FREQ_APPROX 3 //main PLL freq must be as close as possible the specified 00058 00059 #define PLL_CMD_SUCCESS 0 //PLL setup successfully found 00060 #define PLL_INVALID_FREQ 1 //specified freq out of range (either input or output) 00061 #define PLL_INVALID_MODE 2 //invalid mode (see above for valid) specified 00062 #define PLL_FREQ_NOT_FOUND 3 //specified freq not found under specified conditions 00063 #define PLL_NOT_LOCKED 4 //PLL not locked => no changes to the PLL setup 00064 00065 //power setup elated definitions 00066 #define PARAM_DEFAULT 0 //default power settings (voltage regulator, flash interface) 00067 #define PARAM_CPU_PERFORMANCE 1 //setup for maximum CPU performance (higher current, more computation) 00068 #define PARAM_EFFICIENCY 2 //balanced setting (power vs CPU performance) 00069 #define PARAM_LOW_CURRENT 3 //lowest active current, lowest CPU performance 00070 00071 #define PARAM_CMD_SUCCESS 0 //power setting successfully found 00072 #define PARAM_INVALID_FREQ 1 //specified freq out of range (=0 or > 50 MHz) 00073 #define PARAM_INVALID_MODE 2 //specified mode not valid (see above for valid) 00074 00075 #define MAX_CLOCK_KHZ_PARAM 50000 00076 00077 #ifdef __cplusplus 00078 } 00079 #endif 00080 00081 #endif /* __LPC11UXX_POWER_API_H__ */ 00082
Generated on Tue Jul 12 2022 20:12:25 by
1.7.2