パラメータを適応変化させる事により圧縮率を向上させた動的ライス・ゴロム符号を利用した可逆圧縮方式。圧縮ソフト、圧縮率のMATLABシミュレーションは詳細はInterface誌2011年8月号に掲載されるRX62Nマイコン連動特集にて掲載予定。
I2S_Example/lpc17xx_pinsel.h@0:d920d64db582, 2011-03-30 (annotated)
- Committer:
- lynxeyed_atsu
- Date:
- Wed Mar 30 06:05:24 2011 +0000
- Revision:
- 0:d920d64db582
alpha
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lynxeyed_atsu | 0:d920d64db582 | 1 | /***********************************************************************//** |
lynxeyed_atsu | 0:d920d64db582 | 2 | * @file lpc17xx_pinsel.h |
lynxeyed_atsu | 0:d920d64db582 | 3 | * @brief Contains all macro definitions and function prototypes |
lynxeyed_atsu | 0:d920d64db582 | 4 | * support for Pin connect block firmware library on LPC17xx |
lynxeyed_atsu | 0:d920d64db582 | 5 | * @version 2.0 |
lynxeyed_atsu | 0:d920d64db582 | 6 | * @date 21. May. 2010 |
lynxeyed_atsu | 0:d920d64db582 | 7 | * @author NXP MCU SW Application Team |
lynxeyed_atsu | 0:d920d64db582 | 8 | ************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 9 | * Software that is described herein is for illustrative purposes only |
lynxeyed_atsu | 0:d920d64db582 | 10 | * which provides customers with programming information regarding the |
lynxeyed_atsu | 0:d920d64db582 | 11 | * products. This software is supplied "AS IS" without any warranties. |
lynxeyed_atsu | 0:d920d64db582 | 12 | * NXP Semiconductors assumes no responsibility or liability for the |
lynxeyed_atsu | 0:d920d64db582 | 13 | * use of the software, conveys no license or title under any patent, |
lynxeyed_atsu | 0:d920d64db582 | 14 | * copyright, or mask work right to the product. NXP Semiconductors |
lynxeyed_atsu | 0:d920d64db582 | 15 | * reserves the right to make changes in the software without |
lynxeyed_atsu | 0:d920d64db582 | 16 | * notification. NXP Semiconductors also make no representation or |
lynxeyed_atsu | 0:d920d64db582 | 17 | * warranty that such application will be suitable for the specified |
lynxeyed_atsu | 0:d920d64db582 | 18 | * use without further testing or modification. |
lynxeyed_atsu | 0:d920d64db582 | 19 | **************************************************************************/ |
lynxeyed_atsu | 0:d920d64db582 | 20 | |
lynxeyed_atsu | 0:d920d64db582 | 21 | /* Peripheral group ----------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 22 | /** @defgroup PINSEL PINSEL |
lynxeyed_atsu | 0:d920d64db582 | 23 | * @ingroup LPC1700CMSIS_FwLib_Drivers |
lynxeyed_atsu | 0:d920d64db582 | 24 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 25 | */ |
lynxeyed_atsu | 0:d920d64db582 | 26 | |
lynxeyed_atsu | 0:d920d64db582 | 27 | #ifndef LPC17XX_PINSEL_H_ |
lynxeyed_atsu | 0:d920d64db582 | 28 | #define LPC17XX_PINSEL_H_ |
lynxeyed_atsu | 0:d920d64db582 | 29 | |
lynxeyed_atsu | 0:d920d64db582 | 30 | /* Includes ------------------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 31 | #include "LPC17xx.h" |
lynxeyed_atsu | 0:d920d64db582 | 32 | #include "lpc_types.h" |
lynxeyed_atsu | 0:d920d64db582 | 33 | |
lynxeyed_atsu | 0:d920d64db582 | 34 | #ifdef __cplusplus |
lynxeyed_atsu | 0:d920d64db582 | 35 | extern "C" |
lynxeyed_atsu | 0:d920d64db582 | 36 | { |
lynxeyed_atsu | 0:d920d64db582 | 37 | #endif |
lynxeyed_atsu | 0:d920d64db582 | 38 | |
lynxeyed_atsu | 0:d920d64db582 | 39 | /* Public Macros -------------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 40 | /** @defgroup PINSEL_Public_Macros PINSEL Public Macros |
lynxeyed_atsu | 0:d920d64db582 | 41 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 42 | */ |
lynxeyed_atsu | 0:d920d64db582 | 43 | |
lynxeyed_atsu | 0:d920d64db582 | 44 | /*********************************************************************//** |
lynxeyed_atsu | 0:d920d64db582 | 45 | *!< Macros define for PORT Selection |
lynxeyed_atsu | 0:d920d64db582 | 46 | ***********************************************************************/ |
lynxeyed_atsu | 0:d920d64db582 | 47 | #define PINSEL_PORT_0 ((0)) /**< PORT 0*/ |
lynxeyed_atsu | 0:d920d64db582 | 48 | #define PINSEL_PORT_1 ((1)) /**< PORT 1*/ |
lynxeyed_atsu | 0:d920d64db582 | 49 | #define PINSEL_PORT_2 ((2)) /**< PORT 2*/ |
lynxeyed_atsu | 0:d920d64db582 | 50 | #define PINSEL_PORT_3 ((3)) /**< PORT 3*/ |
lynxeyed_atsu | 0:d920d64db582 | 51 | #define PINSEL_PORT_4 ((4)) /**< PORT 4*/ |
lynxeyed_atsu | 0:d920d64db582 | 52 | |
lynxeyed_atsu | 0:d920d64db582 | 53 | /*********************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 54 | * Macros define for Pin Function selection |
lynxeyed_atsu | 0:d920d64db582 | 55 | **********************************************************************/ |
lynxeyed_atsu | 0:d920d64db582 | 56 | #define PINSEL_FUNC_0 ((0)) /**< default function*/ |
lynxeyed_atsu | 0:d920d64db582 | 57 | #define PINSEL_FUNC_1 ((1)) /**< first alternate function*/ |
lynxeyed_atsu | 0:d920d64db582 | 58 | #define PINSEL_FUNC_2 ((2)) /**< second alternate function*/ |
lynxeyed_atsu | 0:d920d64db582 | 59 | #define PINSEL_FUNC_3 ((3)) /**< third or reserved alternate function*/ |
lynxeyed_atsu | 0:d920d64db582 | 60 | |
lynxeyed_atsu | 0:d920d64db582 | 61 | /*********************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 62 | * Macros define for Pin Number of Port |
lynxeyed_atsu | 0:d920d64db582 | 63 | **********************************************************************/ |
lynxeyed_atsu | 0:d920d64db582 | 64 | #define PINSEL_PIN_0 ((0)) /**< Pin 0 */ |
lynxeyed_atsu | 0:d920d64db582 | 65 | #define PINSEL_PIN_1 ((1)) /**< Pin 1 */ |
lynxeyed_atsu | 0:d920d64db582 | 66 | #define PINSEL_PIN_2 ((2)) /**< Pin 2 */ |
lynxeyed_atsu | 0:d920d64db582 | 67 | #define PINSEL_PIN_3 ((3)) /**< Pin 3 */ |
lynxeyed_atsu | 0:d920d64db582 | 68 | #define PINSEL_PIN_4 ((4)) /**< Pin 4 */ |
lynxeyed_atsu | 0:d920d64db582 | 69 | #define PINSEL_PIN_5 ((5)) /**< Pin 5 */ |
lynxeyed_atsu | 0:d920d64db582 | 70 | #define PINSEL_PIN_6 ((6)) /**< Pin 6 */ |
lynxeyed_atsu | 0:d920d64db582 | 71 | #define PINSEL_PIN_7 ((7)) /**< Pin 7 */ |
lynxeyed_atsu | 0:d920d64db582 | 72 | #define PINSEL_PIN_8 ((8)) /**< Pin 8 */ |
lynxeyed_atsu | 0:d920d64db582 | 73 | #define PINSEL_PIN_9 ((9)) /**< Pin 9 */ |
lynxeyed_atsu | 0:d920d64db582 | 74 | #define PINSEL_PIN_10 ((10)) /**< Pin 10 */ |
lynxeyed_atsu | 0:d920d64db582 | 75 | #define PINSEL_PIN_11 ((11)) /**< Pin 11 */ |
lynxeyed_atsu | 0:d920d64db582 | 76 | #define PINSEL_PIN_12 ((12)) /**< Pin 12 */ |
lynxeyed_atsu | 0:d920d64db582 | 77 | #define PINSEL_PIN_13 ((13)) /**< Pin 13 */ |
lynxeyed_atsu | 0:d920d64db582 | 78 | #define PINSEL_PIN_14 ((14)) /**< Pin 14 */ |
lynxeyed_atsu | 0:d920d64db582 | 79 | #define PINSEL_PIN_15 ((15)) /**< Pin 15 */ |
lynxeyed_atsu | 0:d920d64db582 | 80 | #define PINSEL_PIN_16 ((16)) /**< Pin 16 */ |
lynxeyed_atsu | 0:d920d64db582 | 81 | #define PINSEL_PIN_17 ((17)) /**< Pin 17 */ |
lynxeyed_atsu | 0:d920d64db582 | 82 | #define PINSEL_PIN_18 ((18)) /**< Pin 18 */ |
lynxeyed_atsu | 0:d920d64db582 | 83 | #define PINSEL_PIN_19 ((19)) /**< Pin 19 */ |
lynxeyed_atsu | 0:d920d64db582 | 84 | #define PINSEL_PIN_20 ((20)) /**< Pin 20 */ |
lynxeyed_atsu | 0:d920d64db582 | 85 | #define PINSEL_PIN_21 ((21)) /**< Pin 21 */ |
lynxeyed_atsu | 0:d920d64db582 | 86 | #define PINSEL_PIN_22 ((22)) /**< Pin 22 */ |
lynxeyed_atsu | 0:d920d64db582 | 87 | #define PINSEL_PIN_23 ((23)) /**< Pin 23 */ |
lynxeyed_atsu | 0:d920d64db582 | 88 | #define PINSEL_PIN_24 ((24)) /**< Pin 24 */ |
lynxeyed_atsu | 0:d920d64db582 | 89 | #define PINSEL_PIN_25 ((25)) /**< Pin 25 */ |
lynxeyed_atsu | 0:d920d64db582 | 90 | #define PINSEL_PIN_26 ((26)) /**< Pin 26 */ |
lynxeyed_atsu | 0:d920d64db582 | 91 | #define PINSEL_PIN_27 ((27)) /**< Pin 27 */ |
lynxeyed_atsu | 0:d920d64db582 | 92 | #define PINSEL_PIN_28 ((28)) /**< Pin 28 */ |
lynxeyed_atsu | 0:d920d64db582 | 93 | #define PINSEL_PIN_29 ((29)) /**< Pin 29 */ |
lynxeyed_atsu | 0:d920d64db582 | 94 | #define PINSEL_PIN_30 ((30)) /**< Pin 30 */ |
lynxeyed_atsu | 0:d920d64db582 | 95 | #define PINSEL_PIN_31 ((31)) /**< Pin 31 */ |
lynxeyed_atsu | 0:d920d64db582 | 96 | |
lynxeyed_atsu | 0:d920d64db582 | 97 | /*********************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 98 | * Macros define for Pin mode |
lynxeyed_atsu | 0:d920d64db582 | 99 | **********************************************************************/ |
lynxeyed_atsu | 0:d920d64db582 | 100 | #define PINSEL_PINMODE_PULLUP ((0)) /**< Internal pull-up resistor*/ |
lynxeyed_atsu | 0:d920d64db582 | 101 | #define PINSEL_PINMODE_TRISTATE ((2)) /**< Tri-state */ |
lynxeyed_atsu | 0:d920d64db582 | 102 | #define PINSEL_PINMODE_PULLDOWN ((3)) /**< Internal pull-down resistor */ |
lynxeyed_atsu | 0:d920d64db582 | 103 | |
lynxeyed_atsu | 0:d920d64db582 | 104 | /*********************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 105 | * Macros define for Pin mode (normal/open drain) |
lynxeyed_atsu | 0:d920d64db582 | 106 | **********************************************************************/ |
lynxeyed_atsu | 0:d920d64db582 | 107 | #define PINSEL_PINMODE_NORMAL ((0)) /**< Pin is in the normal (not open drain) mode.*/ |
lynxeyed_atsu | 0:d920d64db582 | 108 | #define PINSEL_PINMODE_OPENDRAIN ((1)) /**< Pin is in the open drain mode */ |
lynxeyed_atsu | 0:d920d64db582 | 109 | |
lynxeyed_atsu | 0:d920d64db582 | 110 | /*********************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 111 | * Macros define for I2C mode |
lynxeyed_atsu | 0:d920d64db582 | 112 | ***********************************************************************/ |
lynxeyed_atsu | 0:d920d64db582 | 113 | #define PINSEL_I2C_Normal_Mode ((0)) /**< The standard drive mode */ |
lynxeyed_atsu | 0:d920d64db582 | 114 | #define PINSEL_I2C_Fast_Mode ((1)) /**< Fast Mode Plus drive mode */ |
lynxeyed_atsu | 0:d920d64db582 | 115 | |
lynxeyed_atsu | 0:d920d64db582 | 116 | /** |
lynxeyed_atsu | 0:d920d64db582 | 117 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 118 | */ |
lynxeyed_atsu | 0:d920d64db582 | 119 | |
lynxeyed_atsu | 0:d920d64db582 | 120 | /* Private Macros ------------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 121 | /** @defgroup PINSEL_Private_Macros PINSEL Private Macros |
lynxeyed_atsu | 0:d920d64db582 | 122 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 123 | */ |
lynxeyed_atsu | 0:d920d64db582 | 124 | |
lynxeyed_atsu | 0:d920d64db582 | 125 | /* Pin selection define */ |
lynxeyed_atsu | 0:d920d64db582 | 126 | /* I2C Pin Configuration register bit description */ |
lynxeyed_atsu | 0:d920d64db582 | 127 | #define PINSEL_I2CPADCFG_SDADRV0 _BIT(0) /**< Drive mode control for the SDA0 pin, P0.27 */ |
lynxeyed_atsu | 0:d920d64db582 | 128 | #define PINSEL_I2CPADCFG_SDAI2C0 _BIT(1) /**< I2C mode control for the SDA0 pin, P0.27 */ |
lynxeyed_atsu | 0:d920d64db582 | 129 | #define PINSEL_I2CPADCFG_SCLDRV0 _BIT(2) /**< Drive mode control for the SCL0 pin, P0.28 */ |
lynxeyed_atsu | 0:d920d64db582 | 130 | #define PINSEL_I2CPADCFG_SCLI2C0 _BIT(3) /**< I2C mode control for the SCL0 pin, P0.28 */ |
lynxeyed_atsu | 0:d920d64db582 | 131 | |
lynxeyed_atsu | 0:d920d64db582 | 132 | /** |
lynxeyed_atsu | 0:d920d64db582 | 133 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 134 | */ |
lynxeyed_atsu | 0:d920d64db582 | 135 | |
lynxeyed_atsu | 0:d920d64db582 | 136 | |
lynxeyed_atsu | 0:d920d64db582 | 137 | /* Public Types --------------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 138 | /** @defgroup PINSEL_Public_Types PINSEL Public Types |
lynxeyed_atsu | 0:d920d64db582 | 139 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 140 | */ |
lynxeyed_atsu | 0:d920d64db582 | 141 | |
lynxeyed_atsu | 0:d920d64db582 | 142 | /** @brief Pin configuration structure */ |
lynxeyed_atsu | 0:d920d64db582 | 143 | typedef struct |
lynxeyed_atsu | 0:d920d64db582 | 144 | { |
lynxeyed_atsu | 0:d920d64db582 | 145 | uint8_t Portnum; /**< Port Number, should be PINSEL_PORT_x, |
lynxeyed_atsu | 0:d920d64db582 | 146 | where x should be in range from 0 to 4 */ |
lynxeyed_atsu | 0:d920d64db582 | 147 | uint8_t Pinnum; /**< Pin Number, should be PINSEL_PIN_x, |
lynxeyed_atsu | 0:d920d64db582 | 148 | where x should be in range from 0 to 31 */ |
lynxeyed_atsu | 0:d920d64db582 | 149 | uint8_t Funcnum; /**< Function Number, should be PINSEL_FUNC_x, |
lynxeyed_atsu | 0:d920d64db582 | 150 | where x should be in range from 0 to 3 */ |
lynxeyed_atsu | 0:d920d64db582 | 151 | uint8_t Pinmode; /**< Pin Mode, should be: |
lynxeyed_atsu | 0:d920d64db582 | 152 | - PINSEL_PINMODE_PULLUP: Internal pull-up resistor |
lynxeyed_atsu | 0:d920d64db582 | 153 | - PINSEL_PINMODE_TRISTATE: Tri-state |
lynxeyed_atsu | 0:d920d64db582 | 154 | - PINSEL_PINMODE_PULLDOWN: Internal pull-down resistor */ |
lynxeyed_atsu | 0:d920d64db582 | 155 | uint8_t OpenDrain; /**< OpenDrain mode, should be: |
lynxeyed_atsu | 0:d920d64db582 | 156 | - PINSEL_PINMODE_NORMAL: Pin is in the normal (not open drain) mode |
lynxeyed_atsu | 0:d920d64db582 | 157 | - PINSEL_PINMODE_OPENDRAIN: Pin is in the open drain mode */ |
lynxeyed_atsu | 0:d920d64db582 | 158 | } PINSEL_CFG_Type; |
lynxeyed_atsu | 0:d920d64db582 | 159 | |
lynxeyed_atsu | 0:d920d64db582 | 160 | /** |
lynxeyed_atsu | 0:d920d64db582 | 161 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 162 | */ |
lynxeyed_atsu | 0:d920d64db582 | 163 | |
lynxeyed_atsu | 0:d920d64db582 | 164 | |
lynxeyed_atsu | 0:d920d64db582 | 165 | /* Public Functions ----------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 166 | /** @defgroup PINSEL_Public_Functions PINSEL Public Functions |
lynxeyed_atsu | 0:d920d64db582 | 167 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 168 | */ |
lynxeyed_atsu | 0:d920d64db582 | 169 | |
lynxeyed_atsu | 0:d920d64db582 | 170 | void PINSEL_ConfigPin(PINSEL_CFG_Type *PinCfg); |
lynxeyed_atsu | 0:d920d64db582 | 171 | void PINSEL_ConfigTraceFunc (FunctionalState NewState); |
lynxeyed_atsu | 0:d920d64db582 | 172 | void PINSEL_SetI2C0Pins(uint8_t i2cPinMode, FunctionalState filterSlewRateEnable); |
lynxeyed_atsu | 0:d920d64db582 | 173 | |
lynxeyed_atsu | 0:d920d64db582 | 174 | |
lynxeyed_atsu | 0:d920d64db582 | 175 | /** |
lynxeyed_atsu | 0:d920d64db582 | 176 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 177 | */ |
lynxeyed_atsu | 0:d920d64db582 | 178 | |
lynxeyed_atsu | 0:d920d64db582 | 179 | |
lynxeyed_atsu | 0:d920d64db582 | 180 | #ifdef __cplusplus |
lynxeyed_atsu | 0:d920d64db582 | 181 | } |
lynxeyed_atsu | 0:d920d64db582 | 182 | #endif |
lynxeyed_atsu | 0:d920d64db582 | 183 | |
lynxeyed_atsu | 0:d920d64db582 | 184 | #endif /* LPC17XX_PINSEL_H_ */ |
lynxeyed_atsu | 0:d920d64db582 | 185 | |
lynxeyed_atsu | 0:d920d64db582 | 186 | /** |
lynxeyed_atsu | 0:d920d64db582 | 187 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 188 | */ |
lynxeyed_atsu | 0:d920d64db582 | 189 | |
lynxeyed_atsu | 0:d920d64db582 | 190 | /* --------------------------------- End Of File ------------------------------ */ |
lynxeyed_atsu | 0:d920d64db582 | 191 |