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 * @brief LPC43xx/LPC18xx mcu header
tushki7 0:60d829a0353a 3 *
tushki7 0:60d829a0353a 4 * Copyright(C) NXP Semiconductors, 2012
tushki7 0:60d829a0353a 5 * All rights reserved.
tushki7 0:60d829a0353a 6 *
tushki7 0:60d829a0353a 7 * Software that is described herein is for illustrative purposes only
tushki7 0:60d829a0353a 8 * which provides customers with programming information regarding the
tushki7 0:60d829a0353a 9 * LPC products. This software is supplied "AS IS" without any warranties of
tushki7 0:60d829a0353a 10 * any kind, and NXP Semiconductors and its licensor disclaim any and
tushki7 0:60d829a0353a 11 * all warranties, express or implied, including all implied warranties of
tushki7 0:60d829a0353a 12 * merchantability, fitness for a particular purpose and non-infringement of
tushki7 0:60d829a0353a 13 * intellectual property rights. NXP Semiconductors assumes no responsibility
tushki7 0:60d829a0353a 14 * or liability for the use of the software, conveys no license or rights under any
tushki7 0:60d829a0353a 15 * patent, copyright, mask work right, or any other intellectual property rights in
tushki7 0:60d829a0353a 16 * or to any products. NXP Semiconductors reserves the right to make changes
tushki7 0:60d829a0353a 17 * in the software without notification. NXP Semiconductors also makes no
tushki7 0:60d829a0353a 18 * representation or warranty that such application will be suitable for the
tushki7 0:60d829a0353a 19 * specified use without further testing or modification.
tushki7 0:60d829a0353a 20 *
tushki7 0:60d829a0353a 21 * Permission to use, copy, modify, and distribute this software and its
tushki7 0:60d829a0353a 22 * documentation is hereby granted, under NXP Semiconductors' and its
tushki7 0:60d829a0353a 23 * licensor's relevant copyrights in the software, without fee, provided that it
tushki7 0:60d829a0353a 24 * is used in conjunction with NXP Semiconductors microcontrollers. This
tushki7 0:60d829a0353a 25 * copyright, permission, and disclaimer notice must appear in all copies of
tushki7 0:60d829a0353a 26 * this code.
tushki7 0:60d829a0353a 27 */
tushki7 0:60d829a0353a 28
tushki7 0:60d829a0353a 29 #ifndef __SYSTEM_LPC43XX_H
tushki7 0:60d829a0353a 30 #define __SYSTEM_LPC43XX_H
tushki7 0:60d829a0353a 31
tushki7 0:60d829a0353a 32 #ifdef __cplusplus
tushki7 0:60d829a0353a 33 extern "C" {
tushki7 0:60d829a0353a 34 #endif
tushki7 0:60d829a0353a 35
tushki7 0:60d829a0353a 36 /* System initialization options */
tushki7 0:60d829a0353a 37 #define PIN_SETUP 1 /* Configure pins during initialization */
tushki7 0:60d829a0353a 38 #define CLOCK_SETUP 1 /* Configure clocks during initialization */
tushki7 0:60d829a0353a 39 #define MEMORY_SETUP 0 /* Configure external memory during init */
tushki7 0:60d829a0353a 40 #define SPIFI_INIT 1 /* Initialize SPIFI */
tushki7 0:60d829a0353a 41
tushki7 0:60d829a0353a 42 /* Crystal frequency into device */
tushki7 0:60d829a0353a 43 #define CRYSTAL_MAIN_FREQ_IN 12000000
tushki7 0:60d829a0353a 44
tushki7 0:60d829a0353a 45 /* Crystal frequency into device for RTC/32K input */
tushki7 0:60d829a0353a 46 #define CRYSTAL_32K_FREQ_IN 32768
tushki7 0:60d829a0353a 47
tushki7 0:60d829a0353a 48 /* Default CPU clock frequency */
tushki7 0:60d829a0353a 49 #if defined(CHIP_LPC43XX)
tushki7 0:60d829a0353a 50 #define MAX_CLOCK_FREQ (204000000)
tushki7 0:60d829a0353a 51 #else
tushki7 0:60d829a0353a 52 #define MAX_CLOCK_FREQ (180000000)
tushki7 0:60d829a0353a 53 #endif
tushki7 0:60d829a0353a 54
tushki7 0:60d829a0353a 55 #if defined(__FPU_PRESENT) && __FPU_PRESENT == 1
tushki7 0:60d829a0353a 56 /* FPU declarations */
tushki7 0:60d829a0353a 57 #define LPC_CPACR 0xE000ED88
tushki7 0:60d829a0353a 58
tushki7 0:60d829a0353a 59 #define SCB_MVFR0 0xE000EF40
tushki7 0:60d829a0353a 60 #define SCB_MVFR0_RESET 0x10110021
tushki7 0:60d829a0353a 61
tushki7 0:60d829a0353a 62 #define SCB_MVFR1 0xE000EF44
tushki7 0:60d829a0353a 63 #define SCB_MVFR1_RESET 0x11000011
tushki7 0:60d829a0353a 64
tushki7 0:60d829a0353a 65 #if defined(__ARMCC_VERSION)
tushki7 0:60d829a0353a 66 void fpuInit(void) __attribute__ ((section("BOOTSTRAP_CODE")));
tushki7 0:60d829a0353a 67 #else
tushki7 0:60d829a0353a 68 extern void fpuInit(void);
tushki7 0:60d829a0353a 69 #endif
tushki7 0:60d829a0353a 70 #endif
tushki7 0:60d829a0353a 71
tushki7 0:60d829a0353a 72 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
tushki7 0:60d829a0353a 73
tushki7 0:60d829a0353a 74 /**
tushki7 0:60d829a0353a 75 * Initialize the system
tushki7 0:60d829a0353a 76 *
tushki7 0:60d829a0353a 77 * @param none
tushki7 0:60d829a0353a 78 * @return none
tushki7 0:60d829a0353a 79 *
tushki7 0:60d829a0353a 80 * @brief Setup the microcontroller system.
tushki7 0:60d829a0353a 81 * Initialize the System and update the SystemCoreClock variable.
tushki7 0:60d829a0353a 82 */
tushki7 0:60d829a0353a 83 extern void SystemInit (void);
tushki7 0:60d829a0353a 84 extern void SystemCoreClockUpdate(void);
tushki7 0:60d829a0353a 85
tushki7 0:60d829a0353a 86 #ifdef __cplusplus
tushki7 0:60d829a0353a 87 }
tushki7 0:60d829a0353a 88 #endif
tushki7 0:60d829a0353a 89
tushki7 0:60d829a0353a 90 #endif /* __SYSTEM_LPC43XX_H */