TWI_DRV_CTRL Двухпроводной интерфейс: список регистров 31 |•|•|•|•|•|•|•|•|•|•|•|•|•|•|•|•| 16 15 |•|•|•|•|•|•|•|•|•|•|•|•|•|•|•|•| 00 START_TRAN Bit 31R/WAC 0x0 0: Transmission idle Unused Bit 30RESTART_MODE Bit 29R/W 0x0 0: RESTART READ_TRAN_MODE Bit 28R/W 0x0 0: send slave_id+W TRAN_RESULT Bits 27 : 24R 0x0 000: OK TWI_STA Bits 23 : 16R 0xf8 0x00: bus error TIMEOUT_N Bits 15 : 8R/W 0x10 When sending the 9th clock, assert fail signal when slave device does not Unused Bits 7 : 2SOFT_RESET Bit 1R/W 0x0 0: normal TWI_DRV_EN Bit 0R/W 0x0 0: Module disable Команда U-Boot для чтения регистра md 5002200 1md 5002600 1 md 5002a00 1 md 5002e00 1 md 5003200 1 md 7081600 1 Bit fields structuretypedef union twi_drv_ctrl { struct { unsigned twi_drv_en : 1; unsigned soft_reset : 1; unsigned unused0 : 6; unsigned timeout_n : 8; unsigned twi_sta : 8; unsigned tran_result : 4; unsigned read_tran_mode : 1; unsigned restart_mode : 1; unsigned unused1 : 1; unsigned start_tran : 1; } b; unsigned long w; } TWI_DRV_CTRL |