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.
mbed/TARGET_RZ_A1H/pl310.h@0:60d829a0353a, 2015-04-11 (annotated)
- Committer:
- tushki7
- Date:
- Sat Apr 11 04:08:13 2015 +0000
- Revision:
- 0:60d829a0353a
A simple 128x32 LCD program to quickstart with LCD on ARM mbed IoT Starter kit. Mbed Application Shield is required if using FRDM-K64F platform.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tushki7 | 0:60d829a0353a | 1 | /**************************************************************************//** |
tushki7 | 0:60d829a0353a | 2 | * @file pl310.h |
tushki7 | 0:60d829a0353a | 3 | * @brief Implementation of pl310 functions |
tushki7 | 0:60d829a0353a | 4 | * @version |
tushki7 | 0:60d829a0353a | 5 | * @date 11 June 2013 |
tushki7 | 0:60d829a0353a | 6 | * |
tushki7 | 0:60d829a0353a | 7 | * @note |
tushki7 | 0:60d829a0353a | 8 | * |
tushki7 | 0:60d829a0353a | 9 | ******************************************************************************/ |
tushki7 | 0:60d829a0353a | 10 | /* Copyright (c) 2011 - 2013 ARM LIMITED |
tushki7 | 0:60d829a0353a | 11 | |
tushki7 | 0:60d829a0353a | 12 | All rights reserved. |
tushki7 | 0:60d829a0353a | 13 | Redistribution and use in source and binary forms, with or without |
tushki7 | 0:60d829a0353a | 14 | modification, are permitted provided that the following conditions are met: |
tushki7 | 0:60d829a0353a | 15 | - Redistributions of source code must retain the above copyright |
tushki7 | 0:60d829a0353a | 16 | notice, this list of conditions and the following disclaimer. |
tushki7 | 0:60d829a0353a | 17 | - Redistributions in binary form must reproduce the above copyright |
tushki7 | 0:60d829a0353a | 18 | notice, this list of conditions and the following disclaimer in the |
tushki7 | 0:60d829a0353a | 19 | documentation and/or other materials provided with the distribution. |
tushki7 | 0:60d829a0353a | 20 | - Neither the name of ARM nor the names of its contributors may be used |
tushki7 | 0:60d829a0353a | 21 | to endorse or promote products derived from this software without |
tushki7 | 0:60d829a0353a | 22 | specific prior written permission. |
tushki7 | 0:60d829a0353a | 23 | * |
tushki7 | 0:60d829a0353a | 24 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
tushki7 | 0:60d829a0353a | 25 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
tushki7 | 0:60d829a0353a | 26 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
tushki7 | 0:60d829a0353a | 27 | ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE |
tushki7 | 0:60d829a0353a | 28 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
tushki7 | 0:60d829a0353a | 29 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
tushki7 | 0:60d829a0353a | 30 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
tushki7 | 0:60d829a0353a | 31 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
tushki7 | 0:60d829a0353a | 32 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
tushki7 | 0:60d829a0353a | 33 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
tushki7 | 0:60d829a0353a | 34 | POSSIBILITY OF SUCH DAMAGE. |
tushki7 | 0:60d829a0353a | 35 | ---------------------------------------------------------------------------*/ |
tushki7 | 0:60d829a0353a | 36 | |
tushki7 | 0:60d829a0353a | 37 | #ifndef __PL310 |
tushki7 | 0:60d829a0353a | 38 | #define __PL310 |
tushki7 | 0:60d829a0353a | 39 | |
tushki7 | 0:60d829a0353a | 40 | typedef struct |
tushki7 | 0:60d829a0353a | 41 | { |
tushki7 | 0:60d829a0353a | 42 | __I uint32_t CACHE_ID; /*!< Offset: 0x0000 Cache ID Register */ |
tushki7 | 0:60d829a0353a | 43 | __I uint32_t CACHE_TYPE; /*!< Offset: 0x0004 Cache Type Register */ |
tushki7 | 0:60d829a0353a | 44 | uint32_t RESERVED0[0x3e]; |
tushki7 | 0:60d829a0353a | 45 | __IO uint32_t CONTROL; /*!< Offset: 0x0100 Control Register */ |
tushki7 | 0:60d829a0353a | 46 | __IO uint32_t AUX_CNT; /*!< Offset: 0x0104 Auxiliary Control */ |
tushki7 | 0:60d829a0353a | 47 | uint32_t RESERVED1[0x3e]; |
tushki7 | 0:60d829a0353a | 48 | __IO uint32_t EVENT_CONTROL; /*!< Offset: 0x0200 Event Counter Control */ |
tushki7 | 0:60d829a0353a | 49 | __IO uint32_t EVENT_COUNTER1_CONF; /*!< Offset: 0x0204 Event Counter 1 Configuration */ |
tushki7 | 0:60d829a0353a | 50 | __IO uint32_t EVENT_COUNTER0_CONF; /*!< Offset: 0x0208 Event Counter 1 Configuration */ |
tushki7 | 0:60d829a0353a | 51 | uint32_t RESERVED2[0x2]; |
tushki7 | 0:60d829a0353a | 52 | __IO uint32_t INTERRUPT_MASK; /*!< Offset: 0x0214 Interrupt Mask */ |
tushki7 | 0:60d829a0353a | 53 | __I uint32_t MASKED_INT_STATUS; /*!< Offset: 0x0218 Masked Interrupt Status */ |
tushki7 | 0:60d829a0353a | 54 | __I uint32_t RAW_INT_STATUS; /*!< Offset: 0x021c Raw Interrupt Status */ |
tushki7 | 0:60d829a0353a | 55 | __O uint32_t INTERRUPT_CLEAR; /*!< Offset: 0x0220 Interrupt Clear */ |
tushki7 | 0:60d829a0353a | 56 | uint32_t RESERVED3[0x143]; |
tushki7 | 0:60d829a0353a | 57 | __IO uint32_t CACHE_SYNC; /*!< Offset: 0x0730 Cache Sync */ |
tushki7 | 0:60d829a0353a | 58 | uint32_t RESERVED4[0xf]; |
tushki7 | 0:60d829a0353a | 59 | __IO uint32_t INV_LINE_PA; /*!< Offset: 0x0770 Invalidate Line By PA */ |
tushki7 | 0:60d829a0353a | 60 | uint32_t RESERVED6[2]; |
tushki7 | 0:60d829a0353a | 61 | __IO uint32_t INV_WAY; /*!< Offset: 0x077c Invalidate by Way */ |
tushki7 | 0:60d829a0353a | 62 | uint32_t RESERVED5[0xc]; |
tushki7 | 0:60d829a0353a | 63 | __IO uint32_t CLEAN_LINE_PA; /*!< Offset: 0x07b0 Clean Line by PA */ |
tushki7 | 0:60d829a0353a | 64 | uint32_t RESERVED7[1]; |
tushki7 | 0:60d829a0353a | 65 | __IO uint32_t CLEAN_LINE_INDEX_WAY; /*!< Offset: 0x07b8 Clean Line by Index/Way */ |
tushki7 | 0:60d829a0353a | 66 | __IO uint32_t CLEAN_WAY; /*!< Offset: 0x07bc Clean by Way */ |
tushki7 | 0:60d829a0353a | 67 | uint32_t RESERVED8[0xc]; |
tushki7 | 0:60d829a0353a | 68 | __IO uint32_t CLEAN_INV_LINE_PA; /*!< Offset: 0x07f0 Clean and Invalidate Line by PA */ |
tushki7 | 0:60d829a0353a | 69 | uint32_t RESERVED9[1]; |
tushki7 | 0:60d829a0353a | 70 | __IO uint32_t CLEAN_INV_LINE_INDEX_WAY; /*!< Offset: 0x07f8 Clean and Invalidate Line by Index/Way */ |
tushki7 | 0:60d829a0353a | 71 | __IO uint32_t CLEAN_INV_WAY; /*!< Offset: 0x07fc Clean and Invalidate by Way */ |
tushki7 | 0:60d829a0353a | 72 | uint32_t RESERVED10[0x40]; |
tushki7 | 0:60d829a0353a | 73 | __IO uint32_t DATA_LOCK_0_WAY; /*!< Offset: 0x0900 Data Lockdown 0 by Way */ |
tushki7 | 0:60d829a0353a | 74 | __IO uint32_t INST_LOCK_0_WAY; /*!< Offset: 0x0904 Instruction Lockdown 0 by Way */ |
tushki7 | 0:60d829a0353a | 75 | __IO uint32_t DATA_LOCK_1_WAY; /*!< Offset: 0x0908 Data Lockdown 1 by Way */ |
tushki7 | 0:60d829a0353a | 76 | __IO uint32_t INST_LOCK_1_WAY; /*!< Offset: 0x090c Instruction Lockdown 1 by Way */ |
tushki7 | 0:60d829a0353a | 77 | __IO uint32_t DATA_LOCK_2_WAY; /*!< Offset: 0x0910 Data Lockdown 2 by Way */ |
tushki7 | 0:60d829a0353a | 78 | __IO uint32_t INST_LOCK_2_WAY; /*!< Offset: 0x0914 Instruction Lockdown 2 by Way */ |
tushki7 | 0:60d829a0353a | 79 | __IO uint32_t DATA_LOCK_3_WAY; /*!< Offset: 0x0918 Data Lockdown 3 by Way */ |
tushki7 | 0:60d829a0353a | 80 | __IO uint32_t INST_LOCK_3_WAY; /*!< Offset: 0x091c Instruction Lockdown 3 by Way */ |
tushki7 | 0:60d829a0353a | 81 | __IO uint32_t DATA_LOCK_4_WAY; /*!< Offset: 0x0920 Data Lockdown 4 by Way */ |
tushki7 | 0:60d829a0353a | 82 | __IO uint32_t INST_LOCK_4_WAY; /*!< Offset: 0x0924 Instruction Lockdown 4 by Way */ |
tushki7 | 0:60d829a0353a | 83 | __IO uint32_t DATA_LOCK_5_WAY; /*!< Offset: 0x0928 Data Lockdown 5 by Way */ |
tushki7 | 0:60d829a0353a | 84 | __IO uint32_t INST_LOCK_5_WAY; /*!< Offset: 0x092c Instruction Lockdown 5 by Way */ |
tushki7 | 0:60d829a0353a | 85 | __IO uint32_t DATA_LOCK_6_WAY; /*!< Offset: 0x0930 Data Lockdown 5 by Way */ |
tushki7 | 0:60d829a0353a | 86 | __IO uint32_t INST_LOCK_6_WAY; /*!< Offset: 0x0934 Instruction Lockdown 5 by Way */ |
tushki7 | 0:60d829a0353a | 87 | __IO uint32_t DATA_LOCK_7_WAY; /*!< Offset: 0x0938 Data Lockdown 6 by Way */ |
tushki7 | 0:60d829a0353a | 88 | __IO uint32_t INST_LOCK_7_WAY; /*!< Offset: 0x093c Instruction Lockdown 6 by Way */ |
tushki7 | 0:60d829a0353a | 89 | uint32_t RESERVED11[0x4]; |
tushki7 | 0:60d829a0353a | 90 | __IO uint32_t LOCK_LINE_EN; /*!< Offset: 0x0950 Lockdown by Line Enable */ |
tushki7 | 0:60d829a0353a | 91 | __IO uint32_t UNLOCK_ALL_BY_WAY; /*!< Offset: 0x0954 Unlock All Lines by Way */ |
tushki7 | 0:60d829a0353a | 92 | uint32_t RESERVED12[0xaa]; |
tushki7 | 0:60d829a0353a | 93 | __IO uint32_t ADDRESS_FILTER_START; /*!< Offset: 0x0c00 Address Filtering Start */ |
tushki7 | 0:60d829a0353a | 94 | __IO uint32_t ADDRESS_FILTER_END; /*!< Offset: 0x0c04 Address Filtering End */ |
tushki7 | 0:60d829a0353a | 95 | uint32_t RESERVED13[0xce]; |
tushki7 | 0:60d829a0353a | 96 | __IO uint32_t DEBUG_CONTROL; /*!< Offset: 0x0f40 Debug Control Register */ |
tushki7 | 0:60d829a0353a | 97 | |
tushki7 | 0:60d829a0353a | 98 | } PL310_TypeDef; |
tushki7 | 0:60d829a0353a | 99 | |
tushki7 | 0:60d829a0353a | 100 | #define PL310 ((PL310_TypeDef *)Renesas_RZ_A1_PL310_BASE) /*!< PL310 Declaration */ |
tushki7 | 0:60d829a0353a | 101 | |
tushki7 | 0:60d829a0353a | 102 | extern int PL310_GetID (void); |
tushki7 | 0:60d829a0353a | 103 | extern int PL310_GetType (void); |
tushki7 | 0:60d829a0353a | 104 | extern void PL310_InvAllByWay (void); |
tushki7 | 0:60d829a0353a | 105 | extern void PL310_CleanInvAllByWay(void); |
tushki7 | 0:60d829a0353a | 106 | extern void PL310_Enable(void); |
tushki7 | 0:60d829a0353a | 107 | extern void PL310_Disable(void); |
tushki7 | 0:60d829a0353a | 108 | extern void PL310_InvPa (void *); |
tushki7 | 0:60d829a0353a | 109 | extern void PL310_CleanPa (void *); |
tushki7 | 0:60d829a0353a | 110 | extern void PL310_CleanInvPa (void *); |
tushki7 | 0:60d829a0353a | 111 | |
tushki7 | 0:60d829a0353a | 112 | #endif |
tushki7 | 0:60d829a0353a | 113 | |
tushki7 | 0:60d829a0353a | 114 |