mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

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

Who changed what in which revision?

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