RT-USB-THP  0
USB出力温湿気圧センサモジュールのサンプルプログラムに関する説明
power_api.h
[詳解]
1 /****************************************************************************
2  * $Id:: power_api.h 6085 2011-01-05 23:55:06Z usb00423 $
3  * Project: NXP LPC13xx software example
4  *
5  * Description:
6  * Power API Header File for NXP LPC13xx 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 __POWER_API_H__
21 #define __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_CLOSE 3 //main PLL freq must be as close as possible the specified
58 
59 #define PLL_CMD_CUCCESS 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_CUCCESS 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 72000
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* __POWER_API_H__ */
82 
Definition: power_api.h:34
const unsigned p_dev2
Definition: power_api.h:48
struct _ROM ROM
struct _PWRD PWRD
const unsigned p_dev1
Definition: power_api.h:47
const PWRD * pPWRD
Definition: power_api.h:43
const unsigned p_dev4
Definition: power_api.h:50
void(* set_power)(unsigned int cmd[], unsigned int resp[])
Definition: power_api.h:31
Definition: power_api.h:29
const unsigned p_cand
Definition: power_api.h:41
void(* set_pll)(unsigned int cmd[], unsigned int resp[])
Definition: power_api.h:30
const unsigned p_clib
Definition: power_api.h:40
const unsigned p_dev3
Definition: power_api.h:49
const unsigned p_usbd
Definition: power_api.h:38