A simple 128x32 graphical LCD program to quickstart with LCD on ARM mbed IoT Starter Kit. This requires mbed Applciation Shield with FRDM-K64F platform.

Dependencies:   C12832

Committer:
tushki7
Date:
Sun Apr 12 15:45:52 2015 +0000
Revision:
1:eb68c94a8ee5
Parent:
0:60d829a0353a
A simple 128x32 LCD program with ARM mbed IoT Starter Kit;

Who changed what in which revision?

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