Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
102:da0ca467f8b5
.

Who changed what in which revision?

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