]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/power_api.h
Merge commit '1fe4406f374291ab2e86e95a97341fd9c475fcb8'
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / mbed / targets / cmsis / TARGET_NXP / TARGET_LPC11UXX / power_api.h
1 /****************************************************************************
2 * $Id:: power_api.h 6249 2011-01-25 19:23:47Z usb01267 $
3 * Project: NXP LPC11Uxx software example
4 *
5 * Description:
6 * Power API Header File for NXP LPC11Uxx Device Series
7 *
8 ****************************************************************************
9 * Software that is described herein is for illustrative purposes only
10 * which provides customers with programming information regarding the
11 * products. This software is supplied "AS IS" without any warranties.
12 * NXP Semiconductors assumes no responsibility or liability for the
13 * use of the software, conveys no license or title under any patent,
14 * copyright, or mask work right to the product. NXP Semiconductors
15 * reserves the right to make changes in the software without
16 * notification. NXP Semiconductors also make no representation or
17 * warranty that such application will be suitable for the specified
18 * use without further testing or modification.
19 ****************************************************************************/
20 #ifndef __LPC11UXX_POWER_API_H__
21 #define __LPC11UXX_POWER_API_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #define PWRROMD_PRESENT
28
29 typedef struct _PWRD {
30 void (*set_pll)(unsigned int cmd[], unsigned int resp[]);
31 void (*set_power)(unsigned int cmd[], unsigned int resp[]);
32 } PWRD;
33
34 typedef struct _ROM {
35 #ifdef USBROMD_PRESENT
36 const USB * pUSBD;
37 #else
38 const unsigned p_usbd;
39 #endif /* USBROMD_PRESENT */
40 const unsigned p_clib;
41 const unsigned p_cand;
42 #ifdef PWRROMD_PRESENT
43 const PWRD * pPWRD;
44 #else
45 const unsigned p_pwrd;
46 #endif /* PWRROMD_PRESENT */
47 const unsigned p_dev1;
48 const unsigned p_dev2;
49 const unsigned p_dev3;
50 const unsigned p_dev4;
51 } ROM;
52
53 //PLL setup related definitions
54 #define CPU_FREQ_EQU 0 //main PLL freq must be equal to the specified
55 #define CPU_FREQ_LTE 1 //main PLL freq must be less than or equal the specified
56 #define CPU_FREQ_GTE 2 //main PLL freq must be greater than or equal the specified
57 #define CPU_FREQ_APPROX 3 //main PLL freq must be as close as possible the specified
58
59 #define PLL_CMD_SUCCESS 0 //PLL setup successfully found
60 #define PLL_INVALID_FREQ 1 //specified freq out of range (either input or output)
61 #define PLL_INVALID_MODE 2 //invalid mode (see above for valid) specified
62 #define PLL_FREQ_NOT_FOUND 3 //specified freq not found under specified conditions
63 #define PLL_NOT_LOCKED 4 //PLL not locked => no changes to the PLL setup
64
65 //power setup elated definitions
66 #define PARAM_DEFAULT 0 //default power settings (voltage regulator, flash interface)
67 #define PARAM_CPU_PERFORMANCE 1 //setup for maximum CPU performance (higher current, more computation)
68 #define PARAM_EFFICIENCY 2 //balanced setting (power vs CPU performance)
69 #define PARAM_LOW_CURRENT 3 //lowest active current, lowest CPU performance
70
71 #define PARAM_CMD_SUCCESS 0 //power setting successfully found
72 #define PARAM_INVALID_FREQ 1 //specified freq out of range (=0 or > 50 MHz)
73 #define PARAM_INVALID_MODE 2 //specified mode not valid (see above for valid)
74
75 #define MAX_CLOCK_KHZ_PARAM 50000
76
77 #ifdef __cplusplus
78 }
79 #endif
80
81 #endif /* __LPC11UXX_POWER_API_H__ */
82
Imprint / Impressum