Ligne 136 : |
Ligne 136 : |
| | | |
| ==== i2c.mem_read(....) ==== | | ==== i2c.mem_read(....) ==== |
− | {{fname|0=i2c.mem_read(data, addr, memaddr, timeout=5000, addr_size=8)}}
| + | i2c.mem_read(data, addr, memaddr, timeout=5000, addr_size=8) |
| | | |
− | Read from the memory of an I2C device:
| + | Effectue une lecture depuis la mémoire d'un périphérique: |
− | * '''data''' can be an integer or a buffer to read into | + | * '''data''' un entier ou un buffer pour stocker le résultat de la lecture |
− | * '''addr''' is the I2C device address | + | * '''addr''' est l'adresse du périphérique I2C |
− | * '''memaddr''' is the memory location within the I2C device | + | * '''memaddr''' est la position mémoire dans le périphérique I2C |
− | * '''timeout''' is the timeout in milliseconds to wait for the read | + | * '''timeout''' est le temps max d'attente (en millisecondes) pour l'opération de lecture |
− | * '''addr_size''' selects width of memaddr: 8 or 16 bits | + | * '''addr_size''' détermine la taille de {{fname|memaddr}}: 8 ou 16 bits |
| | | |
− | Returns the read data. This is only valid in master mode.
| + | Retourn la donnée lue. |
| + | |
| + | Uniquement valable en mode ''master''. |
| | | |
| ==== i2c.mem_write(...) ==== | | ==== i2c.mem_write(...) ==== |