mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

Committer:
yusuke_kyo
Date:
Wed Apr 08 08:04:18 2015 +0000
Revision:
98:01a414ca7d6d
Parent:
81:7d30d6019079
remove SerialHalfDuplex.h

Who changed what in which revision?

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