Mercurial > public > hwos_code
diff src/i2c.asm @ 158:683321c09cfa
nicer boot into surfacemode
author | heinrichsweikamp |
---|---|
date | Thu, 04 Sep 2014 17:40:24 +0200 |
parents | f3062a611eef |
children | 30ebaf72170d |
line wrap: on
line diff
--- a/src/i2c.asm Fri Aug 29 08:58:27 2014 +0200 +++ b/src/i2c.asm Thu Sep 04 17:40:24 2014 +0200 @@ -124,20 +124,22 @@ rcall WaitMSSP movlw 0x38 ; address rcall I2C_TX - movlw 0x01 + movlw 0x00 rcall I2C_TX bsf SSP1CON2,RSEN ; Repeated start condition (!) rcall WaitMSSP movlw 0x39 ; address rcall I2C_TX + rcall I2C_OneByteRX ; Get Status Byte + movf SSP1BUF,W + ; Chip orientation on the PCB requires ; Original = Corrected ; x = -x ; y = -y ; z = -z - rcall I2C_TwoBytesRX_div16 ; Get two bytes and devide /16 (signed) comf hi ; 16bit sign change. negf lo