Download firmware/hal/i2c.h from Snapkitty/phaser-ags: direct link, hf CLI and curl.
- Browser
- Download file 2.16 kB
-
https://huggingface.co/Snapkitty/phaser-ags/resolve/main/firmware/hal/i2c.h
- Command line
-
hf download hf://Snapkitty/phaser-ags/firmware/hal/i2c.h
-
curl -L -o i2c.h https://huggingface.co/Snapkitty/phaser-ags/resolve/main/firmware/hal/i2c.h
2.16 kB
| /* | |
| * OMAP3530 I2C driver | |
| * OMAP3530 has 4 I2C controllers (I2C1-4), NS-compatible | |
| * Used for: PMIC communication (TPS65950), EEPROM, sensors | |
| * Modeled on R8A7740 I2C0/I2C1 MSTPCR gating pattern | |
| */ | |
| /* I2C register offsets */ | |
| /* I2C_CON bits */ | |
| /* I2C_STAT bits */ | |
| typedef struct { | |
| hw_reg32_t base; | |
| uint32_t clock_hz; | |
| uint16_t own_addr; | |
| } i2c_dev_t; | |
| int i2c_init(i2c_dev_t *dev, uint32_t base, uint32_t clock_hz, uint16_t own_addr); | |
| void i2c_set_speed(i2c_dev_t *dev, uint32_t speed_hz); | |
| int i2c_probe(i2c_dev_t *dev, uint8_t addr); | |
| int i2c_read(i2c_dev_t *dev, uint8_t addr, uint8_t *buf, uint32_t len); | |
| int i2c_write(i2c_dev_t *dev, uint8_t addr, const uint8_t *buf, uint32_t len); | |
| int i2c_reg_read(i2c_dev_t *dev, uint8_t addr, uint8_t reg, uint8_t *val); | |
| int i2c_reg_write(i2c_dev_t *dev, uint8_t addr, uint8_t reg, uint8_t val); | |