MSS
/
test_VCNL4100
test program for VCNL4100 proximity and ambient light sensor
Embed:
(wiki syntax)
Show/hide line numbers
MSS.h
00001 #ifndef _MSS_H_ 00002 #define _MSS_H_ 00003 00004 #if defined (TARGET_KL25Z) 00005 /* I2C */ 00006 #define PIN_SCL PTE1 00007 #define PIN_SDA PTE0 00008 /* SPI */ 00009 #define PIN_SCK PTD1 00010 #define PIN_MISO PTD3 00011 #define PIN_MOSI PTD2 00012 #define PIN_CS0 PTD0 00013 /* Interrupt */ 00014 #define PIN_INT0 PTD5 00015 #define PIN_INT1 PTA13 00016 #define PIN_INT2 PTC9 /* This pin does not support interrupt */ 00017 #define PIN_INT3 PTC8 /* This pin does not support interrupt */ 00018 #define PIN_INT4 PTA5 00019 #define PIN_INT5 PTA4 00020 /* Analog Input */ 00021 #define PIN_AN0 PTB0 00022 #define PIN_AN1 PTB1 00023 #define PIN_AN2 PTB2 00024 #define PIN_AN3 PTB3 00025 #define PIN_AN4 PTC2 00026 #define PIN_AN5 PTC1 00027 #define BOARD_NAME "FRDM-KL25Z" 00028 00029 #elif defined (TARGET_KL46Z) 00030 /* I2C */ 00031 #define PIN_SCL PTE1 00032 #define PIN_SDA PTE0 00033 /* SPI */ 00034 #define PIN_SCK PTD5 00035 #define PIN_MISO PTD7 00036 #define PIN_MOSI PTD6 00037 #define PIN_CS0 PTD4 00038 /* Interrupt */ 00039 #define PIN_INT0 PTD2 00040 #define PIN_INT1 PTA13 00041 #define PIN_INT2 PTC9 /* This pin does not support interrupt */ 00042 #define PIN_INT3 PTC8 /* This pin does not support interrupt */ 00043 #define PIN_INT4 PTA5 00044 #define PIN_INT5 PTA4 00045 /* Analog Input */ 00046 #define PIN_AN0 PTB0 00047 #define PIN_AN1 PTB1 00048 #define PIN_AN2 PTB2 00049 #define PIN_AN3 PTB3 00050 #define PIN_AN4 PTC2 00051 #define PIN_AN5 PTC1 00052 #define BOARD_NAME "FRDM-KL46Z" 00053 00054 #elif defined (TARGET_K64F) 00055 /* I2C */ 00056 #define PIN_SCL PTE24 00057 #define PIN_SDA PTE25 00058 /* SPI */ 00059 #define PIN_SCK PTD1 00060 #define PIN_MISO PTD3 00061 #define PIN_MOSI PTD2 00062 #define PIN_CS0 PTD0 00063 /* Interrupt */ 00064 #define PIN_INT0 PTC4 00065 #define PIN_INT1 PTA0 00066 #define PIN_INT2 PTC3 00067 #define PIN_INT3 PTC2 00068 #define PIN_INT4 PTA2 00069 #define PIN_INT5 PTB23 00070 /* Analog Input */ 00071 #define PIN_AN0 PTB2 00072 #define PIN_AN1 PTB3 00073 #define PIN_AN2 PTB10 00074 #define PIN_AN3 PTB11 00075 #define PIN_AN4 PTC11 00076 #define PIN_AN5 PTC10 00077 #define BOARD_NAME "FRDM-K64Z" 00078 00079 /** 00080 * NOTE: On FRDM-K22F 00081 * Both I2C and UART are assigned to 00082 * the same pins PTE1/PTE0. 00083 * So MSS does not work as is. 00084 */ 00085 #elif defined (TARGET_K22F) 00086 /* I2C */ 00087 /* for quattro-II/f-shaft-II */ 00088 #if 1 00089 #define PIN_SCL PTB2 00090 #define PIN_SDA PTB3 00091 #endif 00092 #if 0 00093 #define PIN_SCL PTC10 00094 #define PIN_SDA PTC11 00095 #endif 00096 /* SPI */ 00097 #define PIN_SCK PTD5 00098 #define PIN_MISO PTD7 00099 #define PIN_MOSI PTD6 00100 #define PIN_CS0 PTD4 00101 /* Interrupt */ 00102 //#define PIN_INT0 PTA1 00103 //#define PIN_INT1 PTB19 00104 //#define PIN_INT2 PTC6 00105 //#define PIN_INT3 PTC3 00106 //#define PIN_INT4 PTB18 00107 //#define PIN_INT5 PTA4 00108 #define PIN_INT0 PTB16 00109 #define PIN_INT1 PTB17 00110 #define PIN_INT2 PTB18 00111 #define PIN_INT3 PTB19 00112 /* Analog Input */ 00113 #define PIN_AN0 PTB0 00114 #define PIN_AN1 PTB1 00115 #define PIN_AN2 PTC1 00116 #define PIN_AN3 PTC2 00117 // #define PIN_AN4 PTB3 00118 // #define PIN_AN5 PTB2 00119 // #define BOARD_NAME "FRDM-K22F" 00120 #define BOARD_NAME "f-shaft-II" 00121 00122 #elif defined (TARGET_KL05Z) 00123 /* I2C */ 00124 #define PIN_SCL PTB3 00125 #define PIN_SDA PTB4 00126 /* SPI */ 00127 #define PIN_SCK PTB0 00128 #define PIN_MISO PTA6 00129 #define PIN_MOSI PTA7 00130 #define PIN_CS0 PTA5 00131 /* Interrupt */ 00132 #define PIN_INT0 PTB11 00133 #define PIN_INT1 PTB10 00134 #define PIN_INT2 PTB7 00135 #define PIN_INT3 PTB6 00136 #define PIN_INT4 PTA12 00137 #define PIN_INT5 PTA10 00138 /* Analog Input */ 00139 #define PIN_AN0 PTB8 00140 #define PIN_AN1 PTB9 00141 #define PIN_AN2 PTA8 00142 #define PIN_AN3 PTA0 00143 #define PIN_AN4 PTA9 00144 #define PIN_AN5 PTB13 00145 #define BOARD_NAME "FRDM-KL05Z" 00146 00147 #elif defined (TARGET_F411RE) 00148 /* I2C */ 00149 #define PIN_SCL PB_8 00150 #define PIN_SDA PB_9 00151 /* SPI */ 00152 #define PIN_SCK PA_5 00153 #define PIN_MISO PA_6 00154 #define PIN_MOSI PA_7 00155 #define PIN_CS0 PB_6 00156 /* Interrupt */ 00157 #define PIN_INT0 PC_7 00158 #define PIN_INT1 PA_9 00159 #define PIN_INT2 PA_8 00160 #define PIN_INT3 PB_10 00161 #define PIN_INT4 PB_4 00162 #define PIN_INT5 PB_5 00163 /* Analog In */ 00164 #define PIN_AN0 PA_0 00165 #define PIN_AN1 PA_1 00166 #define PIN_AN2 PA_4 00167 #define PIN_AN3 PB_0 00168 #define PIN_AN4 PC_1 00169 #define PIN_AN5 PC_0 00170 #define BOARD_NAME "NUCLEO-F411RE" 00171 00172 #elif defined (TARGET_MAX32600MBED) 00173 /* I2C */ 00174 #define PIN_SCL P2_7 00175 #define PIN_SDA P2_6 00176 /* SPI */ 00177 #define PIN_SCK P2_0 00178 #define PIN_MISO P2_2 00179 #define PIN_MOSI P2_1 00180 #define PIN_CS0 P2_3 00181 /* Interrupt */ 00182 #define PIN_INT0 P2_4 00183 #define PIN_INT1 P2_5 00184 #define PIN_INT2 P1_7 00185 #define PIN_INT3 P1_6 00186 #define PIN_INT4 P1_5 00187 #define PIN_INT5 P1_4 00188 /* Analog In */ 00189 #define PIN_AN0 AIN_0P 00190 #define PIN_AN1 AIN_1P 00191 #define PIN_AN2 AIN_2P 00192 #define PIN_AN3 AIN_3P 00193 #define PIN_AN4 AIN_4P 00194 #define PIN_AN5 AIN_5P 00195 #define BOARD_NAME "MAX32600MBED" 00196 00197 #else 00198 #error TARGET NOT DEFINED 00199 /* I2C */ 00200 #define PIN_SCL D15 00201 #define PIN_SDA D14 00202 /* SPI */ 00203 #define PIN_SCK D13 00204 #define PIN_MISO D12 00205 #define PIN_MOSI D11 00206 #define PIN_CS0 D10 00207 /* Interrupt */ 00208 #define PIN_INT0 D9 00209 #define PIN_INT1 D8 00210 #define PIN_INT2 D7 00211 #define PIN_INT3 D6 00212 #define PIN_INT4 D5 00213 #define PIN_INT5 D4 00214 /* Analog In */ 00215 #define PIN_AN0 A0 00216 #define PIN_AN1 A1 00217 #define PIN_AN2 A2 00218 #define PIN_AN3 A3 00219 #define PIN_AN4 A4 00220 #define PIN_AN5 A5 00221 /* MSS on board LEDs */ 00222 #define LED_D1 D13 00223 #define LED_D2 D12 00224 #define LED_D3 D11 00225 #define LED_D4 D10 00226 #define LED_D5 D3 00227 #define LED_D6 D2 00228 #define LED_D7 D1 00229 #define LED_D8 D0 00230 00231 00232 00233 #endif 00234 00235 #endif /* _MSS_H_ */
Generated on Tue Jul 19 2022 20:52:53 by 1.7.2