|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dalsemi.system.I2CPort | +--mat.i2c.master.MasterBusI2c
Titre : Master Bus I2c
Description : commande du bus I2c. Singleton
Copyright : Copyright (c) 2003
Société :
Fields inherited from class com.dalsemi.system.I2CPort |
clockDelay, SCLAddress, SCLMask, SDAAddress, SDAMask, slaveAddress, STRETCH0, STRETCH1, STRETCH10, STRETCH2, STRETCH3, STRETCH7, STRETCH8, STRETCH9, stretchCycles |
Constructor Summary | |
protected |
MasterBusI2c()
|
Method Summary | |
PortI2c |
createPortI2cAt(int adresse)
|
int |
doTrame(byte[] trame)
Envoi d'une trame sur le bus I2c |
java.util.Vector |
getAllPorts()
|
int |
getClockDelay()
Vitesse du bus I2C |
static MasterBusI2c |
getInstance()
|
PortI2c |
getPortI2cAt(int adresse)
|
static void |
kill()
|
int |
read(int adresse,
byte[] barr,
int off,
int len)
Lecture d'un composant I2c |
boolean |
removePortI2c(PortI2c portI2c)
|
void |
setBusConnexion(boolean on)
Connexion du bus |
void |
setClockDelay(int delai)
Fixer la vitesse du bus I2C Les composants I2C acceptent une fréquence de l'horloge du bus I2C de 100KHz max. |
void |
setNumeroAcces(int num)
Un identificateur du bus |
int |
write(int adresse,
byte[] barr,
int off,
int len)
Ecriture dans un composant I2c |
int |
writeRead(int adresse,
byte[] wbarr,
int woff,
int wlen,
byte[] rbarr,
int roff,
int rlen)
Pas implémentée |
Methods inherited from class com.dalsemi.system.I2CPort |
getStretchCycles, read, setAddress, setClockDelay, setStretchCycles, write |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
protected MasterBusI2c()
Method Detail |
public static MasterBusI2c getInstance()
public void setNumeroAcces(int num)
BusI2c
setNumeroAcces
in interface BusI2c
mat.i2c.master.BusI2c
num
- identificateurpublic void setBusConnexion(boolean on)
BusI2c
setBusConnexion
in interface BusI2c
mat.i2c.master.BusI2c
on
- vrai:connecté, faux déconnectépublic static void kill()
public PortI2c createPortI2cAt(int adresse)
public boolean removePortI2c(PortI2c portI2c)
public java.util.Vector getAllPorts()
public PortI2c getPortI2cAt(int adresse)
public int getClockDelay()
BusI2c
getClockDelay
in interface BusI2c
mat.i2c.master.BusI2c
public void setClockDelay(int delai)
BusI2c
setClockDelay
in interface BusI2c
mat.i2c.master.BusI2c
delai
- valeur du délaipublic int write(int adresse, byte[] barr, int off, int len)
BusI2c
write
in interface BusI2c
mat.i2c.master.BusI2c
adresse
- I2c du composantbarr
- un tableau d'octets à transmettreoff
- offsetlen
- longueurpublic int read(int adresse, byte[] barr, int off, int len)
BusI2c
read
in interface BusI2c
mat.i2c.master.BusI2c
adresse
- I2c du composantbarr
- un tableau d'octets ou seront placés les octets lusoff
- offsetlen
- longueurpublic int writeRead(int adresse, byte[] wbarr, int woff, int wlen, byte[] rbarr, int roff, int rlen)
BusI2c
writeRead
in interface BusI2c
mat.i2c.master.BusI2c
adresseI2c
- I2c du composantwbarr
- un tableau d'octets à transmettrewoff
- offsetwlen
- longueurrbarr
- un tableau d'octets ou seront placés les octets lusroff
- offsetrlen
- longueurpublic int doTrame(byte[] trame)
BusI2c
doTrame
in interface BusI2c
mat.i2c.master.BusI2c
trame
- Le premier octet correspond à l'adresse du composant + R/W
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |