![](/media/cache/group/IMG_1289.JPG.50x50_q85.jpg)
A test program for LM75B temperature sensor
MSS.h@1:3dff1e886346, 2017-04-24 (annotated)
- Committer:
- Rhyme
- Date:
- Mon Apr 24 07:32:31 2017 +0000
- Revision:
- 1:3dff1e886346
- Parent:
- 0:7dd6fe5e908d
Title and format modified for CSV
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Rhyme | 0:7dd6fe5e908d | 1 | #ifndef _MSS_H_ |
Rhyme | 0:7dd6fe5e908d | 2 | #define _MSS_H_ |
Rhyme | 0:7dd6fe5e908d | 3 | |
Rhyme | 0:7dd6fe5e908d | 4 | #if defined (TARGET_KL25Z) |
Rhyme | 0:7dd6fe5e908d | 5 | /* I2C */ |
Rhyme | 0:7dd6fe5e908d | 6 | #define PIN_SCL PTE1 |
Rhyme | 0:7dd6fe5e908d | 7 | #define PIN_SDA PTE0 |
Rhyme | 0:7dd6fe5e908d | 8 | /* SPI */ |
Rhyme | 0:7dd6fe5e908d | 9 | #define PIN_SCK PTD1 |
Rhyme | 0:7dd6fe5e908d | 10 | #define PIN_MISO PTD3 |
Rhyme | 0:7dd6fe5e908d | 11 | #define PIN_MOSI PTD2 |
Rhyme | 0:7dd6fe5e908d | 12 | #define PIN_CS0 PTD0 |
Rhyme | 0:7dd6fe5e908d | 13 | /* Interrupt */ |
Rhyme | 0:7dd6fe5e908d | 14 | #define PIN_INT0 PTD5 |
Rhyme | 0:7dd6fe5e908d | 15 | #define PIN_INT1 PTA13 |
Rhyme | 0:7dd6fe5e908d | 16 | #define PIN_INT2 PTC9 /* This pin does not support interrupt */ |
Rhyme | 0:7dd6fe5e908d | 17 | #define PIN_INT3 PTC8 /* This pin does not support interrupt */ |
Rhyme | 0:7dd6fe5e908d | 18 | #define PIN_INT4 PTA5 |
Rhyme | 0:7dd6fe5e908d | 19 | #define PIN_INT5 PTA4 |
Rhyme | 0:7dd6fe5e908d | 20 | /* Analog Input */ |
Rhyme | 0:7dd6fe5e908d | 21 | #define PIN_AN0 PTB0 |
Rhyme | 0:7dd6fe5e908d | 22 | #define PIN_AN1 PTB1 |
Rhyme | 0:7dd6fe5e908d | 23 | #define PIN_AN2 PTB2 |
Rhyme | 0:7dd6fe5e908d | 24 | #define PIN_AN3 PTB3 |
Rhyme | 0:7dd6fe5e908d | 25 | #define PIN_AN4 PTC2 |
Rhyme | 0:7dd6fe5e908d | 26 | #define PIN_AN5 PTC1 |
Rhyme | 0:7dd6fe5e908d | 27 | #define BOARD_NAME "FRDM-KL25Z" |
Rhyme | 0:7dd6fe5e908d | 28 | |
Rhyme | 0:7dd6fe5e908d | 29 | #elif defined (TARGET_KL46Z) |
Rhyme | 0:7dd6fe5e908d | 30 | /* I2C */ |
Rhyme | 0:7dd6fe5e908d | 31 | #define PIN_SCL PTE1 |
Rhyme | 0:7dd6fe5e908d | 32 | #define PIN_SDA PTE0 |
Rhyme | 0:7dd6fe5e908d | 33 | /* SPI */ |
Rhyme | 0:7dd6fe5e908d | 34 | #define PIN_SCK PTD5 |
Rhyme | 0:7dd6fe5e908d | 35 | #define PIN_MISO PTD7 |
Rhyme | 0:7dd6fe5e908d | 36 | #define PIN_MOSI PTD6 |
Rhyme | 0:7dd6fe5e908d | 37 | #define PIN_CS0 PTD4 |
Rhyme | 0:7dd6fe5e908d | 38 | /* Interrupt */ |
Rhyme | 0:7dd6fe5e908d | 39 | #define PIN_INT0 PTD2 |
Rhyme | 0:7dd6fe5e908d | 40 | #define PIN_INT1 PTA13 |
Rhyme | 0:7dd6fe5e908d | 41 | #define PIN_INT2 PTC9 /* This pin does not support interrupt */ |
Rhyme | 0:7dd6fe5e908d | 42 | #define PIN_INT3 PTC8 /* This pin does not support interrupt */ |
Rhyme | 0:7dd6fe5e908d | 43 | #define PIN_INT4 PTA5 |
Rhyme | 0:7dd6fe5e908d | 44 | #define PIN_INT5 PTA4 |
Rhyme | 0:7dd6fe5e908d | 45 | /* Analog Input */ |
Rhyme | 0:7dd6fe5e908d | 46 | #define PIN_AN0 PTB0 |
Rhyme | 0:7dd6fe5e908d | 47 | #define PIN_AN1 PTB1 |
Rhyme | 0:7dd6fe5e908d | 48 | #define PIN_AN2 PTB2 |
Rhyme | 0:7dd6fe5e908d | 49 | #define PIN_AN3 PTB3 |
Rhyme | 0:7dd6fe5e908d | 50 | #define PIN_AN4 PTC2 |
Rhyme | 0:7dd6fe5e908d | 51 | #define PIN_AN5 PTC1 |
Rhyme | 0:7dd6fe5e908d | 52 | #define BOARD_NAME "FRDM-KL46Z" |
Rhyme | 0:7dd6fe5e908d | 53 | |
Rhyme | 0:7dd6fe5e908d | 54 | #elif defined (TARGET_K64F) |
Rhyme | 0:7dd6fe5e908d | 55 | /* I2C */ |
Rhyme | 0:7dd6fe5e908d | 56 | #define PIN_SCL PTE24 |
Rhyme | 0:7dd6fe5e908d | 57 | #define PIN_SDA PTE25 |
Rhyme | 0:7dd6fe5e908d | 58 | /* SPI */ |
Rhyme | 0:7dd6fe5e908d | 59 | #define PIN_SCK PTD1 |
Rhyme | 0:7dd6fe5e908d | 60 | #define PIN_MISO PTD3 |
Rhyme | 0:7dd6fe5e908d | 61 | #define PIN_MOSI PTD2 |
Rhyme | 0:7dd6fe5e908d | 62 | #define PIN_CS0 PTD0 |
Rhyme | 0:7dd6fe5e908d | 63 | /* Interrupt */ |
Rhyme | 0:7dd6fe5e908d | 64 | #define PIN_INT0 PTC4 |
Rhyme | 0:7dd6fe5e908d | 65 | #define PIN_INT1 PTA0 |
Rhyme | 0:7dd6fe5e908d | 66 | #define PIN_INT2 PTC3 |
Rhyme | 0:7dd6fe5e908d | 67 | #define PIN_INT3 PTC2 |
Rhyme | 0:7dd6fe5e908d | 68 | #define PIN_INT4 PTA2 |
Rhyme | 0:7dd6fe5e908d | 69 | #define PIN_INT5 PTB23 |
Rhyme | 0:7dd6fe5e908d | 70 | /* Analog Input */ |
Rhyme | 0:7dd6fe5e908d | 71 | #define PIN_AN0 PTB2 |
Rhyme | 0:7dd6fe5e908d | 72 | #define PIN_AN1 PTB3 |
Rhyme | 0:7dd6fe5e908d | 73 | #define PIN_AN2 PTB10 |
Rhyme | 0:7dd6fe5e908d | 74 | #define PIN_AN3 PTB11 |
Rhyme | 0:7dd6fe5e908d | 75 | #define PIN_AN4 PTC11 |
Rhyme | 0:7dd6fe5e908d | 76 | #define PIN_AN5 PTC10 |
Rhyme | 0:7dd6fe5e908d | 77 | #define BOARD_NAME "FRDM-K64Z" |
Rhyme | 0:7dd6fe5e908d | 78 | |
Rhyme | 0:7dd6fe5e908d | 79 | /** |
Rhyme | 0:7dd6fe5e908d | 80 | * NOTE: On FRDM-K22F |
Rhyme | 0:7dd6fe5e908d | 81 | * Both I2C and UART are assigned to |
Rhyme | 0:7dd6fe5e908d | 82 | * the same pins PTE1/PTE0. |
Rhyme | 0:7dd6fe5e908d | 83 | * So MSS does not work as is. |
Rhyme | 0:7dd6fe5e908d | 84 | */ |
Rhyme | 0:7dd6fe5e908d | 85 | #elif defined (TARGET_K22F) |
Rhyme | 0:7dd6fe5e908d | 86 | /* I2C */ |
Rhyme | 0:7dd6fe5e908d | 87 | /* for quattro-II/f-shaft-II */ |
Rhyme | 0:7dd6fe5e908d | 88 | #if 1 |
Rhyme | 0:7dd6fe5e908d | 89 | #define PIN_SCL PTB2 |
Rhyme | 0:7dd6fe5e908d | 90 | #define PIN_SDA PTB3 |
Rhyme | 0:7dd6fe5e908d | 91 | #endif |
Rhyme | 0:7dd6fe5e908d | 92 | #if 0 |
Rhyme | 0:7dd6fe5e908d | 93 | #define PIN_SCL PTC10 |
Rhyme | 0:7dd6fe5e908d | 94 | #define PIN_SDA PTC11 |
Rhyme | 0:7dd6fe5e908d | 95 | #endif |
Rhyme | 0:7dd6fe5e908d | 96 | /* SPI */ |
Rhyme | 0:7dd6fe5e908d | 97 | #define PIN_SCK PTD5 |
Rhyme | 0:7dd6fe5e908d | 98 | #define PIN_MISO PTD7 |
Rhyme | 0:7dd6fe5e908d | 99 | #define PIN_MOSI PTD6 |
Rhyme | 0:7dd6fe5e908d | 100 | #define PIN_CS0 PTD4 |
Rhyme | 0:7dd6fe5e908d | 101 | /* Interrupt */ |
Rhyme | 0:7dd6fe5e908d | 102 | #define PIN_INT0 PTA1 |
Rhyme | 0:7dd6fe5e908d | 103 | #define PIN_INT1 PTB19 |
Rhyme | 0:7dd6fe5e908d | 104 | #define PIN_INT2 PTC6 |
Rhyme | 0:7dd6fe5e908d | 105 | #define PIN_INT3 PTC3 |
Rhyme | 0:7dd6fe5e908d | 106 | #define PIN_INT4 PTB18 |
Rhyme | 0:7dd6fe5e908d | 107 | #define PIN_INT5 PTA4 |
Rhyme | 0:7dd6fe5e908d | 108 | /* Analog Input */ |
Rhyme | 0:7dd6fe5e908d | 109 | #define PIN_AN0 PTB0 |
Rhyme | 0:7dd6fe5e908d | 110 | #define PIN_AN1 PTB1 |
Rhyme | 0:7dd6fe5e908d | 111 | #define PIN_AN2 PTC1 |
Rhyme | 0:7dd6fe5e908d | 112 | #define PIN_AN3 PTC2 |
Rhyme | 0:7dd6fe5e908d | 113 | // #define PIN_AN4 PTB3 |
Rhyme | 0:7dd6fe5e908d | 114 | // #define PIN_AN5 PTB2 |
Rhyme | 0:7dd6fe5e908d | 115 | #define BOARD_NAME "FRDM-K22F" |
Rhyme | 0:7dd6fe5e908d | 116 | |
Rhyme | 0:7dd6fe5e908d | 117 | #elif defined (TARGET_KL05Z) |
Rhyme | 0:7dd6fe5e908d | 118 | /* I2C */ |
Rhyme | 0:7dd6fe5e908d | 119 | #define PIN_SCL PTB3 |
Rhyme | 0:7dd6fe5e908d | 120 | #define PIN_SDA PTB4 |
Rhyme | 0:7dd6fe5e908d | 121 | /* SPI */ |
Rhyme | 0:7dd6fe5e908d | 122 | #define PIN_SCK PTB0 |
Rhyme | 0:7dd6fe5e908d | 123 | #define PIN_MISO PTA6 |
Rhyme | 0:7dd6fe5e908d | 124 | #define PIN_MOSI PTA7 |
Rhyme | 0:7dd6fe5e908d | 125 | #define PIN_CS0 PTA5 |
Rhyme | 0:7dd6fe5e908d | 126 | /* Interrupt */ |
Rhyme | 0:7dd6fe5e908d | 127 | #define PIN_INT0 PTB11 |
Rhyme | 0:7dd6fe5e908d | 128 | #define PIN_INT1 PTB10 |
Rhyme | 0:7dd6fe5e908d | 129 | #define PIN_INT2 PTB7 |
Rhyme | 0:7dd6fe5e908d | 130 | #define PIN_INT3 PTB6 |
Rhyme | 0:7dd6fe5e908d | 131 | #define PIN_INT4 PTA12 |
Rhyme | 0:7dd6fe5e908d | 132 | #define PIN_INT5 PTA10 |
Rhyme | 0:7dd6fe5e908d | 133 | /* Analog Input */ |
Rhyme | 0:7dd6fe5e908d | 134 | #define PIN_AN0 PTB8 |
Rhyme | 0:7dd6fe5e908d | 135 | #define PIN_AN1 PTB9 |
Rhyme | 0:7dd6fe5e908d | 136 | #define PIN_AN2 PTA8 |
Rhyme | 0:7dd6fe5e908d | 137 | #define PIN_AN3 PTA0 |
Rhyme | 0:7dd6fe5e908d | 138 | #define PIN_AN4 PTA9 |
Rhyme | 0:7dd6fe5e908d | 139 | #define PIN_AN5 PTB13 |
Rhyme | 0:7dd6fe5e908d | 140 | #define BOARD_NAME "FRDM-KL05Z" |
Rhyme | 0:7dd6fe5e908d | 141 | |
Rhyme | 0:7dd6fe5e908d | 142 | #elif define (TARGET_F411RE) |
Rhyme | 0:7dd6fe5e908d | 143 | /* I2C */ |
Rhyme | 0:7dd6fe5e908d | 144 | #define PIN_SCL PB_8 |
Rhyme | 0:7dd6fe5e908d | 145 | #define PIN_SDA PB_9 |
Rhyme | 0:7dd6fe5e908d | 146 | /* SPI */ |
Rhyme | 0:7dd6fe5e908d | 147 | #define PIN_SCK PA_5 |
Rhyme | 0:7dd6fe5e908d | 148 | #define PIN_MISO PA_6 |
Rhyme | 0:7dd6fe5e908d | 149 | #define PIN_MOSI PA_7 |
Rhyme | 0:7dd6fe5e908d | 150 | #define PIN_CS0 PB_6 |
Rhyme | 0:7dd6fe5e908d | 151 | /* Interrupt */ |
Rhyme | 0:7dd6fe5e908d | 152 | #define PIN_INT0 PC_7 |
Rhyme | 0:7dd6fe5e908d | 153 | #define PIN_INT1 PA_9 |
Rhyme | 0:7dd6fe5e908d | 154 | #define PIN_INT2 PA_8 |
Rhyme | 0:7dd6fe5e908d | 155 | #define PIN_INT3 PB_10 |
Rhyme | 0:7dd6fe5e908d | 156 | #define PIN_INT4 PB_4 |
Rhyme | 0:7dd6fe5e908d | 157 | #define PIN_INT5 PB_5 |
Rhyme | 0:7dd6fe5e908d | 158 | /* Analog In */ |
Rhyme | 0:7dd6fe5e908d | 159 | #define PIN_AN0 PA_0 |
Rhyme | 0:7dd6fe5e908d | 160 | #define PIN_AN1 PA_1 |
Rhyme | 0:7dd6fe5e908d | 161 | #define PIN_AN2 PA_4 |
Rhyme | 0:7dd6fe5e908d | 162 | #define PIN_AN3 PB_0 |
Rhyme | 0:7dd6fe5e908d | 163 | #define PIN_AN4 PC_1 |
Rhyme | 0:7dd6fe5e908d | 164 | #define PIN_AN5 PC_0 |
Rhyme | 0:7dd6fe5e908d | 165 | #define BOARD_NAME "NUCLEO-F411RE" |
Rhyme | 0:7dd6fe5e908d | 166 | |
Rhyme | 0:7dd6fe5e908d | 167 | #else |
Rhyme | 0:7dd6fe5e908d | 168 | #error TARGET NOT DEFINED |
Rhyme | 0:7dd6fe5e908d | 169 | /* I2C */ |
Rhyme | 0:7dd6fe5e908d | 170 | #define PIN_SCL D15 |
Rhyme | 0:7dd6fe5e908d | 171 | #define PIN_SDA D14 |
Rhyme | 0:7dd6fe5e908d | 172 | /* SPI */ |
Rhyme | 0:7dd6fe5e908d | 173 | #define PIN_SCK D13 |
Rhyme | 0:7dd6fe5e908d | 174 | #define PIN_MISO D12 |
Rhyme | 0:7dd6fe5e908d | 175 | #define PIN_MOSI D11 |
Rhyme | 0:7dd6fe5e908d | 176 | #define PIN_CS0 D10 |
Rhyme | 0:7dd6fe5e908d | 177 | /* Interrupt */ |
Rhyme | 0:7dd6fe5e908d | 178 | #define PIN_INT0 D9 |
Rhyme | 0:7dd6fe5e908d | 179 | #define PIN_INT1 D8 |
Rhyme | 0:7dd6fe5e908d | 180 | #define PIN_INT2 D7 |
Rhyme | 0:7dd6fe5e908d | 181 | #define PIN_INT3 D6 |
Rhyme | 0:7dd6fe5e908d | 182 | #define PIN_INT4 D5 |
Rhyme | 0:7dd6fe5e908d | 183 | #define PIN_INT5 D4 |
Rhyme | 0:7dd6fe5e908d | 184 | /* Analog In */ |
Rhyme | 0:7dd6fe5e908d | 185 | #define PIN_AN0 A0 |
Rhyme | 0:7dd6fe5e908d | 186 | #define PIN_AN1 A1 |
Rhyme | 0:7dd6fe5e908d | 187 | #define PIN_AN2 A2 |
Rhyme | 0:7dd6fe5e908d | 188 | #define PIN_AN3 A3 |
Rhyme | 0:7dd6fe5e908d | 189 | #define PIN_AN4 A4 |
Rhyme | 0:7dd6fe5e908d | 190 | #define PIN_AN5 A5 |
Rhyme | 0:7dd6fe5e908d | 191 | /* MSS on board LEDs */ |
Rhyme | 0:7dd6fe5e908d | 192 | #define LED_D1 D13 |
Rhyme | 0:7dd6fe5e908d | 193 | #define LED_D2 D12 |
Rhyme | 0:7dd6fe5e908d | 194 | #define LED_D3 D11 |
Rhyme | 0:7dd6fe5e908d | 195 | #define LED_D4 D10 |
Rhyme | 0:7dd6fe5e908d | 196 | #define LED_D5 D3 |
Rhyme | 0:7dd6fe5e908d | 197 | #define LED_D6 D2 |
Rhyme | 0:7dd6fe5e908d | 198 | #define LED_D7 D1 |
Rhyme | 0:7dd6fe5e908d | 199 | #define LED_D8 D0 |
Rhyme | 0:7dd6fe5e908d | 200 | |
Rhyme | 0:7dd6fe5e908d | 201 | #endif |
Rhyme | 0:7dd6fe5e908d | 202 | |
Rhyme | 0:7dd6fe5e908d | 203 | #endif /* _MSS_H_ */ |