1 ;-------------------------------------------------------- 2 ; File Created by SDCC : free open source ANSI-C Compiler 3 ; Version 3.0.0 #6037 (Oct 31 2010) (Linux) 4 ; This file was generated Mon Jan 30 00:10:44 2012 5 ;-------------------------------------------------------- 6 .module i2c 7 .optsdcc -mmcs51 --model-medium 8 9 ;-------------------------------------------------------- 10 ; Public variables in this module 11 ;-------------------------------------------------------- 12 .globl _i2cReadBit 13 .globl _i2cWriteBit 14 .globl _i2cWaitForHighScl 15 .globl _i2cClearSda 16 .globl _i2cClearScl 17 .globl _i2cReadSda 18 .globl _i2cReadScl 19 .globl _i2cReadByte_PARM_1 20 .globl _i2cWriteBit_PARM_1 21 .globl _i2cTimeoutOccurred 22 .globl _i2cPinSda 23 .globl _i2cPinScl 24 .globl _i2cSetFrequency 25 .globl _i2cSetTimeout 26 .globl _i2cStop 27 .globl _i2cStart 28 .globl _i2cWriteByte 29 .globl _i2cReadByte 30 ;-------------------------------------------------------- 31 ; special function registers 32 ;-------------------------------------------------------- 33 .area RSEG (ABS,DATA) 0000 34 .org 0x0000 0080 35 Fi2c$P0$0$0 == 0x0080 0080 36 _P0 = 0x0080 0081 37 Fi2c$SP$0$0 == 0x0081 0081 38 _SP = 0x0081 0082 39 Fi2c$DPL0$0$0 == 0x0082 0082 40 _DPL0 = 0x0082 0083 41 Fi2c$DPH0$0$0 == 0x0083 0083 42 _DPH0 = 0x0083 0084 43 Fi2c$DPL1$0$0 == 0x0084 0084 44 _DPL1 = 0x0084 0085 45 Fi2c$DPH1$0$0 == 0x0085 0085 46 _DPH1 = 0x0085 0086 47 Fi2c$U0CSR$0$0 == 0x0086 0086 48 _U0CSR = 0x0086 0087 49 Fi2c$PCON$0$0 == 0x0087 0087 50 _PCON = 0x0087 0088 51 Fi2c$TCON$0$0 == 0x0088 0088 52 _TCON = 0x0088 0089 53 Fi2c$P0IFG$0$0 == 0x0089 0089 54 _P0IFG = 0x0089 008A 55 Fi2c$P1IFG$0$0 == 0x008a 008A 56 _P1IFG = 0x008a 008B 57 Fi2c$P2IFG$0$0 == 0x008b 008B 58 _P2IFG = 0x008b 008C 59 Fi2c$PICTL$0$0 == 0x008c 008C 60 _PICTL = 0x008c 008D 61 Fi2c$P1IEN$0$0 == 0x008d 008D 62 _P1IEN = 0x008d 008F 63 Fi2c$P0INP$0$0 == 0x008f 008F 64 _P0INP = 0x008f 0090 65 Fi2c$P1$0$0 == 0x0090 0090 66 _P1 = 0x0090 0091 67 Fi2c$RFIM$0$0 == 0x0091 0091 68 _RFIM = 0x0091 0092 69 Fi2c$DPS$0$0 == 0x0092 0092 70 _DPS = 0x0092 0093 71 Fi2c$MPAGE$0$0 == 0x0093 0093 72 _MPAGE = 0x0093 0095 73 Fi2c$ENDIAN$0$0 == 0x0095 0095 74 _ENDIAN = 0x0095 0098 75 Fi2c$S0CON$0$0 == 0x0098 0098 76 _S0CON = 0x0098 009A 77 Fi2c$IEN2$0$0 == 0x009a 009A 78 _IEN2 = 0x009a 009B 79 Fi2c$S1CON$0$0 == 0x009b 009B 80 _S1CON = 0x009b 009C 81 Fi2c$T2CT$0$0 == 0x009c 009C 82 _T2CT = 0x009c 009D 83 Fi2c$T2PR$0$0 == 0x009d 009D 84 _T2PR = 0x009d 009E 85 Fi2c$T2CTL$0$0 == 0x009e 009E 86 _T2CTL = 0x009e 00A0 87 Fi2c$P2$0$0 == 0x00a0 00A0 88 _P2 = 0x00a0 00A1 89 Fi2c$WORIRQ$0$0 == 0x00a1 00A1 90 _WORIRQ = 0x00a1 00A2 91 Fi2c$WORCTRL$0$0 == 0x00a2 00A2 92 _WORCTRL = 0x00a2 00A3 93 Fi2c$WOREVT0$0$0 == 0x00a3 00A3 94 _WOREVT0 = 0x00a3 00A4 95 Fi2c$WOREVT1$0$0 == 0x00a4 00A4 96 _WOREVT1 = 0x00a4 00A5 97 Fi2c$WORTIME0$0$0 == 0x00a5 00A5 98 _WORTIME0 = 0x00a5 00A6 99 Fi2c$WORTIME1$0$0 == 0x00a6 00A6 100 _WORTIME1 = 0x00a6 00A8 101 Fi2c$IEN0$0$0 == 0x00a8 00A8 102 _IEN0 = 0x00a8 00A9 103 Fi2c$IP0$0$0 == 0x00a9 00A9 104 _IP0 = 0x00a9 00AB 105 Fi2c$FWT$0$0 == 0x00ab 00AB 106 _FWT = 0x00ab 00AC 107 Fi2c$FADDRL$0$0 == 0x00ac 00AC 108 _FADDRL = 0x00ac 00AD 109 Fi2c$FADDRH$0$0 == 0x00ad 00AD 110 _FADDRH = 0x00ad 00AE 111 Fi2c$FCTL$0$0 == 0x00ae 00AE 112 _FCTL = 0x00ae 00AF 113 Fi2c$FWDATA$0$0 == 0x00af 00AF 114 _FWDATA = 0x00af 00B1 115 Fi2c$ENCDI$0$0 == 0x00b1 00B1 116 _ENCDI = 0x00b1 00B2 117 Fi2c$ENCDO$0$0 == 0x00b2 00B2 118 _ENCDO = 0x00b2 00B3 119 Fi2c$ENCCS$0$0 == 0x00b3 00B3 120 _ENCCS = 0x00b3 00B4 121 Fi2c$ADCCON1$0$0 == 0x00b4 00B4 122 _ADCCON1 = 0x00b4 00B5 123 Fi2c$ADCCON2$0$0 == 0x00b5 00B5 124 _ADCCON2 = 0x00b5 00B6 125 Fi2c$ADCCON3$0$0 == 0x00b6 00B6 126 _ADCCON3 = 0x00b6 00B8 127 Fi2c$IEN1$0$0 == 0x00b8 00B8 128 _IEN1 = 0x00b8 00B9 129 Fi2c$IP1$0$0 == 0x00b9 00B9 130 _IP1 = 0x00b9 00BA 131 Fi2c$ADCL$0$0 == 0x00ba 00BA 132 _ADCL = 0x00ba 00BB 133 Fi2c$ADCH$0$0 == 0x00bb 00BB 134 _ADCH = 0x00bb 00BC 135 Fi2c$RNDL$0$0 == 0x00bc 00BC 136 _RNDL = 0x00bc 00BD 137 Fi2c$RNDH$0$0 == 0x00bd 00BD 138 _RNDH = 0x00bd 00BE 139 Fi2c$SLEEP$0$0 == 0x00be 00BE 140 _SLEEP = 0x00be 00C0 141 Fi2c$IRCON$0$0 == 0x00c0 00C0 142 _IRCON = 0x00c0 00C1 143 Fi2c$U0DBUF$0$0 == 0x00c1 00C1 144 _U0DBUF = 0x00c1 00C2 145 Fi2c$U0BAUD$0$0 == 0x00c2 00C2 146 _U0BAUD = 0x00c2 00C4 147 Fi2c$U0UCR$0$0 == 0x00c4 00C4 148 _U0UCR = 0x00c4 00C5 149 Fi2c$U0GCR$0$0 == 0x00c5 00C5 150 _U0GCR = 0x00c5 00C6 151 Fi2c$CLKCON$0$0 == 0x00c6 00C6 152 _CLKCON = 0x00c6 00C7 153 Fi2c$MEMCTR$0$0 == 0x00c7 00C7 154 _MEMCTR = 0x00c7 00C9 155 Fi2c$WDCTL$0$0 == 0x00c9 00C9 156 _WDCTL = 0x00c9 00CA 157 Fi2c$T3CNT$0$0 == 0x00ca 00CA 158 _T3CNT = 0x00ca 00CB 159 Fi2c$T3CTL$0$0 == 0x00cb 00CB 160 _T3CTL = 0x00cb 00CC 161 Fi2c$T3CCTL0$0$0 == 0x00cc 00CC 162 _T3CCTL0 = 0x00cc 00CD 163 Fi2c$T3CC0$0$0 == 0x00cd 00CD 164 _T3CC0 = 0x00cd 00CE 165 Fi2c$T3CCTL1$0$0 == 0x00ce 00CE 166 _T3CCTL1 = 0x00ce 00CF 167 Fi2c$T3CC1$0$0 == 0x00cf 00CF 168 _T3CC1 = 0x00cf 00D0 169 Fi2c$PSW$0$0 == 0x00d0 00D0 170 _PSW = 0x00d0 00D1 171 Fi2c$DMAIRQ$0$0 == 0x00d1 00D1 172 _DMAIRQ = 0x00d1 00D2 173 Fi2c$DMA1CFGL$0$0 == 0x00d2 00D2 174 _DMA1CFGL = 0x00d2 00D3 175 Fi2c$DMA1CFGH$0$0 == 0x00d3 00D3 176 _DMA1CFGH = 0x00d3 00D4 177 Fi2c$DMA0CFGL$0$0 == 0x00d4 00D4 178 _DMA0CFGL = 0x00d4 00D5 179 Fi2c$DMA0CFGH$0$0 == 0x00d5 00D5 180 _DMA0CFGH = 0x00d5 00D6 181 Fi2c$DMAARM$0$0 == 0x00d6 00D6 182 _DMAARM = 0x00d6 00D7 183 Fi2c$DMAREQ$0$0 == 0x00d7 00D7 184 _DMAREQ = 0x00d7 00D8 185 Fi2c$TIMIF$0$0 == 0x00d8 00D8 186 _TIMIF = 0x00d8 00D9 187 Fi2c$RFD$0$0 == 0x00d9 00D9 188 _RFD = 0x00d9 00DA 189 Fi2c$T1CC0L$0$0 == 0x00da 00DA 190 _T1CC0L = 0x00da 00DB 191 Fi2c$T1CC0H$0$0 == 0x00db 00DB 192 _T1CC0H = 0x00db 00DC 193 Fi2c$T1CC1L$0$0 == 0x00dc 00DC 194 _T1CC1L = 0x00dc 00DD 195 Fi2c$T1CC1H$0$0 == 0x00dd 00DD 196 _T1CC1H = 0x00dd 00DE 197 Fi2c$T1CC2L$0$0 == 0x00de 00DE 198 _T1CC2L = 0x00de 00DF 199 Fi2c$T1CC2H$0$0 == 0x00df 00DF 200 _T1CC2H = 0x00df 00E0 201 Fi2c$ACC$0$0 == 0x00e0 00E0 202 _ACC = 0x00e0 00E1 203 Fi2c$RFST$0$0 == 0x00e1 00E1 204 _RFST = 0x00e1 00E2 205 Fi2c$T1CNTL$0$0 == 0x00e2 00E2 206 _T1CNTL = 0x00e2 00E3 207 Fi2c$T1CNTH$0$0 == 0x00e3 00E3 208 _T1CNTH = 0x00e3 00E4 209 Fi2c$T1CTL$0$0 == 0x00e4 00E4 210 _T1CTL = 0x00e4 00E5 211 Fi2c$T1CCTL0$0$0 == 0x00e5 00E5 212 _T1CCTL0 = 0x00e5 00E6 213 Fi2c$T1CCTL1$0$0 == 0x00e6 00E6 214 _T1CCTL1 = 0x00e6 00E7 215 Fi2c$T1CCTL2$0$0 == 0x00e7 00E7 216 _T1CCTL2 = 0x00e7 00E8 217 Fi2c$IRCON2$0$0 == 0x00e8 00E8 218 _IRCON2 = 0x00e8 00E9 219 Fi2c$RFIF$0$0 == 0x00e9 00E9 220 _RFIF = 0x00e9 00EA 221 Fi2c$T4CNT$0$0 == 0x00ea 00EA 222 _T4CNT = 0x00ea 00EB 223 Fi2c$T4CTL$0$0 == 0x00eb 00EB 224 _T4CTL = 0x00eb 00EC 225 Fi2c$T4CCTL0$0$0 == 0x00ec 00EC 226 _T4CCTL0 = 0x00ec 00ED 227 Fi2c$T4CC0$0$0 == 0x00ed 00ED 228 _T4CC0 = 0x00ed 00EE 229 Fi2c$T4CCTL1$0$0 == 0x00ee 00EE 230 _T4CCTL1 = 0x00ee 00EF 231 Fi2c$T4CC1$0$0 == 0x00ef 00EF 232 _T4CC1 = 0x00ef 00F0 233 Fi2c$B$0$0 == 0x00f0 00F0 234 _B = 0x00f0 00F1 235 Fi2c$PERCFG$0$0 == 0x00f1 00F1 236 _PERCFG = 0x00f1 00F2 237 Fi2c$ADCCFG$0$0 == 0x00f2 00F2 238 _ADCCFG = 0x00f2 00F3 239 Fi2c$P0SEL$0$0 == 0x00f3 00F3 240 _P0SEL = 0x00f3 00F4 241 Fi2c$P1SEL$0$0 == 0x00f4 00F4 242 _P1SEL = 0x00f4 00F5 243 Fi2c$P2SEL$0$0 == 0x00f5 00F5 244 _P2SEL = 0x00f5 00F6 245 Fi2c$P1INP$0$0 == 0x00f6 00F6 246 _P1INP = 0x00f6 00F7 247 Fi2c$P2INP$0$0 == 0x00f7 00F7 248 _P2INP = 0x00f7 00F8 249 Fi2c$U1CSR$0$0 == 0x00f8 00F8 250 _U1CSR = 0x00f8 00F9 251 Fi2c$U1DBUF$0$0 == 0x00f9 00F9 252 _U1DBUF = 0x00f9 00FA 253 Fi2c$U1BAUD$0$0 == 0x00fa 00FA 254 _U1BAUD = 0x00fa 00FB 255 Fi2c$U1UCR$0$0 == 0x00fb 00FB 256 _U1UCR = 0x00fb 00FC 257 Fi2c$U1GCR$0$0 == 0x00fc 00FC 258 _U1GCR = 0x00fc 00FD 259 Fi2c$P0DIR$0$0 == 0x00fd 00FD 260 _P0DIR = 0x00fd 00FE 261 Fi2c$P1DIR$0$0 == 0x00fe 00FE 262 _P1DIR = 0x00fe 00FF 263 Fi2c$P2DIR$0$0 == 0x00ff 00FF 264 _P2DIR = 0x00ff FFFFD5D4 265 Fi2c$DMA0CFG$0$0 == 0xffffd5d4 FFFFD5D4 266 _DMA0CFG = 0xffffd5d4 FFFFD3D2 267 Fi2c$DMA1CFG$0$0 == 0xffffd3d2 FFFFD3D2 268 _DMA1CFG = 0xffffd3d2 FFFFADAC 269 Fi2c$FADDR$0$0 == 0xffffadac FFFFADAC 270 _FADDR = 0xffffadac FFFFBBBA 271 Fi2c$ADC$0$0 == 0xffffbbba FFFFBBBA 272 _ADC = 0xffffbbba FFFFDBDA 273 Fi2c$T1CC0$0$0 == 0xffffdbda FFFFDBDA 274 _T1CC0 = 0xffffdbda FFFFDDDC 275 Fi2c$T1CC1$0$0 == 0xffffdddc FFFFDDDC 276 _T1CC1 = 0xffffdddc FFFFDFDE 277 Fi2c$T1CC2$0$0 == 0xffffdfde FFFFDFDE 278 _T1CC2 = 0xffffdfde 279 ;-------------------------------------------------------- 280 ; special function bits 281 ;-------------------------------------------------------- 282 .area RSEG (ABS,DATA) 0000 283 .org 0x0000 0080 284 Fi2c$P0_0$0$0 == 0x0080 0080 285 _P0_0 = 0x0080 0081 286 Fi2c$P0_1$0$0 == 0x0081 0081 287 _P0_1 = 0x0081 0082 288 Fi2c$P0_2$0$0 == 0x0082 0082 289 _P0_2 = 0x0082 0083 290 Fi2c$P0_3$0$0 == 0x0083 0083 291 _P0_3 = 0x0083 0084 292 Fi2c$P0_4$0$0 == 0x0084 0084 293 _P0_4 = 0x0084 0085 294 Fi2c$P0_5$0$0 == 0x0085 0085 295 _P0_5 = 0x0085 0086 296 Fi2c$P0_6$0$0 == 0x0086 0086 297 _P0_6 = 0x0086 0087 298 Fi2c$P0_7$0$0 == 0x0087 0087 299 _P0_7 = 0x0087 0088 300 Fi2c$_TCON_0$0$0 == 0x0088 0088 301 __TCON_0 = 0x0088 0089 302 Fi2c$RFTXRXIF$0$0 == 0x0089 0089 303 _RFTXRXIF = 0x0089 008A 304 Fi2c$_TCON_2$0$0 == 0x008a 008A 305 __TCON_2 = 0x008a 008B 306 Fi2c$URX0IF$0$0 == 0x008b 008B 307 _URX0IF = 0x008b 008C 308 Fi2c$_TCON_4$0$0 == 0x008c 008C 309 __TCON_4 = 0x008c 008D 310 Fi2c$ADCIF$0$0 == 0x008d 008D 311 _ADCIF = 0x008d 008E 312 Fi2c$_TCON_6$0$0 == 0x008e 008E 313 __TCON_6 = 0x008e 008F 314 Fi2c$URX1IF$0$0 == 0x008f 008F 315 _URX1IF = 0x008f 0090 316 Fi2c$P1_0$0$0 == 0x0090 0090 317 _P1_0 = 0x0090 0091 318 Fi2c$P1_1$0$0 == 0x0091 0091 319 _P1_1 = 0x0091 0092 320 Fi2c$P1_2$0$0 == 0x0092 0092 321 _P1_2 = 0x0092 0093 322 Fi2c$P1_3$0$0 == 0x0093 0093 323 _P1_3 = 0x0093 0094 324 Fi2c$P1_4$0$0 == 0x0094 0094 325 _P1_4 = 0x0094 0095 326 Fi2c$P1_5$0$0 == 0x0095 0095 327 _P1_5 = 0x0095 0096 328 Fi2c$P1_6$0$0 == 0x0096 0096 329 _P1_6 = 0x0096 0097 330 Fi2c$P1_7$0$0 == 0x0097 0097 331 _P1_7 = 0x0097 0098 332 Fi2c$ENCIF_0$0$0 == 0x0098 0098 333 _ENCIF_0 = 0x0098 0099 334 Fi2c$ENCIF_1$0$0 == 0x0099 0099 335 _ENCIF_1 = 0x0099 009A 336 Fi2c$_SOCON2$0$0 == 0x009a 009A 337 __SOCON2 = 0x009a 009B 338 Fi2c$_SOCON3$0$0 == 0x009b 009B 339 __SOCON3 = 0x009b 009C 340 Fi2c$_SOCON4$0$0 == 0x009c 009C 341 __SOCON4 = 0x009c 009D 342 Fi2c$_SOCON5$0$0 == 0x009d 009D 343 __SOCON5 = 0x009d 009E 344 Fi2c$_SOCON6$0$0 == 0x009e 009E 345 __SOCON6 = 0x009e 009F 346 Fi2c$_SOCON7$0$0 == 0x009f 009F 347 __SOCON7 = 0x009f 00A0 348 Fi2c$P2_0$0$0 == 0x00a0 00A0 349 _P2_0 = 0x00a0 00A1 350 Fi2c$P2_1$0$0 == 0x00a1 00A1 351 _P2_1 = 0x00a1 00A2 352 Fi2c$P2_2$0$0 == 0x00a2 00A2 353 _P2_2 = 0x00a2 00A3 354 Fi2c$P2_3$0$0 == 0x00a3 00A3 355 _P2_3 = 0x00a3 00A4 356 Fi2c$P2_4$0$0 == 0x00a4 00A4 357 _P2_4 = 0x00a4 00A5 358 Fi2c$P2_5$0$0 == 0x00a5 00A5 359 _P2_5 = 0x00a5 00A6 360 Fi2c$P2_6$0$0 == 0x00a6 00A6 361 _P2_6 = 0x00a6 00A7 362 Fi2c$P2_7$0$0 == 0x00a7 00A7 363 _P2_7 = 0x00a7 00A8 364 Fi2c$RFTXRXIE$0$0 == 0x00a8 00A8 365 _RFTXRXIE = 0x00a8 00A9 366 Fi2c$ADCIE$0$0 == 0x00a9 00A9 367 _ADCIE = 0x00a9 00AA 368 Fi2c$URX0IE$0$0 == 0x00aa 00AA 369 _URX0IE = 0x00aa 00AB 370 Fi2c$URX1IE$0$0 == 0x00ab 00AB 371 _URX1IE = 0x00ab 00AC 372 Fi2c$ENCIE$0$0 == 0x00ac 00AC 373 _ENCIE = 0x00ac 00AD 374 Fi2c$STIE$0$0 == 0x00ad 00AD 375 _STIE = 0x00ad 00AE 376 Fi2c$_IEN06$0$0 == 0x00ae 00AE 377 __IEN06 = 0x00ae 00AF 378 Fi2c$EA$0$0 == 0x00af 00AF 379 _EA = 0x00af 00B8 380 Fi2c$DMAIE$0$0 == 0x00b8 00B8 381 _DMAIE = 0x00b8 00B9 382 Fi2c$T1IE$0$0 == 0x00b9 00B9 383 _T1IE = 0x00b9 00BA 384 Fi2c$T2IE$0$0 == 0x00ba 00BA 385 _T2IE = 0x00ba 00BB 386 Fi2c$T3IE$0$0 == 0x00bb 00BB 387 _T3IE = 0x00bb 00BC 388 Fi2c$T4IE$0$0 == 0x00bc 00BC 389 _T4IE = 0x00bc 00BD 390 Fi2c$P0IE$0$0 == 0x00bd 00BD 391 _P0IE = 0x00bd 00BE 392 Fi2c$_IEN16$0$0 == 0x00be 00BE 393 __IEN16 = 0x00be 00BF 394 Fi2c$_IEN17$0$0 == 0x00bf 00BF 395 __IEN17 = 0x00bf 00C0 396 Fi2c$DMAIF$0$0 == 0x00c0 00C0 397 _DMAIF = 0x00c0 00C1 398 Fi2c$T1IF$0$0 == 0x00c1 00C1 399 _T1IF = 0x00c1 00C2 400 Fi2c$T2IF$0$0 == 0x00c2 00C2 401 _T2IF = 0x00c2 00C3 402 Fi2c$T3IF$0$0 == 0x00c3 00C3 403 _T3IF = 0x00c3 00C4 404 Fi2c$T4IF$0$0 == 0x00c4 00C4 405 _T4IF = 0x00c4 00C5 406 Fi2c$P0IF$0$0 == 0x00c5 00C5 407 _P0IF = 0x00c5 00C6 408 Fi2c$_IRCON6$0$0 == 0x00c6 00C6 409 __IRCON6 = 0x00c6 00C7 410 Fi2c$STIF$0$0 == 0x00c7 00C7 411 _STIF = 0x00c7 00D0 412 Fi2c$P$0$0 == 0x00d0 00D0 413 _P = 0x00d0 00D1 414 Fi2c$F1$0$0 == 0x00d1 00D1 415 _F1 = 0x00d1 00D2 416 Fi2c$OV$0$0 == 0x00d2 00D2 417 _OV = 0x00d2 00D3 418 Fi2c$RS0$0$0 == 0x00d3 00D3 419 _RS0 = 0x00d3 00D4 420 Fi2c$RS1$0$0 == 0x00d4 00D4 421 _RS1 = 0x00d4 00D5 422 Fi2c$F0$0$0 == 0x00d5 00D5 423 _F0 = 0x00d5 00D6 424 Fi2c$AC$0$0 == 0x00d6 00D6 425 _AC = 0x00d6 00D7 426 Fi2c$CY$0$0 == 0x00d7 00D7 427 _CY = 0x00d7 00D8 428 Fi2c$T3OVFIF$0$0 == 0x00d8 00D8 429 _T3OVFIF = 0x00d8 00D9 430 Fi2c$T3CH0IF$0$0 == 0x00d9 00D9 431 _T3CH0IF = 0x00d9 00DA 432 Fi2c$T3CH1IF$0$0 == 0x00da 00DA 433 _T3CH1IF = 0x00da 00DB 434 Fi2c$T4OVFIF$0$0 == 0x00db 00DB 435 _T4OVFIF = 0x00db 00DC 436 Fi2c$T4CH0IF$0$0 == 0x00dc 00DC 437 _T4CH0IF = 0x00dc 00DD 438 Fi2c$T4CH1IF$0$0 == 0x00dd 00DD 439 _T4CH1IF = 0x00dd 00DE 440 Fi2c$OVFIM$0$0 == 0x00de 00DE 441 _OVFIM = 0x00de 00DF 442 Fi2c$_TIMIF7$0$0 == 0x00df 00DF 443 __TIMIF7 = 0x00df 00E0 444 Fi2c$ACC_0$0$0 == 0x00e0 00E0 445 _ACC_0 = 0x00e0 00E1 446 Fi2c$ACC_1$0$0 == 0x00e1 00E1 447 _ACC_1 = 0x00e1 00E2 448 Fi2c$ACC_2$0$0 == 0x00e2 00E2 449 _ACC_2 = 0x00e2 00E3 450 Fi2c$ACC_3$0$0 == 0x00e3 00E3 451 _ACC_3 = 0x00e3 00E4 452 Fi2c$ACC_4$0$0 == 0x00e4 00E4 453 _ACC_4 = 0x00e4 00E5 454 Fi2c$ACC_5$0$0 == 0x00e5 00E5 455 _ACC_5 = 0x00e5 00E6 456 Fi2c$ACC_6$0$0 == 0x00e6 00E6 457 _ACC_6 = 0x00e6 00E7 458 Fi2c$ACC_7$0$0 == 0x00e7 00E7 459 _ACC_7 = 0x00e7 00E8 460 Fi2c$P2IF$0$0 == 0x00e8 00E8 461 _P2IF = 0x00e8 00E9 462 Fi2c$UTX0IF$0$0 == 0x00e9 00E9 463 _UTX0IF = 0x00e9 00EA 464 Fi2c$UTX1IF$0$0 == 0x00ea 00EA 465 _UTX1IF = 0x00ea 00EB 466 Fi2c$P1IF$0$0 == 0x00eb 00EB 467 _P1IF = 0x00eb 00EC 468 Fi2c$WDTIF$0$0 == 0x00ec 00EC 469 _WDTIF = 0x00ec 00ED 470 Fi2c$_IRCON25$0$0 == 0x00ed 00ED 471 __IRCON25 = 0x00ed 00EE 472 Fi2c$_IRCON26$0$0 == 0x00ee 00EE 473 __IRCON26 = 0x00ee 00EF 474 Fi2c$_IRCON27$0$0 == 0x00ef 00EF 475 __IRCON27 = 0x00ef 00F0 476 Fi2c$B_0$0$0 == 0x00f0 00F0 477 _B_0 = 0x00f0 00F1 478 Fi2c$B_1$0$0 == 0x00f1 00F1 479 _B_1 = 0x00f1 00F2 480 Fi2c$B_2$0$0 == 0x00f2 00F2 481 _B_2 = 0x00f2 00F3 482 Fi2c$B_3$0$0 == 0x00f3 00F3 483 _B_3 = 0x00f3 00F4 484 Fi2c$B_4$0$0 == 0x00f4 00F4 485 _B_4 = 0x00f4 00F5 486 Fi2c$B_5$0$0 == 0x00f5 00F5 487 _B_5 = 0x00f5 00F6 488 Fi2c$B_6$0$0 == 0x00f6 00F6 489 _B_6 = 0x00f6 00F7 490 Fi2c$B_7$0$0 == 0x00f7 00F7 491 _B_7 = 0x00f7 00F8 492 Fi2c$U1ACTIVE$0$0 == 0x00f8 00F8 493 _U1ACTIVE = 0x00f8 00F9 494 Fi2c$U1TX_BYTE$0$0 == 0x00f9 00F9 495 _U1TX_BYTE = 0x00f9 00FA 496 Fi2c$U1RX_BYTE$0$0 == 0x00fa 00FA 497 _U1RX_BYTE = 0x00fa 00FB 498 Fi2c$U1ERR$0$0 == 0x00fb 00FB 499 _U1ERR = 0x00fb 00FC 500 Fi2c$U1FE$0$0 == 0x00fc 00FC 501 _U1FE = 0x00fc 00FD 502 Fi2c$U1SLAVE$0$0 == 0x00fd 00FD 503 _U1SLAVE = 0x00fd 00FE 504 Fi2c$U1RE$0$0 == 0x00fe 00FE 505 _U1RE = 0x00fe 00FF 506 Fi2c$U1MODE$0$0 == 0x00ff 00FF 507 _U1MODE = 0x00ff 508 ;-------------------------------------------------------- 509 ; overlayable register banks 510 ;-------------------------------------------------------- 511 .area REG_BANK_0 (REL,OVR,DATA) 0000 512 .ds 8 513 ;-------------------------------------------------------- 514 ; overlayable bit register bank 515 ;-------------------------------------------------------- 516 .area BIT_BANK (REL,OVR,DATA) 0000 517 bits: 0000 518 .ds 1 8000 519 b0 = bits[0] 8100 520 b1 = bits[1] 8200 521 b2 = bits[2] 8300 522 b3 = bits[3] 8400 523 b4 = bits[4] 8500 524 b5 = bits[5] 8600 525 b6 = bits[6] 8700 526 b7 = bits[7] 527 ;-------------------------------------------------------- 528 ; internal ram data 529 ;-------------------------------------------------------- 530 .area DSEG (DATA) 0000 531 G$i2cPinScl$0$0==. 0000 532 _i2cPinScl:: 0000 533 .ds 1 0001 534 G$i2cPinSda$0$0==. 0001 535 _i2cPinSda:: 0001 536 .ds 1 0002 537 Li2cWaitForHighScl$sloc0$1$0==. 0002 538 _i2cWaitForHighScl_sloc0_1_0: 0002 539 .ds 4 540 ;-------------------------------------------------------- 541 ; overlayable items in internal ram 542 ;-------------------------------------------------------- 543 .area OSEG (OVR,DATA) 544 ;-------------------------------------------------------- 545 ; indirectly addressable internal ram data 546 ;-------------------------------------------------------- 547 .area ISEG (DATA) 548 ;-------------------------------------------------------- 549 ; absolute internal ram data 550 ;-------------------------------------------------------- 551 .area IABS (ABS,DATA) 552 .area IABS (ABS,DATA) 553 ;-------------------------------------------------------- 554 ; bit data 555 ;-------------------------------------------------------- 556 .area BSEG (BIT) 0000 557 Fi2c$started$0$0==. 0000 558 _started: 0000 559 .ds 1 0001 560 G$i2cTimeoutOccurred$0$0==. 0001 561 _i2cTimeoutOccurred:: 0001 562 .ds 1 0002 563 Fi2c$internalTimeoutOccurred$0$0==. 0002 564 _internalTimeoutOccurred: 0002 565 .ds 1 0003 566 Li2cWriteBit$b$1$1==. 0003 567 _i2cWriteBit_PARM_1: 0003 568 .ds 1 0004 569 Li2cReadBit$b$1$1==. 0004 570 _i2cReadBit_b_1_1: 0004 571 .ds 1 0005 572 Li2cWriteByte$nack$1$1==. 0005 573 _i2cWriteByte_nack_1_1: 0005 574 .ds 1 0006 575 Li2cReadByte$nack$1$1==. 0006 576 _i2cReadByte_PARM_1: 0006 577 .ds 1 0007 578 Li2cReadByte$b$1$1==. 0007 579 _i2cReadByte_b_1_1: 0007 580 .ds 1 581 ;-------------------------------------------------------- 582 ; paged external ram data 583 ;-------------------------------------------------------- 584 .area PSEG (PAG,XDATA) 0000 585 Li2cWaitForHighScl$time$1$1==. 0000 586 _i2cWaitForHighScl_time_1_1: 0000 587 .ds 4 588 ;-------------------------------------------------------- 589 ; external ram data 590 ;-------------------------------------------------------- 591 .area XSEG (XDATA) DF00 592 Fi2c$SYNC1$0$0 == 0xdf00 DF00 593 _SYNC1 = 0xdf00 DF01 594 Fi2c$SYNC0$0$0 == 0xdf01 DF01 595 _SYNC0 = 0xdf01 DF02 596 Fi2c$PKTLEN$0$0 == 0xdf02 DF02 597 _PKTLEN = 0xdf02 DF03 598 Fi2c$PKTCTRL1$0$0 == 0xdf03 DF03 599 _PKTCTRL1 = 0xdf03 DF04 600 Fi2c$PKTCTRL0$0$0 == 0xdf04 DF04 601 _PKTCTRL0 = 0xdf04 DF05 602 Fi2c$ADDR$0$0 == 0xdf05 DF05 603 _ADDR = 0xdf05 DF06 604 Fi2c$CHANNR$0$0 == 0xdf06 DF06 605 _CHANNR = 0xdf06 DF07 606 Fi2c$FSCTRL1$0$0 == 0xdf07 DF07 607 _FSCTRL1 = 0xdf07 DF08 608 Fi2c$FSCTRL0$0$0 == 0xdf08 DF08 609 _FSCTRL0 = 0xdf08 DF09 610 Fi2c$FREQ2$0$0 == 0xdf09 DF09 611 _FREQ2 = 0xdf09 DF0A 612 Fi2c$FREQ1$0$0 == 0xdf0a DF0A 613 _FREQ1 = 0xdf0a DF0B 614 Fi2c$FREQ0$0$0 == 0xdf0b DF0B 615 _FREQ0 = 0xdf0b DF0C 616 Fi2c$MDMCFG4$0$0 == 0xdf0c DF0C 617 _MDMCFG4 = 0xdf0c DF0D 618 Fi2c$MDMCFG3$0$0 == 0xdf0d DF0D 619 _MDMCFG3 = 0xdf0d DF0E 620 Fi2c$MDMCFG2$0$0 == 0xdf0e DF0E 621 _MDMCFG2 = 0xdf0e DF0F 622 Fi2c$MDMCFG1$0$0 == 0xdf0f DF0F 623 _MDMCFG1 = 0xdf0f DF10 624 Fi2c$MDMCFG0$0$0 == 0xdf10 DF10 625 _MDMCFG0 = 0xdf10 DF11 626 Fi2c$DEVIATN$0$0 == 0xdf11 DF11 627 _DEVIATN = 0xdf11 DF12 628 Fi2c$MCSM2$0$0 == 0xdf12 DF12 629 _MCSM2 = 0xdf12 DF13 630 Fi2c$MCSM1$0$0 == 0xdf13 DF13 631 _MCSM1 = 0xdf13 DF14 632 Fi2c$MCSM0$0$0 == 0xdf14 DF14 633 _MCSM0 = 0xdf14 DF15 634 Fi2c$FOCCFG$0$0 == 0xdf15 DF15 635 _FOCCFG = 0xdf15 DF16 636 Fi2c$BSCFG$0$0 == 0xdf16 DF16 637 _BSCFG = 0xdf16 DF17 638 Fi2c$AGCCTRL2$0$0 == 0xdf17 DF17 639 _AGCCTRL2 = 0xdf17 DF18 640 Fi2c$AGCCTRL1$0$0 == 0xdf18 DF18 641 _AGCCTRL1 = 0xdf18 DF19 642 Fi2c$AGCCTRL0$0$0 == 0xdf19 DF19 643 _AGCCTRL0 = 0xdf19 DF1A 644 Fi2c$FREND1$0$0 == 0xdf1a DF1A 645 _FREND1 = 0xdf1a DF1B 646 Fi2c$FREND0$0$0 == 0xdf1b DF1B 647 _FREND0 = 0xdf1b DF1C 648 Fi2c$FSCAL3$0$0 == 0xdf1c DF1C 649 _FSCAL3 = 0xdf1c DF1D 650 Fi2c$FSCAL2$0$0 == 0xdf1d DF1D 651 _FSCAL2 = 0xdf1d DF1E 652 Fi2c$FSCAL1$0$0 == 0xdf1e DF1E 653 _FSCAL1 = 0xdf1e DF1F 654 Fi2c$FSCAL0$0$0 == 0xdf1f DF1F 655 _FSCAL0 = 0xdf1f DF23 656 Fi2c$TEST2$0$0 == 0xdf23 DF23 657 _TEST2 = 0xdf23 DF24 658 Fi2c$TEST1$0$0 == 0xdf24 DF24 659 _TEST1 = 0xdf24 DF25 660 Fi2c$TEST0$0$0 == 0xdf25 DF25 661 _TEST0 = 0xdf25 DF2E 662 Fi2c$PA_TABLE0$0$0 == 0xdf2e DF2E 663 _PA_TABLE0 = 0xdf2e DF2F 664 Fi2c$IOCFG2$0$0 == 0xdf2f DF2F 665 _IOCFG2 = 0xdf2f DF30 666 Fi2c$IOCFG1$0$0 == 0xdf30 DF30 667 _IOCFG1 = 0xdf30 DF31 668 Fi2c$IOCFG0$0$0 == 0xdf31 DF31 669 _IOCFG0 = 0xdf31 DF36 670 Fi2c$PARTNUM$0$0 == 0xdf36 DF36 671 _PARTNUM = 0xdf36 DF37 672 Fi2c$VERSION$0$0 == 0xdf37 DF37 673 _VERSION = 0xdf37 DF38 674 Fi2c$FREQEST$0$0 == 0xdf38 DF38 675 _FREQEST = 0xdf38 DF39 676 Fi2c$LQI$0$0 == 0xdf39 DF39 677 _LQI = 0xdf39 DF3A 678 Fi2c$RSSI$0$0 == 0xdf3a DF3A 679 _RSSI = 0xdf3a DF3B 680 Fi2c$MARCSTATE$0$0 == 0xdf3b DF3B 681 _MARCSTATE = 0xdf3b DF3C 682 Fi2c$PKTSTATUS$0$0 == 0xdf3c DF3C 683 _PKTSTATUS = 0xdf3c DF3D 684 Fi2c$VCO_VC_DAC$0$0 == 0xdf3d DF3D 685 _VCO_VC_DAC = 0xdf3d DF40 686 Fi2c$I2SCFG0$0$0 == 0xdf40 DF40 687 _I2SCFG0 = 0xdf40 DF41 688 Fi2c$I2SCFG1$0$0 == 0xdf41 DF41 689 _I2SCFG1 = 0xdf41 DF42 690 Fi2c$I2SDATL$0$0 == 0xdf42 DF42 691 _I2SDATL = 0xdf42 DF43 692 Fi2c$I2SDATH$0$0 == 0xdf43 DF43 693 _I2SDATH = 0xdf43 DF44 694 Fi2c$I2SWCNT$0$0 == 0xdf44 DF44 695 _I2SWCNT = 0xdf44 DF45 696 Fi2c$I2SSTAT$0$0 == 0xdf45 DF45 697 _I2SSTAT = 0xdf45 DF46 698 Fi2c$I2SCLKF0$0$0 == 0xdf46 DF46 699 _I2SCLKF0 = 0xdf46 DF47 700 Fi2c$I2SCLKF1$0$0 == 0xdf47 DF47 701 _I2SCLKF1 = 0xdf47 DF48 702 Fi2c$I2SCLKF2$0$0 == 0xdf48 DF48 703 _I2SCLKF2 = 0xdf48 DE00 704 Fi2c$USBADDR$0$0 == 0xde00 DE00 705 _USBADDR = 0xde00 DE01 706 Fi2c$USBPOW$0$0 == 0xde01 DE01 707 _USBPOW = 0xde01 DE02 708 Fi2c$USBIIF$0$0 == 0xde02 DE02 709 _USBIIF = 0xde02 DE04 710 Fi2c$USBOIF$0$0 == 0xde04 DE04 711 _USBOIF = 0xde04 DE06 712 Fi2c$USBCIF$0$0 == 0xde06 DE06 713 _USBCIF = 0xde06 DE07 714 Fi2c$USBIIE$0$0 == 0xde07 DE07 715 _USBIIE = 0xde07 DE09 716 Fi2c$USBOIE$0$0 == 0xde09 DE09 717 _USBOIE = 0xde09 DE0B 718 Fi2c$USBCIE$0$0 == 0xde0b DE0B 719 _USBCIE = 0xde0b DE0C 720 Fi2c$USBFRML$0$0 == 0xde0c DE0C 721 _USBFRML = 0xde0c DE0D 722 Fi2c$USBFRMH$0$0 == 0xde0d DE0D 723 _USBFRMH = 0xde0d DE0E 724 Fi2c$USBINDEX$0$0 == 0xde0e DE0E 725 _USBINDEX = 0xde0e DE10 726 Fi2c$USBMAXI$0$0 == 0xde10 DE10 727 _USBMAXI = 0xde10 DE11 728 Fi2c$USBCSIL$0$0 == 0xde11 DE11 729 _USBCSIL = 0xde11 DE12 730 Fi2c$USBCSIH$0$0 == 0xde12 DE12 731 _USBCSIH = 0xde12 DE13 732 Fi2c$USBMAXO$0$0 == 0xde13 DE13 733 _USBMAXO = 0xde13 DE14 734 Fi2c$USBCSOL$0$0 == 0xde14 DE14 735 _USBCSOL = 0xde14 DE15 736 Fi2c$USBCSOH$0$0 == 0xde15 DE15 737 _USBCSOH = 0xde15 DE16 738 Fi2c$USBCNTL$0$0 == 0xde16 DE16 739 _USBCNTL = 0xde16 DE17 740 Fi2c$USBCNTH$0$0 == 0xde17 DE17 741 _USBCNTH = 0xde17 DE20 742 Fi2c$USBF0$0$0 == 0xde20 DE20 743 _USBF0 = 0xde20 DE22 744 Fi2c$USBF1$0$0 == 0xde22 DE22 745 _USBF1 = 0xde22 DE24 746 Fi2c$USBF2$0$0 == 0xde24 DE24 747 _USBF2 = 0xde24 DE26 748 Fi2c$USBF3$0$0 == 0xde26 DE26 749 _USBF3 = 0xde26 DE28 750 Fi2c$USBF4$0$0 == 0xde28 DE28 751 _USBF4 = 0xde28 DE2A 752 Fi2c$USBF5$0$0 == 0xde2a DE2A 753 _USBF5 = 0xde2a 754 ;-------------------------------------------------------- 755 ; absolute external ram data 756 ;-------------------------------------------------------- 757 .area XABS (ABS,XDATA) 758 ;-------------------------------------------------------- 759 ; external initialized ram data 760 ;-------------------------------------------------------- 761 .area XISEG (XDATA) 0000 762 Fi2c$halfPeriodUs$0$0==. 0000 763 _halfPeriodUs: 0000 764 .ds 2 0002 765 Fi2c$timeout$0$0==. 0002 766 _timeout: 0002 767 .ds 2 768 .area HOME (CODE) 769 .area GSINIT0 (CODE) 770 .area GSINIT1 (CODE) 771 .area GSINIT2 (CODE) 772 .area GSINIT3 (CODE) 773 .area GSINIT4 (CODE) 774 .area GSINIT5 (CODE) 775 .area GSINIT (CODE) 776 .area GSFINAL (CODE) 777 .area CSEG (CODE) 778 ;-------------------------------------------------------- 779 ; global & static initialisations 780 ;-------------------------------------------------------- 781 .area HOME (CODE) 782 .area GSINIT (CODE) 783 .area GSFINAL (CODE) 784 .area GSINIT (CODE) 0000 785 G$i2cReadByte$0$0 ==. 0000 786 C$i2c.c$16$1$1 ==. 787 ; libraries/src/i2c/i2c.c:16: uint8 DATA i2cPinScl = 10; // P1_0 0000 75*00 0A 788 mov _i2cPinScl,#0x0A 0003 789 G$i2cReadByte$0$0 ==. 0003 790 C$i2c.c$17$1$1 ==. 791 ; libraries/src/i2c/i2c.c:17: uint8 DATA i2cPinSda = 11; // P1_1 0003 75*01 0B 792 mov _i2cPinSda,#0x0B 0006 793 G$i2cReadByte$0$0 ==. 0006 794 C$i2c.c$21$1$1 ==. 795 ; libraries/src/i2c/i2c.c:21: static BIT started = 0; 0006 C2*00 796 clr _started 0008 797 G$i2cReadByte$0$0 ==. 0008 798 C$i2c.c$29$1$1 ==. 799 ; libraries/src/i2c/i2c.c:29: BIT i2cTimeoutOccurred = 0; 0008 C2*01 800 clr _i2cTimeoutOccurred 000A 801 G$i2cReadByte$0$0 ==. 000A 802 C$i2c.c$30$1$1 ==. 803 ; libraries/src/i2c/i2c.c:30: static BIT internalTimeoutOccurred = 0; 000A C2*02 804 clr _internalTimeoutOccurred 805 ;-------------------------------------------------------- 806 ; Home 807 ;-------------------------------------------------------- 808 .area HOME (CODE) 809 .area HOME (CODE) 810 ;-------------------------------------------------------- 811 ; code 812 ;-------------------------------------------------------- 813 .area CSEG (CODE) 814 ;------------------------------------------------------------ 815 ;Allocation info for local variables in function 'i2cSetFrequency' 816 ;------------------------------------------------------------ 817 ;------------------------------------------------------------ 0000 818 G$i2cSetFrequency$0$0 ==. 0000 819 C$i2c.c$35$0$0 ==. 820 ; libraries/src/i2c/i2c.c:35: void i2cSetFrequency(uint16 freqKHz) 821 ; ----------------------------------------- 822 ; function i2cSetFrequency 823 ; ----------------------------------------- 0000 824 _i2cSetFrequency: 0002 825 ar2 = 0x02 0003 826 ar3 = 0x03 0004 827 ar4 = 0x04 0005 828 ar5 = 0x05 0006 829 ar6 = 0x06 0007 830 ar7 = 0x07 0000 831 ar0 = 0x00 0001 832 ar1 = 0x01 0000 AA 82 833 mov r2,dpl 0002 AB 83 834 mov r3,dph 0004 835 C$i2c.c$38$1$1 ==. 836 ; libraries/src/i2c/i2c.c:38: if (freqKHz < 2) 0004 C3 837 clr c 0005 EA 838 mov a,r2 0006 94 02 839 subb a,#0x02 0008 EB 840 mov a,r3 0009 94 00 841 subb a,#0x00 000B 50 04 842 jnc 00102$ 000D 843 C$i2c.c$40$2$2 ==. 844 ; libraries/src/i2c/i2c.c:40: freqKHz = 2; 000D 7A 02 845 mov r2,#0x02 000F 7B 00 846 mov r3,#0x00 0011 847 00102$: 0011 848 C$i2c.c$45$1$1 ==. 849 ; libraries/src/i2c/i2c.c:45: halfPeriodUs = (500 + freqKHz - 1) / freqKHz; 0011 74 F3 850 mov a,#0xF3 0013 2A 851 add a,r2 0014 F5 82 852 mov dpl,a 0016 74 01 853 mov a,#0x01 0018 3B 854 addc a,r3 0019 F5 83 855 mov dph,a 001B 78r00 856 mov r0,#__divuint_PARM_2 001D EA 857 mov a,r2 001E F2 858 movx @r0,a 001F 08 859 inc r0 0020 EB 860 mov a,r3 0021 F2 861 movx @r0,a 0022 12s00r00 862 lcall __divuint 0025 E5 82 863 mov a,dpl 0027 85 83 F0 864 mov b,dph 002A 90s00r00 865 mov dptr,#_halfPeriodUs 002D F0 866 movx @dptr,a 002E A3 867 inc dptr 002F E5 F0 868 mov a,b 0031 F0 869 movx @dptr,a 0032 870 C$i2c.c$46$1$1 ==. 0032 871 XG$i2cSetFrequency$0$0 ==. 0032 22 872 ret 873 ;------------------------------------------------------------ 874 ;Allocation info for local variables in function 'i2cSetTimeout' 875 ;------------------------------------------------------------ 876 ;------------------------------------------------------------ 0033 877 G$i2cSetTimeout$0$0 ==. 0033 878 C$i2c.c$48$1$1 ==. 879 ; libraries/src/i2c/i2c.c:48: void i2cSetTimeout(uint16 timeoutMs) 880 ; ----------------------------------------- 881 ; function i2cSetTimeout 882 ; ----------------------------------------- 0033 883 _i2cSetTimeout: 0033 AA 83 884 mov r2,dph 0035 E5 82 885 mov a,dpl 0037 90s00r02 886 mov dptr,#_timeout 003A F0 887 movx @dptr,a 003B A3 888 inc dptr 003C EA 889 mov a,r2 003D F0 890 movx @dptr,a 003E 891 C$i2c.c$50$1$1 ==. 892 ; libraries/src/i2c/i2c.c:50: timeout = timeoutMs; 003E 893 C$i2c.c$51$1$1 ==. 003E 894 XG$i2cSetTimeout$0$0 ==. 003E 22 895 ret 896 ;------------------------------------------------------------ 897 ;Allocation info for local variables in function 'i2cReadScl' 898 ;------------------------------------------------------------ 899 ;------------------------------------------------------------ 003F 900 G$i2cReadScl$0$0 ==. 003F 901 C$i2c.c$53$1$1 ==. 902 ; libraries/src/i2c/i2c.c:53: BIT i2cReadScl(void) 903 ; ----------------------------------------- 904 ; function i2cReadScl 905 ; ----------------------------------------- 003F 906 _i2cReadScl: 003F 907 C$i2c.c$55$1$1 ==. 908 ; libraries/src/i2c/i2c.c:55: setDigitalInput(i2cPinScl, HIGH_IMPEDANCE); 003F C2 F0 909 clr b[0] 0041 85 F0*00 910 mov bits,b 0044 85*00 82 911 mov dpl,_i2cPinScl 0047 12s00r00 912 lcall _setDigitalInput 004A 913 C$i2c.c$56$1$1 ==. 914 ; libraries/src/i2c/i2c.c:56: return isPinHigh(i2cPinScl); 004A 85*00 82 915 mov dpl,_i2cPinScl 004D 916 C$i2c.c$57$1$1 ==. 004D 917 XG$i2cReadScl$0$0 ==. 004D 02s00r00 918 ljmp _isPinHigh 919 ;------------------------------------------------------------ 920 ;Allocation info for local variables in function 'i2cReadSda' 921 ;------------------------------------------------------------ 922 ;------------------------------------------------------------ 0050 923 G$i2cReadSda$0$0 ==. 0050 924 C$i2c.c$59$1$1 ==. 925 ; libraries/src/i2c/i2c.c:59: BIT i2cReadSda(void) 926 ; ----------------------------------------- 927 ; function i2cReadSda 928 ; ----------------------------------------- 0050 929 _i2cReadSda: 0050 930 C$i2c.c$61$1$1 ==. 931 ; libraries/src/i2c/i2c.c:61: setDigitalInput(i2cPinSda, HIGH_IMPEDANCE); 0050 C2 F0 932 clr b[0] 0052 85 F0*00 933 mov bits,b 0055 85*01 82 934 mov dpl,_i2cPinSda 0058 12s00r00 935 lcall _setDigitalInput 005B 936 C$i2c.c$62$1$1 ==. 937 ; libraries/src/i2c/i2c.c:62: return isPinHigh(i2cPinSda); 005B 85*01 82 938 mov dpl,_i2cPinSda 005E 939 C$i2c.c$63$1$1 ==. 005E 940 XG$i2cReadSda$0$0 ==. 005E 02s00r00 941 ljmp _isPinHigh 942 ;------------------------------------------------------------ 943 ;Allocation info for local variables in function 'i2cClearScl' 944 ;------------------------------------------------------------ 945 ;------------------------------------------------------------ 0061 946 G$i2cClearScl$0$0 ==. 0061 947 C$i2c.c$65$1$1 ==. 948 ; libraries/src/i2c/i2c.c:65: void i2cClearScl(void) 949 ; ----------------------------------------- 950 ; function i2cClearScl 951 ; ----------------------------------------- 0061 952 _i2cClearScl: 0061 953 C$i2c.c$67$1$1 ==. 954 ; libraries/src/i2c/i2c.c:67: setDigitalOutput(i2cPinScl, LOW); 0061 C2 F0 955 clr b[0] 0063 85 F0*00 956 mov bits,b 0066 85*00 82 957 mov dpl,_i2cPinScl 0069 958 C$i2c.c$68$1$1 ==. 0069 959 XG$i2cClearScl$0$0 ==. 0069 02s00r00 960 ljmp _setDigitalOutput 961 ;------------------------------------------------------------ 962 ;Allocation info for local variables in function 'i2cClearSda' 963 ;------------------------------------------------------------ 964 ;------------------------------------------------------------ 006C 965 G$i2cClearSda$0$0 ==. 006C 966 C$i2c.c$70$1$1 ==. 967 ; libraries/src/i2c/i2c.c:70: void i2cClearSda(void) 968 ; ----------------------------------------- 969 ; function i2cClearSda 970 ; ----------------------------------------- 006C 971 _i2cClearSda: 006C 972 C$i2c.c$72$1$1 ==. 973 ; libraries/src/i2c/i2c.c:72: setDigitalOutput(i2cPinSda, LOW); 006C C2 F0 974 clr b[0] 006E 85 F0*00 975 mov bits,b 0071 85*01 82 976 mov dpl,_i2cPinSda 0074 977 C$i2c.c$73$1$1 ==. 0074 978 XG$i2cClearSda$0$0 ==. 0074 02s00r00 979 ljmp _setDigitalOutput 980 ;------------------------------------------------------------ 981 ;Allocation info for local variables in function 'i2cWaitForHighScl' 982 ;------------------------------------------------------------ 983 ;sloc0 Allocated with name '_i2cWaitForHighScl_sloc0_1_0' 984 ;------------------------------------------------------------ 0077 985 G$i2cWaitForHighScl$0$0 ==. 0077 986 C$i2c.c$75$1$1 ==. 987 ; libraries/src/i2c/i2c.c:75: void i2cWaitForHighScl(uint16 timeoutMs) 988 ; ----------------------------------------- 989 ; function i2cWaitForHighScl 990 ; ----------------------------------------- 0077 991 _i2cWaitForHighScl: 0077 AA 82 992 mov r2,dpl 0079 AB 83 993 mov r3,dph 007B 994 C$i2c.c$77$1$1 ==. 995 ; libraries/src/i2c/i2c.c:77: uint32 time = getMs(); 007B C0 02 996 push ar2 007D C0 03 997 push ar3 007F 12s00r00 998 lcall _getMs 0082 78r00 999 mov r0,#_i2cWaitForHighScl_time_1_1 0084 C0 E0 1000 push acc 0086 E5 82 1001 mov a,dpl 0088 F2 1002 movx @r0,a 0089 08 1003 inc r0 008A E5 83 1004 mov a,dph 008C F2 1005 movx @r0,a 008D 08 1006 inc r0 008E E5 F0 1007 mov a,b 0090 F2 1008 movx @r0,a 0091 D0 E0 1009 pop acc 0093 08 1010 inc r0 0094 F2 1011 movx @r0,a 0095 D0 03 1012 pop ar3 0097 D0 02 1013 pop ar2 0099 1014 C$i2c.c$78$1$1 ==. 1015 ; libraries/src/i2c/i2c.c:78: while (i2cReadScl() == 0) 0099 1016 00103$: 0099 C0 02 1017 push ar2 009B C0 03 1018 push ar3 009D 12s00r3F 1019 lcall _i2cReadScl 00A0 D0 03 1020 pop ar3 00A2 D0 02 1021 pop ar2 00A4 40 57 1022 jc 00106$ 00A6 1023 C$i2c.c$80$2$2 ==. 1024 ; libraries/src/i2c/i2c.c:80: if (getMs() - time > timeoutMs) 00A6 C0 02 1025 push ar2 00A8 C0 03 1026 push ar3 00AA 12s00r00 1027 lcall _getMs 00AD 85 82*02 1028 mov _i2cWaitForHighScl_sloc0_1_0,dpl 00B0 85 83*03 1029 mov (_i2cWaitForHighScl_sloc0_1_0 + 1),dph 00B3 85 F0*04 1030 mov (_i2cWaitForHighScl_sloc0_1_0 + 2),b 00B6 F5*05 1031 mov (_i2cWaitForHighScl_sloc0_1_0 + 3),a 00B8 D0 03 1032 pop ar3 00BA D0 02 1033 pop ar2 00BC 78r00 1034 mov r0,#_i2cWaitForHighScl_time_1_1 00BE D3 1035 setb c 00BF E2 1036 movx a,@r0 00C0 95*02 1037 subb a,_i2cWaitForHighScl_sloc0_1_0 00C2 F4 1038 cpl a 00C3 B3 1039 cpl c 00C4 F5*02 1040 mov _i2cWaitForHighScl_sloc0_1_0,a 00C6 B3 1041 cpl c 00C7 08 1042 inc r0 00C8 E2 1043 movx a,@r0 00C9 95*03 1044 subb a,(_i2cWaitForHighScl_sloc0_1_0 + 1) 00CB F4 1045 cpl a 00CC B3 1046 cpl c 00CD F5*03 1047 mov (_i2cWaitForHighScl_sloc0_1_0 + 1),a 00CF B3 1048 cpl c 00D0 08 1049 inc r0 00D1 E2 1050 movx a,@r0 00D2 95*04 1051 subb a,(_i2cWaitForHighScl_sloc0_1_0 + 2) 00D4 F4 1052 cpl a 00D5 B3 1053 cpl c 00D6 F5*04 1054 mov (_i2cWaitForHighScl_sloc0_1_0 + 2),a 00D8 B3 1055 cpl c 00D9 08 1056 inc r0 00DA E2 1057 movx a,@r0 00DB 95*05 1058 subb a,(_i2cWaitForHighScl_sloc0_1_0 + 3) 00DD F4 1059 cpl a 00DE F5*05 1060 mov (_i2cWaitForHighScl_sloc0_1_0 + 3),a 00E0 8A 04 1061 mov ar4,r2 00E2 8B 05 1062 mov ar5,r3 00E4 7E 00 1063 mov r6,#0x00 00E6 7F 00 1064 mov r7,#0x00 00E8 C3 1065 clr c 00E9 EC 1066 mov a,r4 00EA 95*02 1067 subb a,_i2cWaitForHighScl_sloc0_1_0 00EC ED 1068 mov a,r5 00ED 95*03 1069 subb a,(_i2cWaitForHighScl_sloc0_1_0 + 1) 00EF EE 1070 mov a,r6 00F0 95*04 1071 subb a,(_i2cWaitForHighScl_sloc0_1_0 + 2) 00F2 EF 1072 mov a,r7 00F3 95*05 1073 subb a,(_i2cWaitForHighScl_sloc0_1_0 + 3) 00F5 50 A2 1074 jnc 00103$ 00F7 1075 C$i2c.c$82$3$3 ==. 1076 ; libraries/src/i2c/i2c.c:82: internalTimeoutOccurred = 1; 00F7 D2*02 1077 setb _internalTimeoutOccurred 00F9 1078 C$i2c.c$83$3$3 ==. 1079 ; libraries/src/i2c/i2c.c:83: i2cTimeoutOccurred = 1; 00F9 D2*01 1080 setb _i2cTimeoutOccurred 00FB 1081 C$i2c.c$84$3$3 ==. 1082 ; libraries/src/i2c/i2c.c:84: started = 0; 00FB C2*00 1083 clr _started 00FD 1084 C$i2c.c$85$3$3 ==. 1085 ; libraries/src/i2c/i2c.c:85: return; 00FD 1086 00106$: 00FD 1087 C$i2c.c$88$1$1 ==. 00FD 1088 XG$i2cWaitForHighScl$0$0 ==. 00FD 22 1089 ret 1090 ;------------------------------------------------------------ 1091 ;Allocation info for local variables in function 'i2cStop' 1092 ;------------------------------------------------------------ 1093 ;------------------------------------------------------------ 00FE 1094 G$i2cStop$0$0 ==. 00FE 1095 C$i2c.c$93$1$1 ==. 1096 ; libraries/src/i2c/i2c.c:93: void i2cStop(void) 1097 ; ----------------------------------------- 1098 ; function i2cStop 1099 ; ----------------------------------------- 00FE 1100 _i2cStop: 00FE 1101 C$i2c.c$95$1$1 ==. 1102 ; libraries/src/i2c/i2c.c:95: i2cClearSda(); // drive SDA low while SCL is low 00FE 12s00r6C 1103 lcall _i2cClearSda 0101 1104 C$i2c.c$96$1$1 ==. 1105 ; libraries/src/i2c/i2c.c:96: delayMicroseconds(halfPeriodUs); 0101 90s00r00 1106 mov dptr,#_halfPeriodUs 0104 E0 1107 movx a,@dptr 0105 FA 1108 mov r2,a 0106 A3 1109 inc dptr 0107 E0 1110 movx a,@dptr 0108 8A 82 1111 mov dpl,r2 010A 12s00r00 1112 lcall _delayMicroseconds 010D 1113 C$i2c.c$99$1$1 ==. 1114 ; libraries/src/i2c/i2c.c:99: i2cWaitForHighScl(timeout); 010D 90s00r02 1115 mov dptr,#_timeout 0110 E0 1116 movx a,@dptr 0111 FA 1117 mov r2,a 0112 A3 1118 inc dptr 0113 E0 1119 movx a,@dptr 0114 FB 1120 mov r3,a 0115 8A 82 1121 mov dpl,r2 0117 8B 83 1122 mov dph,r3 0119 12s00r77 1123 lcall _i2cWaitForHighScl 011C 1124 C$i2c.c$100$1$1 ==. 1125 ; libraries/src/i2c/i2c.c:100: if (internalTimeoutOccurred) return; 011C 30*02 01 1126 jnb _internalTimeoutOccurred,00102$ 011F 22 1127 ret 0120 1128 00102$: 0120 1129 C$i2c.c$103$1$1 ==. 1130 ; libraries/src/i2c/i2c.c:103: i2cReadSda(); // let SDA line go high while SCL is high 0120 12s00r50 1131 lcall _i2cReadSda 0123 1132 C$i2c.c$104$1$1 ==. 1133 ; libraries/src/i2c/i2c.c:104: delayMicroseconds(halfPeriodUs); 0123 90s00r00 1134 mov dptr,#_halfPeriodUs 0126 E0 1135 movx a,@dptr 0127 FA 1136 mov r2,a 0128 A3 1137 inc dptr 0129 E0 1138 movx a,@dptr 012A 8A 82 1139 mov dpl,r2 012C 12s00r00 1140 lcall _delayMicroseconds 012F 1141 C$i2c.c$105$1$1 ==. 1142 ; libraries/src/i2c/i2c.c:105: started = 0; 012F C2*00 1143 clr _started 0131 1144 C$i2c.c$106$1$1 ==. 0131 1145 XG$i2cStop$0$0 ==. 0131 22 1146 ret 1147 ;------------------------------------------------------------ 1148 ;Allocation info for local variables in function 'i2cStart' 1149 ;------------------------------------------------------------ 1150 ;------------------------------------------------------------ 0132 1151 G$i2cStart$0$0 ==. 0132 1152 C$i2c.c$111$1$1 ==. 1153 ; libraries/src/i2c/i2c.c:111: void i2cStart(void) 1154 ; ----------------------------------------- 1155 ; function i2cStart 1156 ; ----------------------------------------- 0132 1157 _i2cStart: 0132 1158 C$i2c.c$114$1$1 ==. 1159 ; libraries/src/i2c/i2c.c:114: if (started) 0132 30*00 0F 1160 jnb _started,00102$ 0135 1161 C$i2c.c$116$2$2 ==. 1162 ; libraries/src/i2c/i2c.c:116: i2cReadSda(); // let SDA line go high while SCL is low 0135 12s00r50 1163 lcall _i2cReadSda 0138 1164 C$i2c.c$117$2$2 ==. 1165 ; libraries/src/i2c/i2c.c:117: delayMicroseconds(halfPeriodUs); 0138 90s00r00 1166 mov dptr,#_halfPeriodUs 013B E0 1167 movx a,@dptr 013C FA 1168 mov r2,a 013D A3 1169 inc dptr 013E E0 1170 movx a,@dptr 013F 8A 82 1171 mov dpl,r2 0141 12s00r00 1172 lcall _delayMicroseconds 0144 1173 00102$: 0144 1174 C$i2c.c$121$1$1 ==. 1175 ; libraries/src/i2c/i2c.c:121: i2cWaitForHighScl(timeout); 0144 90s00r02 1176 mov dptr,#_timeout 0147 E0 1177 movx a,@dptr 0148 FA 1178 mov r2,a 0149 A3 1179 inc dptr 014A E0 1180 movx a,@dptr 014B FB 1181 mov r3,a 014C 8A 82 1182 mov dpl,r2 014E 8B 83 1183 mov dph,r3 0150 12s00r77 1184 lcall _i2cWaitForHighScl 0153 1185 C$i2c.c$122$1$1 ==. 1186 ; libraries/src/i2c/i2c.c:122: if (internalTimeoutOccurred) return; 0153 30*02 01 1187 jnb _internalTimeoutOccurred,00104$ 0156 22 1188 ret 0157 1189 00104$: 0157 1190 C$i2c.c$125$1$1 ==. 1191 ; libraries/src/i2c/i2c.c:125: i2cClearSda(); // drive SDA low while SCL is high 0157 12s00r6C 1192 lcall _i2cClearSda 015A 1193 C$i2c.c$126$1$1 ==. 1194 ; libraries/src/i2c/i2c.c:126: delayMicroseconds(halfPeriodUs); 015A 90s00r00 1195 mov dptr,#_halfPeriodUs 015D E0 1196 movx a,@dptr 015E FA 1197 mov r2,a 015F A3 1198 inc dptr 0160 E0 1199 movx a,@dptr 0161 8A 82 1200 mov dpl,r2 0163 12s00r00 1201 lcall _delayMicroseconds 0166 1202 C$i2c.c$127$1$1 ==. 1203 ; libraries/src/i2c/i2c.c:127: i2cClearScl(); // drive SCL low 0166 12s00r61 1204 lcall _i2cClearScl 0169 1205 C$i2c.c$128$1$1 ==. 1206 ; libraries/src/i2c/i2c.c:128: started = 1; 0169 D2*00 1207 setb _started 016B 1208 C$i2c.c$129$1$1 ==. 016B 1209 XG$i2cStart$0$0 ==. 016B 22 1210 ret 1211 ;------------------------------------------------------------ 1212 ;Allocation info for local variables in function 'i2cWriteBit' 1213 ;------------------------------------------------------------ 1214 ;------------------------------------------------------------ 016C 1215 G$i2cWriteBit$0$0 ==. 016C 1216 C$i2c.c$139$1$1 ==. 1217 ; libraries/src/i2c/i2c.c:139: void i2cWriteBit(BIT b) 1218 ; ----------------------------------------- 1219 ; function i2cWriteBit 1220 ; ----------------------------------------- 016C 1221 _i2cWriteBit: 016C 1222 C$i2c.c$141$1$1 ==. 1223 ; libraries/src/i2c/i2c.c:141: if (b) 016C 30*03 05 1224 jnb _i2cWriteBit_PARM_1,00102$ 016F 1225 C$i2c.c$143$2$2 ==. 1226 ; libraries/src/i2c/i2c.c:143: i2cReadSda(); // let SDA go high 016F 12s00r50 1227 lcall _i2cReadSda 0172 80 03 1228 sjmp 00103$ 0174 1229 00102$: 0174 1230 C$i2c.c$147$2$3 ==. 1231 ; libraries/src/i2c/i2c.c:147: i2cClearSda(); // drive SDA low 0174 12s00r6C 1232 lcall _i2cClearSda 0177 1233 00103$: 0177 1234 C$i2c.c$149$1$1 ==. 1235 ; libraries/src/i2c/i2c.c:149: delayMicroseconds(halfPeriodUs); 0177 90s00r00 1236 mov dptr,#_halfPeriodUs 017A E0 1237 movx a,@dptr 017B FA 1238 mov r2,a 017C A3 1239 inc dptr 017D E0 1240 movx a,@dptr 017E 8A 82 1241 mov dpl,r2 0180 12s00r00 1242 lcall _delayMicroseconds 0183 1243 C$i2c.c$152$1$1 ==. 1244 ; libraries/src/i2c/i2c.c:152: i2cWaitForHighScl(timeout); 0183 90s00r02 1245 mov dptr,#_timeout 0186 E0 1246 movx a,@dptr 0187 FA 1247 mov r2,a 0188 A3 1248 inc dptr 0189 E0 1249 movx a,@dptr 018A FB 1250 mov r3,a 018B 8A 82 1251 mov dpl,r2 018D 8B 83 1252 mov dph,r3 018F 12s00r77 1253 lcall _i2cWaitForHighScl 0192 1254 C$i2c.c$153$1$1 ==. 1255 ; libraries/src/i2c/i2c.c:153: if (internalTimeoutOccurred) return; 0192 30*02 01 1256 jnb _internalTimeoutOccurred,00105$ 0195 22 1257 ret 0196 1258 00105$: 0196 1259 C$i2c.c$156$1$1 ==. 1260 ; libraries/src/i2c/i2c.c:156: delayMicroseconds(halfPeriodUs); 0196 90s00r00 1261 mov dptr,#_halfPeriodUs 0199 E0 1262 movx a,@dptr 019A FA 1263 mov r2,a 019B A3 1264 inc dptr 019C E0 1265 movx a,@dptr 019D 8A 82 1266 mov dpl,r2 019F 12s00r00 1267 lcall _delayMicroseconds 01A2 1268 C$i2c.c$157$1$1 ==. 1269 ; libraries/src/i2c/i2c.c:157: i2cClearScl(); // drive SCL low 01A2 1270 C$i2c.c$158$1$1 ==. 01A2 1271 XG$i2cWriteBit$0$0 ==. 01A2 02s00r61 1272 ljmp _i2cClearScl 1273 ;------------------------------------------------------------ 1274 ;Allocation info for local variables in function 'i2cReadBit' 1275 ;------------------------------------------------------------ 1276 ;------------------------------------------------------------ 01A5 1277 G$i2cReadBit$0$0 ==. 01A5 1278 C$i2c.c$169$1$1 ==. 1279 ; libraries/src/i2c/i2c.c:169: BIT i2cReadBit(void) 1280 ; ----------------------------------------- 1281 ; function i2cReadBit 1282 ; ----------------------------------------- 01A5 1283 _i2cReadBit: 01A5 1284 C$i2c.c$173$1$1 ==. 1285 ; libraries/src/i2c/i2c.c:173: i2cReadSda(); // let slave transmitter control state of SDA line 01A5 12s00r50 1286 lcall _i2cReadSda 01A8 1287 C$i2c.c$174$1$1 ==. 1288 ; libraries/src/i2c/i2c.c:174: delayMicroseconds(halfPeriodUs); 01A8 90s00r00 1289 mov dptr,#_halfPeriodUs 01AB E0 1290 movx a,@dptr 01AC FA 1291 mov r2,a 01AD A3 1292 inc dptr 01AE E0 1293 movx a,@dptr 01AF 8A 82 1294 mov dpl,r2 01B1 12s00r00 1295 lcall _delayMicroseconds 01B4 1296 C$i2c.c$177$1$1 ==. 1297 ; libraries/src/i2c/i2c.c:177: i2cWaitForHighScl(timeout); 01B4 90s00r02 1298 mov dptr,#_timeout 01B7 E0 1299 movx a,@dptr 01B8 FA 1300 mov r2,a 01B9 A3 1301 inc dptr 01BA E0 1302 movx a,@dptr 01BB FB 1303 mov r3,a 01BC 8A 82 1304 mov dpl,r2 01BE 8B 83 1305 mov dph,r3 01C0 12s00r77 1306 lcall _i2cWaitForHighScl 01C3 1307 C$i2c.c$178$1$1 ==. 1308 ; libraries/src/i2c/i2c.c:178: if (internalTimeoutOccurred) return 0; 01C3 30*02 02 1309 jnb _internalTimeoutOccurred,00102$ 01C6 C3 1310 clr c 01C7 22 1311 ret 01C8 1312 00102$: 01C8 1313 C$i2c.c$181$1$1 ==. 1314 ; libraries/src/i2c/i2c.c:181: b = i2cReadSda(); // store state of SDA line now that SCL is high 01C8 12s00r50 1315 lcall _i2cReadSda 01CB 92*04 1316 mov _i2cReadBit_b_1_1,c 01CD 1317 C$i2c.c$182$1$1 ==. 1318 ; libraries/src/i2c/i2c.c:182: delayMicroseconds(halfPeriodUs); 01CD 90s00r00 1319 mov dptr,#_halfPeriodUs 01D0 E0 1320 movx a,@dptr 01D1 FA 1321 mov r2,a 01D2 A3 1322 inc dptr 01D3 E0 1323 movx a,@dptr 01D4 8A 82 1324 mov dpl,r2 01D6 12s00r00 1325 lcall _delayMicroseconds 01D9 1326 C$i2c.c$183$1$1 ==. 1327 ; libraries/src/i2c/i2c.c:183: i2cClearScl(); // drive SCL low 01D9 12s00r61 1328 lcall _i2cClearScl 01DC 1329 C$i2c.c$184$1$1 ==. 1330 ; libraries/src/i2c/i2c.c:184: return b; 01DC A2*04 1331 mov c,_i2cReadBit_b_1_1 01DE 1332 C$i2c.c$185$1$1 ==. 01DE 1333 XG$i2cReadBit$0$0 ==. 01DE 22 1334 ret 1335 ;------------------------------------------------------------ 1336 ;Allocation info for local variables in function 'i2cWriteByte' 1337 ;------------------------------------------------------------ 1338 ;------------------------------------------------------------ 01DF 1339 G$i2cWriteByte$0$0 ==. 01DF 1340 C$i2c.c$190$1$1 ==. 1341 ; libraries/src/i2c/i2c.c:190: BIT i2cWriteByte(uint8 byte) 1342 ; ----------------------------------------- 1343 ; function i2cWriteByte 1344 ; ----------------------------------------- 01DF 1345 _i2cWriteByte: 01DF AA 82 1346 mov r2,dpl 01E1 1347 C$i2c.c$195$1$1 ==. 1348 ; libraries/src/i2c/i2c.c:195: internalTimeoutOccurred = 0; 01E1 C2*02 1349 clr _internalTimeoutOccurred 01E3 1350 C$i2c.c$197$1$1 ==. 1351 ; libraries/src/i2c/i2c.c:197: for (i = 0; i < 8; i++) 01E3 7B 00 1352 mov r3,#0x00 01E5 1353 00109$: 01E5 BB 08 00 1354 cjne r3,#0x08,00121$ 01E8 1355 00121$: 01E8 50 1A 1356 jnc 00112$ 01EA 1357 C$i2c.c$199$2$2 ==. 1358 ; libraries/src/i2c/i2c.c:199: i2cWriteBit(byte & 0x80); 01EA EA 1359 mov a,r2 01EB 33 1360 rlc a 01EC 92*03 1361 mov _i2cWriteBit_PARM_1,c 01EE C0 02 1362 push ar2 01F0 C0 03 1363 push ar3 01F2 12s01r6C 1364 lcall _i2cWriteBit 01F5 D0 03 1365 pop ar3 01F7 D0 02 1366 pop ar2 01F9 1367 C$i2c.c$200$2$2 ==. 1368 ; libraries/src/i2c/i2c.c:200: if (internalTimeoutOccurred) return 0; 01F9 30*02 02 1369 jnb _internalTimeoutOccurred,00102$ 01FC C3 1370 clr c 01FD 22 1371 ret 01FE 1372 00102$: 01FE 1373 C$i2c.c$201$2$2 ==. 1374 ; libraries/src/i2c/i2c.c:201: byte <<= 1; 01FE EA 1375 mov a,r2 01FF 2A 1376 add a,r2 0200 FA 1377 mov r2,a 0201 1378 C$i2c.c$197$1$1 ==. 1379 ; libraries/src/i2c/i2c.c:197: for (i = 0; i < 8; i++) 0201 0B 1380 inc r3 0202 80 E1 1381 sjmp 00109$ 0204 1382 00112$: 0204 1383 C$i2c.c$203$1$1 ==. 1384 ; libraries/src/i2c/i2c.c:203: nack = i2cReadBit(); 0204 12s01rA5 1385 lcall _i2cReadBit 0207 92*05 1386 mov _i2cWriteByte_nack_1_1,c 0209 1387 C$i2c.c$204$1$1 ==. 1388 ; libraries/src/i2c/i2c.c:204: if (internalTimeoutOccurred) return 0; 0209 30*02 02 1389 jnb _internalTimeoutOccurred,00104$ 020C C3 1390 clr c 020D 22 1391 ret 020E 1392 00104$: 020E 1393 C$i2c.c$206$1$1 ==. 1394 ; libraries/src/i2c/i2c.c:206: if (nack) 020E 30*05 08 1395 jnb _i2cWriteByte_nack_1_1,00108$ 0211 1396 C$i2c.c$208$2$3 ==. 1397 ; libraries/src/i2c/i2c.c:208: i2cStop(); 0211 12s00rFE 1398 lcall _i2cStop 0214 1399 C$i2c.c$209$2$3 ==. 1400 ; libraries/src/i2c/i2c.c:209: if (internalTimeoutOccurred) return 0; 0214 30*02 02 1401 jnb _internalTimeoutOccurred,00108$ 0217 C3 1402 clr c 0218 1403 C$i2c.c$211$1$1 ==. 1404 ; libraries/src/i2c/i2c.c:211: return nack; 0218 1405 C$i2c.c$212$1$1 ==. 0218 1406 XG$i2cWriteByte$0$0 ==. 0218 22 1407 ret 0219 1408 00108$: 0219 A2*05 1409 mov c,_i2cWriteByte_nack_1_1 021B 22 1410 ret 1411 ;------------------------------------------------------------ 1412 ;Allocation info for local variables in function 'i2cReadByte' 1413 ;------------------------------------------------------------ 1414 ;------------------------------------------------------------ 021C 1415 G$i2cReadByte$0$0 ==. 021C 1416 C$i2c.c$217$1$1 ==. 1417 ; libraries/src/i2c/i2c.c:217: uint8 i2cReadByte(BIT nack) 1418 ; ----------------------------------------- 1419 ; function i2cReadByte 1420 ; ----------------------------------------- 021C 1421 _i2cReadByte: 021C 1422 C$i2c.c$219$1$1 ==. 1423 ; libraries/src/i2c/i2c.c:219: uint16 byte = 0; 021C 7A 00 1424 mov r2,#0x00 021E 7B 00 1425 mov r3,#0x00 0220 1426 C$i2c.c$223$1$1 ==. 1427 ; libraries/src/i2c/i2c.c:223: internalTimeoutOccurred = 0; 0220 C2*02 1428 clr _internalTimeoutOccurred 0222 1429 C$i2c.c$225$1$1 ==. 1430 ; libraries/src/i2c/i2c.c:225: for (i = 0; i < 8; i++) 0222 7C 00 1431 mov r4,#0x00 0224 1432 00105$: 0224 BC 08 00 1433 cjne r4,#0x08,00115$ 0227 1434 00115$: 0227 50 30 1435 jnc 00108$ 0229 1436 C$i2c.c$227$2$2 ==. 1437 ; libraries/src/i2c/i2c.c:227: b = i2cReadBit(); 0229 C0 02 1438 push ar2 022B C0 03 1439 push ar3 022D C0 04 1440 push ar4 022F 12s01rA5 1441 lcall _i2cReadBit 0232 D0 04 1442 pop ar4 0234 D0 03 1443 pop ar3 0236 D0 02 1444 pop ar2 0238 92*07 1445 mov _i2cReadByte_b_1_1,c 023A 1446 C$i2c.c$228$2$2 ==. 1447 ; libraries/src/i2c/i2c.c:228: if (internalTimeoutOccurred) return 0; 023A 30*02 04 1448 jnb _internalTimeoutOccurred,00102$ 023D 75 82 00 1449 mov dpl,#0x00 0240 22 1450 ret 0241 1451 00102$: 0241 1452 C$i2c.c$229$2$2 ==. 1453 ; libraries/src/i2c/i2c.c:229: byte = (byte << 1) | b; 0241 8A 05 1454 mov ar5,r2 0243 EB 1455 mov a,r3 0244 CD 1456 xch a,r5 0245 25 E0 1457 add a,acc 0247 CD 1458 xch a,r5 0248 33 1459 rlc a 0249 FE 1460 mov r6,a 024A A2*07 1461 mov c,_i2cReadByte_b_1_1 024C E4 1462 clr a 024D 33 1463 rlc a 024E FF 1464 mov r7,a 024F 78 00 1465 mov r0,#0x00 0251 4D 1466 orl a,r5 0252 FA 1467 mov r2,a 0253 E8 1468 mov a,r0 0254 4E 1469 orl a,r6 0255 FB 1470 mov r3,a 0256 1471 C$i2c.c$225$1$1 ==. 1472 ; libraries/src/i2c/i2c.c:225: for (i = 0; i < 8; i++) 0256 0C 1473 inc r4 0257 80 CB 1474 sjmp 00105$ 0259 1475 00108$: 0259 1476 C$i2c.c$232$1$1 ==. 1477 ; libraries/src/i2c/i2c.c:232: i2cWriteBit(nack); 0259 A2*06 1478 mov c,_i2cReadByte_PARM_1 025B 92*03 1479 mov _i2cWriteBit_PARM_1,c 025D C0 02 1480 push ar2 025F C0 03 1481 push ar3 0261 12s01r6C 1482 lcall _i2cWriteBit 0264 D0 03 1483 pop ar3 0266 D0 02 1484 pop ar2 0268 1485 C$i2c.c$233$1$1 ==. 1486 ; libraries/src/i2c/i2c.c:233: if (internalTimeoutOccurred) return 0; 0268 30*02 04 1487 jnb _internalTimeoutOccurred,00104$ 026B 75 82 00 1488 mov dpl,#0x00 026E 1489 C$i2c.c$235$1$1 ==. 1490 ; libraries/src/i2c/i2c.c:235: return byte; 026E 1491 C$i2c.c$236$1$1 ==. 026E 1492 XG$i2cReadByte$0$0 ==. 026E 22 1493 ret 026F 1494 00104$: 026F 8A 82 1495 mov dpl,r2 0271 22 1496 ret 1497 .area CSEG (CODE) 1498 .area CONST (CODE) 1499 .area XINIT (CODE) 0000 1500 Fi2c$__xinit_halfPeriodUs$0$0 == . 0000 1501 __xinit__halfPeriodUs: 0000 05 00 1502 .byte #0x05,#0x00 ; 5 0002 1503 Fi2c$__xinit_timeout$0$0 == . 0002 1504 __xinit__timeout: 0002 0A 00 1505 .byte #0x0A,#0x00 ; 10 1506 .area CABS (ABS,CODE)