![](/media/cache/profiles/98c39996bf1543e974747a2549b3107c.50x50_q85.png)
パラメータを適応変化させる事により圧縮率を向上させた動的ライス・ゴロム符号を利用した可逆圧縮方式。圧縮ソフト、圧縮率のMATLABシミュレーションは詳細はInterface誌2011年8月号に掲載されるRX62Nマイコン連動特集にて掲載予定。
I2S_Example/lpc_types.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 lpc_types.h |
lynxeyed_atsu | 0:d920d64db582 | 3 | * @brief Contains the NXP ABL typedefs for C standard types. |
lynxeyed_atsu | 0:d920d64db582 | 4 | * It is intended to be used in ISO C conforming development |
lynxeyed_atsu | 0:d920d64db582 | 5 | * environments and checks for this insofar as it is possible |
lynxeyed_atsu | 0:d920d64db582 | 6 | * to do so. |
lynxeyed_atsu | 0:d920d64db582 | 7 | * @version 1.0 |
lynxeyed_atsu | 0:d920d64db582 | 8 | * @date 27 Jul. 2008 |
lynxeyed_atsu | 0:d920d64db582 | 9 | * @author wellsk |
lynxeyed_atsu | 0:d920d64db582 | 10 | ************************************************************************** |
lynxeyed_atsu | 0:d920d64db582 | 11 | * Software that is described herein is for illustrative purposes only |
lynxeyed_atsu | 0:d920d64db582 | 12 | * which provides customers with programming information regarding the |
lynxeyed_atsu | 0:d920d64db582 | 13 | * products. This software is supplied "AS IS" without any warranties. |
lynxeyed_atsu | 0:d920d64db582 | 14 | * NXP Semiconductors assumes no responsibility or liability for the |
lynxeyed_atsu | 0:d920d64db582 | 15 | * use of the software, conveys no license or title under any patent, |
lynxeyed_atsu | 0:d920d64db582 | 16 | * copyright, or mask work right to the product. NXP Semiconductors |
lynxeyed_atsu | 0:d920d64db582 | 17 | * reserves the right to make changes in the software without |
lynxeyed_atsu | 0:d920d64db582 | 18 | * notification. NXP Semiconductors also make no representation or |
lynxeyed_atsu | 0:d920d64db582 | 19 | * warranty that such application will be suitable for the specified |
lynxeyed_atsu | 0:d920d64db582 | 20 | * use without further testing or modification. |
lynxeyed_atsu | 0:d920d64db582 | 21 | **************************************************************************/ |
lynxeyed_atsu | 0:d920d64db582 | 22 | |
lynxeyed_atsu | 0:d920d64db582 | 23 | /* Type group ----------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 24 | /** @defgroup LPC_Types LPC_Types |
lynxeyed_atsu | 0:d920d64db582 | 25 | * @ingroup LPC1700CMSIS_FwLib_Drivers |
lynxeyed_atsu | 0:d920d64db582 | 26 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 27 | */ |
lynxeyed_atsu | 0:d920d64db582 | 28 | |
lynxeyed_atsu | 0:d920d64db582 | 29 | #ifndef LPC_TYPES_H |
lynxeyed_atsu | 0:d920d64db582 | 30 | #define LPC_TYPES_H |
lynxeyed_atsu | 0:d920d64db582 | 31 | |
lynxeyed_atsu | 0:d920d64db582 | 32 | /* Includes ------------------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 33 | #include <stdint.h> |
lynxeyed_atsu | 0:d920d64db582 | 34 | #include "mbed.h" |
lynxeyed_atsu | 0:d920d64db582 | 35 | |
lynxeyed_atsu | 0:d920d64db582 | 36 | |
lynxeyed_atsu | 0:d920d64db582 | 37 | /* Public Types --------------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 38 | /** @defgroup LPC_Types_Public_Types LPC_Types Public Types |
lynxeyed_atsu | 0:d920d64db582 | 39 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 40 | */ |
lynxeyed_atsu | 0:d920d64db582 | 41 | |
lynxeyed_atsu | 0:d920d64db582 | 42 | /** |
lynxeyed_atsu | 0:d920d64db582 | 43 | * @brief Boolean Type definition |
lynxeyed_atsu | 0:d920d64db582 | 44 | */ |
lynxeyed_atsu | 0:d920d64db582 | 45 | |
lynxeyed_atsu | 0:d920d64db582 | 46 | //typedef enum {FALSE = 0, TRUE = !FALSE} Bool; |
lynxeyed_atsu | 0:d920d64db582 | 47 | #ifndef Bool |
lynxeyed_atsu | 0:d920d64db582 | 48 | # define Bool int |
lynxeyed_atsu | 0:d920d64db582 | 49 | #endif |
lynxeyed_atsu | 0:d920d64db582 | 50 | #ifndef TRUE |
lynxeyed_atsu | 0:d920d64db582 | 51 | # define TRUE 1 |
lynxeyed_atsu | 0:d920d64db582 | 52 | #endif |
lynxeyed_atsu | 0:d920d64db582 | 53 | #ifndef FALSE |
lynxeyed_atsu | 0:d920d64db582 | 54 | # define FALSE 0 |
lynxeyed_atsu | 0:d920d64db582 | 55 | #endif |
lynxeyed_atsu | 0:d920d64db582 | 56 | |
lynxeyed_atsu | 0:d920d64db582 | 57 | /** |
lynxeyed_atsu | 0:d920d64db582 | 58 | * @brief Flag Status and Interrupt Flag Status type definition |
lynxeyed_atsu | 0:d920d64db582 | 59 | */ |
lynxeyed_atsu | 0:d920d64db582 | 60 | typedef enum {RESET = 0, SET = !RESET} FlagStatus, IntStatus, SetState; |
lynxeyed_atsu | 0:d920d64db582 | 61 | #define PARAM_SETSTATE(State) ((State==RESET) || (State==SET)) |
lynxeyed_atsu | 0:d920d64db582 | 62 | |
lynxeyed_atsu | 0:d920d64db582 | 63 | /** |
lynxeyed_atsu | 0:d920d64db582 | 64 | * @brief Functional State Definition |
lynxeyed_atsu | 0:d920d64db582 | 65 | */ |
lynxeyed_atsu | 0:d920d64db582 | 66 | typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState; |
lynxeyed_atsu | 0:d920d64db582 | 67 | #define PARAM_FUNCTIONALSTATE(State) ((State==DISABLE) || (State==ENABLE)) |
lynxeyed_atsu | 0:d920d64db582 | 68 | |
lynxeyed_atsu | 0:d920d64db582 | 69 | /** |
lynxeyed_atsu | 0:d920d64db582 | 70 | * @ Status type definition |
lynxeyed_atsu | 0:d920d64db582 | 71 | */ |
lynxeyed_atsu | 0:d920d64db582 | 72 | typedef enum {ERROR = 0, SUCCESS = !ERROR} Status; |
lynxeyed_atsu | 0:d920d64db582 | 73 | |
lynxeyed_atsu | 0:d920d64db582 | 74 | |
lynxeyed_atsu | 0:d920d64db582 | 75 | /** |
lynxeyed_atsu | 0:d920d64db582 | 76 | * Read/Write transfer type mode (Block or non-block) |
lynxeyed_atsu | 0:d920d64db582 | 77 | */ |
lynxeyed_atsu | 0:d920d64db582 | 78 | typedef enum |
lynxeyed_atsu | 0:d920d64db582 | 79 | { |
lynxeyed_atsu | 0:d920d64db582 | 80 | NONE_BLOCKING = 0, /**< None Blocking type */ |
lynxeyed_atsu | 0:d920d64db582 | 81 | BLOCKING, /**< Blocking type */ |
lynxeyed_atsu | 0:d920d64db582 | 82 | } TRANSFER_BLOCK_Type; |
lynxeyed_atsu | 0:d920d64db582 | 83 | |
lynxeyed_atsu | 0:d920d64db582 | 84 | |
lynxeyed_atsu | 0:d920d64db582 | 85 | /** Pointer to Function returning Void (any number of parameters) */ |
lynxeyed_atsu | 0:d920d64db582 | 86 | typedef void (*PFV)(); |
lynxeyed_atsu | 0:d920d64db582 | 87 | |
lynxeyed_atsu | 0:d920d64db582 | 88 | /** Pointer to Function returning int32_t (any number of parameters) */ |
lynxeyed_atsu | 0:d920d64db582 | 89 | typedef int32_t(*PFI)(); |
lynxeyed_atsu | 0:d920d64db582 | 90 | |
lynxeyed_atsu | 0:d920d64db582 | 91 | /** |
lynxeyed_atsu | 0:d920d64db582 | 92 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 93 | */ |
lynxeyed_atsu | 0:d920d64db582 | 94 | |
lynxeyed_atsu | 0:d920d64db582 | 95 | |
lynxeyed_atsu | 0:d920d64db582 | 96 | /* Public Macros -------------------------------------------------------------- */ |
lynxeyed_atsu | 0:d920d64db582 | 97 | /** @defgroup LPC_Types_Public_Macros LPC_Types Public Macros |
lynxeyed_atsu | 0:d920d64db582 | 98 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 99 | */ |
lynxeyed_atsu | 0:d920d64db582 | 100 | |
lynxeyed_atsu | 0:d920d64db582 | 101 | /* _BIT(n) sets the bit at position "n" |
lynxeyed_atsu | 0:d920d64db582 | 102 | * _BIT(n) is intended to be used in "OR" and "AND" expressions: |
lynxeyed_atsu | 0:d920d64db582 | 103 | * e.g., "(_BIT(3) | _BIT(7))". |
lynxeyed_atsu | 0:d920d64db582 | 104 | */ |
lynxeyed_atsu | 0:d920d64db582 | 105 | #undef _BIT |
lynxeyed_atsu | 0:d920d64db582 | 106 | /* Set bit macro */ |
lynxeyed_atsu | 0:d920d64db582 | 107 | #define _BIT(n) (1<<n) |
lynxeyed_atsu | 0:d920d64db582 | 108 | |
lynxeyed_atsu | 0:d920d64db582 | 109 | /* _SBF(f,v) sets the bit field starting at position "f" to value "v". |
lynxeyed_atsu | 0:d920d64db582 | 110 | * _SBF(f,v) is intended to be used in "OR" and "AND" expressions: |
lynxeyed_atsu | 0:d920d64db582 | 111 | * e.g., "((_SBF(5,7) | _SBF(12,0xF)) & 0xFFFF)" |
lynxeyed_atsu | 0:d920d64db582 | 112 | */ |
lynxeyed_atsu | 0:d920d64db582 | 113 | #undef _SBF |
lynxeyed_atsu | 0:d920d64db582 | 114 | /* Set bit field macro */ |
lynxeyed_atsu | 0:d920d64db582 | 115 | #define _SBF(f,v) (v<<f) |
lynxeyed_atsu | 0:d920d64db582 | 116 | |
lynxeyed_atsu | 0:d920d64db582 | 117 | /* _BITMASK constructs a symbol with 'field_width' least significant |
lynxeyed_atsu | 0:d920d64db582 | 118 | * bits set. |
lynxeyed_atsu | 0:d920d64db582 | 119 | * e.g., _BITMASK(5) constructs '0x1F', _BITMASK(16) == 0xFFFF |
lynxeyed_atsu | 0:d920d64db582 | 120 | * The symbol is intended to be used to limit the bit field width |
lynxeyed_atsu | 0:d920d64db582 | 121 | * thusly: |
lynxeyed_atsu | 0:d920d64db582 | 122 | * <a_register> = (any_expression) & _BITMASK(x), where 0 < x <= 32. |
lynxeyed_atsu | 0:d920d64db582 | 123 | * If "any_expression" results in a value that is larger than can be |
lynxeyed_atsu | 0:d920d64db582 | 124 | * contained in 'x' bits, the bits above 'x - 1' are masked off. When |
lynxeyed_atsu | 0:d920d64db582 | 125 | * used with the _SBF example above, the example would be written: |
lynxeyed_atsu | 0:d920d64db582 | 126 | * a_reg = ((_SBF(5,7) | _SBF(12,0xF)) & _BITMASK(16)) |
lynxeyed_atsu | 0:d920d64db582 | 127 | * This ensures that the value written to a_reg is no wider than |
lynxeyed_atsu | 0:d920d64db582 | 128 | * 16 bits, and makes the code easier to read and understand. |
lynxeyed_atsu | 0:d920d64db582 | 129 | */ |
lynxeyed_atsu | 0:d920d64db582 | 130 | #undef _BITMASK |
lynxeyed_atsu | 0:d920d64db582 | 131 | /* Bitmask creation macro */ |
lynxeyed_atsu | 0:d920d64db582 | 132 | #define _BITMASK(field_width) ( _BIT(field_width) - 1) |
lynxeyed_atsu | 0:d920d64db582 | 133 | |
lynxeyed_atsu | 0:d920d64db582 | 134 | /* NULL pointer */ |
lynxeyed_atsu | 0:d920d64db582 | 135 | #ifndef NULL |
lynxeyed_atsu | 0:d920d64db582 | 136 | #define NULL ((void*) 0) |
lynxeyed_atsu | 0:d920d64db582 | 137 | #endif |
lynxeyed_atsu | 0:d920d64db582 | 138 | |
lynxeyed_atsu | 0:d920d64db582 | 139 | /* Number of elements in an array */ |
lynxeyed_atsu | 0:d920d64db582 | 140 | #define NELEMENTS(array) (sizeof (array) / sizeof (array[0])) |
lynxeyed_atsu | 0:d920d64db582 | 141 | |
lynxeyed_atsu | 0:d920d64db582 | 142 | /* Static data/function define */ |
lynxeyed_atsu | 0:d920d64db582 | 143 | #define STATIC static |
lynxeyed_atsu | 0:d920d64db582 | 144 | /* External data/function define */ |
lynxeyed_atsu | 0:d920d64db582 | 145 | #define EXTERN extern |
lynxeyed_atsu | 0:d920d64db582 | 146 | |
lynxeyed_atsu | 0:d920d64db582 | 147 | #define MAX(a, b) (((a) > (b)) ? (a) : (b)) |
lynxeyed_atsu | 0:d920d64db582 | 148 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) |
lynxeyed_atsu | 0:d920d64db582 | 149 | |
lynxeyed_atsu | 0:d920d64db582 | 150 | /** |
lynxeyed_atsu | 0:d920d64db582 | 151 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 152 | */ |
lynxeyed_atsu | 0:d920d64db582 | 153 | |
lynxeyed_atsu | 0:d920d64db582 | 154 | |
lynxeyed_atsu | 0:d920d64db582 | 155 | /* Old Type Definition compatibility ------------------------------------------ */ |
lynxeyed_atsu | 0:d920d64db582 | 156 | /** @addtogroup LPC_Types_Public_Types LPC_Types Public Types |
lynxeyed_atsu | 0:d920d64db582 | 157 | * @{ |
lynxeyed_atsu | 0:d920d64db582 | 158 | */ |
lynxeyed_atsu | 0:d920d64db582 | 159 | |
lynxeyed_atsu | 0:d920d64db582 | 160 | /** SMA type for character type */ |
lynxeyed_atsu | 0:d920d64db582 | 161 | //typedef char CHAR; |
lynxeyed_atsu | 0:d920d64db582 | 162 | |
lynxeyed_atsu | 0:d920d64db582 | 163 | /** SMA type for 8 bit unsigned value */ |
lynxeyed_atsu | 0:d920d64db582 | 164 | typedef uint8_t UNS_8; |
lynxeyed_atsu | 0:d920d64db582 | 165 | |
lynxeyed_atsu | 0:d920d64db582 | 166 | /** SMA type for 8 bit signed value */ |
lynxeyed_atsu | 0:d920d64db582 | 167 | typedef int8_t INT_8; |
lynxeyed_atsu | 0:d920d64db582 | 168 | |
lynxeyed_atsu | 0:d920d64db582 | 169 | /** SMA type for 16 bit unsigned value */ |
lynxeyed_atsu | 0:d920d64db582 | 170 | typedef uint16_t UNS_16; |
lynxeyed_atsu | 0:d920d64db582 | 171 | |
lynxeyed_atsu | 0:d920d64db582 | 172 | /** SMA type for 16 bit signed value */ |
lynxeyed_atsu | 0:d920d64db582 | 173 | typedef int16_t INT_16; |
lynxeyed_atsu | 0:d920d64db582 | 174 | |
lynxeyed_atsu | 0:d920d64db582 | 175 | /** SMA type for 32 bit unsigned value */ |
lynxeyed_atsu | 0:d920d64db582 | 176 | typedef uint32_t UNS_32; |
lynxeyed_atsu | 0:d920d64db582 | 177 | |
lynxeyed_atsu | 0:d920d64db582 | 178 | /** SMA type for 32 bit signed value */ |
lynxeyed_atsu | 0:d920d64db582 | 179 | typedef int32_t INT_32; |
lynxeyed_atsu | 0:d920d64db582 | 180 | |
lynxeyed_atsu | 0:d920d64db582 | 181 | /** SMA type for 64 bit signed value */ |
lynxeyed_atsu | 0:d920d64db582 | 182 | typedef int64_t INT_64; |
lynxeyed_atsu | 0:d920d64db582 | 183 | |
lynxeyed_atsu | 0:d920d64db582 | 184 | /** SMA type for 64 bit unsigned value */ |
lynxeyed_atsu | 0:d920d64db582 | 185 | typedef uint64_t UNS_64; |
lynxeyed_atsu | 0:d920d64db582 | 186 | |
lynxeyed_atsu | 0:d920d64db582 | 187 | /** 32 bit boolean type */ |
lynxeyed_atsu | 0:d920d64db582 | 188 | typedef Bool BOOL_32; |
lynxeyed_atsu | 0:d920d64db582 | 189 | |
lynxeyed_atsu | 0:d920d64db582 | 190 | /** 16 bit boolean type */ |
lynxeyed_atsu | 0:d920d64db582 | 191 | typedef Bool BOOL_16; |
lynxeyed_atsu | 0:d920d64db582 | 192 | |
lynxeyed_atsu | 0:d920d64db582 | 193 | /** 8 bit boolean type */ |
lynxeyed_atsu | 0:d920d64db582 | 194 | typedef Bool BOOL_8; |
lynxeyed_atsu | 0:d920d64db582 | 195 | |
lynxeyed_atsu | 0:d920d64db582 | 196 | /** |
lynxeyed_atsu | 0:d920d64db582 | 197 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 198 | */ |
lynxeyed_atsu | 0:d920d64db582 | 199 | |
lynxeyed_atsu | 0:d920d64db582 | 200 | |
lynxeyed_atsu | 0:d920d64db582 | 201 | #endif /* LPC_TYPES_H */ |
lynxeyed_atsu | 0:d920d64db582 | 202 | |
lynxeyed_atsu | 0:d920d64db582 | 203 | /** |
lynxeyed_atsu | 0:d920d64db582 | 204 | * @} |
lynxeyed_atsu | 0:d920d64db582 | 205 | */ |
lynxeyed_atsu | 0:d920d64db582 | 206 | |
lynxeyed_atsu | 0:d920d64db582 | 207 | /* --------------------------------- End Of File ------------------------------ */ |