2 * @brief Register File registers and control functions
\r
5 * Copyright(C) NXP Semiconductors, 2012
\r
6 * All rights reserved.
\r
9 * Software that is described herein is for illustrative purposes only
\r
10 * which provides customers with programming information regarding the
\r
11 * LPC products. This software is supplied "AS IS" without any warranties of
\r
12 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
13 * all warranties, express or implied, including all implied warranties of
\r
14 * merchantability, fitness for a particular purpose and non-infringement of
\r
15 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
16 * or liability for the use of the software, conveys no license or rights under any
\r
17 * patent, copyright, mask work right, or any other intellectual property rights in
\r
18 * or to any products. NXP Semiconductors reserves the right to make changes
\r
19 * in the software without notification. NXP Semiconductors also makes no
\r
20 * representation or warranty that such application will be suitable for the
\r
21 * specified use without further testing or modification.
\r
24 * Permission to use, copy, modify, and distribute this software and its
\r
25 * documentation is hereby granted, under NXP Semiconductors' and its
\r
26 * licensor's relevant copyrights in the software, without fee, provided that it
\r
27 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
28 * copyright, permission, and disclaimer notice must appear in all copies of
\r
32 #ifndef __REGFILE_001_H_
\r
33 #define __REGFILE_001_H_
\r
35 #include "sys_config.h"
\r
42 /** @defgroup IP_REGFILE_001 IP: REGFILE register block and driver
\r
43 * @ingroup IP_Drivers
\r
49 * @brief Register File register block structure
\r
52 #if defined(CHIP_LPC18XX)|| defined(CHIP_LPC43XX)
\r
53 __IO uint32_t REGFILE[64]; /*!< General purpose storage register */
\r
54 #elif defined(CHIP_LPC175X_6X)|| defined(CHIP_LPC177X_8X) || defined(CHIP_LPC407X_8X)
\r
55 __IO uint32_t REGFILE[5]; /*!< General purpose storage register */
\r
60 * @brief Write value to General purpose registers
\r
61 * @param pREG : Pointer to regfile block
\r
62 * @param index : General purpose register index
\r
63 * @param value : Value to write
\r
65 * @note These General purpose registers can be used to store important
\r
66 * information when the main power supply is off. The value in these
\r
67 * registers is not affected by chip reset. These registers are usually
\r
68 * powered in the RTC power domain.
\r
70 STATIC INLINE void IP_REGFILE_Write(IP_REGFILE_001_T *pREG, int index, uint32_t value)
\r
72 pREG->REGFILE[index] = value;
\r
76 * @brief Read value from General purpose registers
\r
77 * @param pREG : Pointer to regfile block
\r
78 * @param index : General purpose register index
\r
79 * @return Read value
\r
80 * @note These General purpose registers can be used to store important
\r
81 * information when the main power supply is off. The value in these
\r
82 * registers is not affected by chip reset. These registers are usually
\r
83 * powered in the RTC power domain.
\r
85 STATIC INLINE uint32_t IP_REGFILE_Read(IP_REGFILE_001_T *pREG, int index)
\r
87 return pREG->REGFILE[index];
\r
98 #endif /* __REGFILE_001_H_ */
\r