Home
last modified time | relevance | path

Searched refs:m_i2c (Results 1 – 25 of 45) sorted by relevance

12

/hardware/bsp/intel/peripheral/libupm/src/h3lis331dl/
Dh3lis331dl.cxx38 m_i2c(bus) in H3LIS331DL()
43 if ( (rv = m_i2c.address(m_addr)) != mraa::SUCCESS) in H3LIS331DL()
76 return m_i2c.readReg(REG_WHOAMI); in getChipID()
81 uint8_t reg1 = m_i2c.readReg(REG_REG1); in setDataRate()
86 if (m_i2c.writeReg(REG_REG1, reg1)) in setDataRate()
98 uint8_t reg1 = m_i2c.readReg(REG_REG1); in setPowerMode()
103 if (m_i2c.writeReg(REG_REG1, reg1)) in setPowerMode()
115 uint8_t reg1 = m_i2c.readReg(REG_REG1); in enableAxis()
120 if (m_i2c.writeReg(REG_REG1, reg1)) in enableAxis()
132 uint8_t reg4 = m_i2c.readReg(REG_REG4); in setFullScale()
[all …]
/hardware/bsp/intel/peripheral/libmraa/api/mraa/
Di2c.hpp57 m_i2c = mraa_i2c_init_raw(bus); in I2c()
59 m_i2c = mraa_i2c_init(bus); in I2c()
61 if (m_i2c == NULL) { in I2c()
73 mraa_i2c_stop(m_i2c); in ~I2c()
87 return (Result) mraa_i2c_frequency(m_i2c, (mraa_i2c_mode_t) mode); in frequency()
100 return (Result) mraa_i2c_address(m_i2c, address); in address()
111 return (uint8_t) mraa_i2c_read_byte(m_i2c); in readByte()
124 return mraa_i2c_read(m_i2c, data, length); in read()
136 return mraa_i2c_read_byte_data(m_i2c, reg); in readReg()
148 return mraa_i2c_read_word_data(m_i2c, reg); in readWordReg()
[all …]
/hardware/bsp/intel/peripheral/libupm/src/adafruitss/
Dadafruitss.cxx36 if ( !(m_i2c = mraa_i2c_init(bus)) ) in adafruitss()
44 if (mraa_i2c_address(m_i2c, pca9685_addr) != MRAA_SUCCESS) in adafruitss()
53 if (mraa_i2c_write(m_i2c,m_rx_tx_buf,2) != MRAA_SUCCESS) in adafruitss()
79 mraa_i2c_address(m_i2c, pca9685_addr); in setPWMFreq()
80 mraa_i2c_read_byte_data(m_i2c,PCA9685_MODE1); in setPWMFreq()
85 mraa_i2c_address(m_i2c, pca9685_addr); in setPWMFreq()
86 mraa_i2c_write(m_i2c,m_rx_tx_buf,2); in setPWMFreq()
92 mraa_i2c_address(m_i2c, pca9685_addr); in setPWMFreq()
93 mraa_i2c_write(m_i2c,m_rx_tx_buf,2); in setPWMFreq()
100 mraa_i2c_address(m_i2c, pca9685_addr); in setPWMFreq()
[all …]
/hardware/bsp/intel/peripheral/libupm/src/adxl345/
Dadxl345.cxx90 Adxl345::Adxl345(int bus) : m_i2c(bus) in Adxl345()
93 if ( m_i2c.address(ADXL345_I2C_ADDR) != mraa::SUCCESS ){ in Adxl345()
101 if( m_i2c.write(m_buffer, 2) != mraa::SUCCESS){ in Adxl345()
107 if ( m_i2c.address(ADXL345_I2C_ADDR) != mraa::SUCCESS ){ in Adxl345()
115 if( m_i2c.write(m_buffer, 2) != mraa::SUCCESS){ in Adxl345()
151 m_i2c.address(ADXL345_I2C_ADDR); in getScale()
152 m_i2c.writeByte(ADXL345_DATA_FORMAT); in getScale()
154 m_i2c.address(ADXL345_I2C_ADDR); in getScale()
155 result = m_i2c.readByte(); in getScale()
163 m_i2c.address(ADXL345_I2C_ADDR); in update()
[all …]
Dadxl345.h107 mraa::I2c m_i2c; variable
/hardware/bsp/intel/peripheral/libupm/src/th02/
Dth02.cxx38 TH02::TH02 (int bus, uint8_t addr) : m_i2c(bus) { in TH02()
42 mraa::Result ret = m_i2c.address(m_addr); in TH02()
57 if (m_i2c.writeReg(TH02_REG_CONFIG, TH02_CMD_MEASURE_TEMP)) { in getTemperature()
66 temperature = m_i2c.readReg(TH02_REG_DATA_H) << 8; in getTemperature()
67 temperature |= m_i2c.readReg(TH02_REG_DATA_L); in getTemperature()
78 if (m_i2c.writeReg(TH02_REG_CONFIG, TH02_CMD_MEASURE_HUMI)) { in getHumidity()
87 humidity = m_i2c.readReg(TH02_REG_DATA_H) << 8; in getHumidity()
88 humidity |= m_i2c.readReg(TH02_REG_DATA_L); in getHumidity()
96 uint8_t status = m_i2c.readReg(TH02_REG_STATUS); in getStatus()
/hardware/bsp/intel/peripheral/libupm/src/lsm303/
Dlsm303.cxx38 LSM303::LSM303(int bus, int addrMag, int addrAcc, int accScale) : m_i2c(bus) in LSM303()
118 ret = m_i2c.address(m_addrMag); in getCoordinates()
119 ret = m_i2c.writeByte(OUT_X_H_M); in getCoordinates()
120 ret = m_i2c.address(m_addrMag); in getCoordinates()
121 int num = m_i2c.read(buf, 6); in getCoordinates()
159 m_i2c.address(m_addrAcc); in readThenWrite()
160 m_i2c.writeByte(reg); in readThenWrite()
161 m_i2c.address(m_addrAcc); in readThenWrite()
162 return (int) m_i2c.readByte(); in readThenWrite()
188 if (m_i2c.address(slave) != mraa::SUCCESS) { in setRegisterSafe()
[all …]
/hardware/bsp/intel/peripheral/libupm/src/mpu9150/
Dak8975.cxx37 m_i2c(bus) in AK8975()
45 if ( (rv = m_i2c.address(m_addr)) != mraa::SUCCESS) in AK8975()
79 m_xCoeff = (float)m_i2c.readReg(REG_ASAX); in init()
80 m_yCoeff = (float)m_i2c.readReg(REG_ASAY); in init()
81 m_zCoeff = (float)m_i2c.readReg(REG_ASAZ); in init()
97 if ((rv = m_i2c.writeReg(REG_CNTL, mode)) != mraa::SUCCESS) in setMode()
112 uint8_t rdy = m_i2c.readReg(REG_ST1); in isReady()
163 m_i2c.readBytesReg(REG_HXL, data, 6); in update()
190 if ((rv = m_i2c.writeReg(REG_ASTC, ASTC_SELF)) != mraa::SUCCESS) in selfTest()
209 uint8_t reg = m_i2c.readReg(REG_ASTC); in selfTest()
[all …]
Dmpu60x0.cxx36 m_i2c(bus), m_gpioIRQ(0) in MPU60X0()
54 if ( (rv = m_i2c.address(m_addr)) != mraa::SUCCESS) in MPU60X0()
141 return m_i2c.readReg(reg); in readReg()
146 m_i2c.readBytesReg(reg, buffer, len); in readRegs()
152 if ((rv = m_i2c.writeReg(reg, val)) != mraa::SUCCESS) in writeReg()
/hardware/bsp/intel/peripheral/libupm/src/hmc5883l/
Dhmc5883l.cxx84 Hmc5883l::Hmc5883l(int bus) : m_i2c(bus) in Hmc5883l()
87 error = m_i2c.address(HMC5883L_I2C_ADDR); in Hmc5883l()
95 error = m_i2c.write(m_rx_tx_buf, 2); in Hmc5883l()
102 error = m_i2c.address(HMC5883L_I2C_ADDR); in Hmc5883l()
110 error = m_i2c.write(m_rx_tx_buf, 2); in Hmc5883l()
123 m_i2c.address(HMC5883L_I2C_ADDR); in update()
124 m_i2c.writeByte(HMC5883L_DATA_REG); in update()
126 m_i2c.address(HMC5883L_I2C_ADDR); in update()
127 m_i2c.read(m_rx_tx_buf, DATA_REG_SIZE); in update()
Dhmc5883l.h108 mraa::I2c m_i2c; variable
/hardware/bsp/intel/peripheral/libupm/src/nunchuck/
Dnunchuck.cxx47 if ( !(m_i2c = mraa_i2c_init(bus)) ) in NUNCHUCK()
56 if ( (rv = mraa_i2c_address(m_i2c, addr)) != MRAA_SUCCESS ) in NUNCHUCK()
65 mraa_i2c_stop(m_i2c); in ~NUNCHUCK()
72 if ( (rv = mraa_i2c_write_byte_data(m_i2c, byte, reg)) != MRAA_SUCCESS ) in writeByte()
87 mraa_i2c_address(m_i2c, NUNCHUCK_I2C_ADDR); in readBytes()
88 mraa_i2c_write_byte(m_i2c, reg); in readBytes()
90 return mraa_i2c_read(m_i2c, buffer, len); in readBytes()
/hardware/bsp/intel/peripheral/libupm/src/itg3200/
Ditg3200.cxx67 Itg3200::Itg3200(int bus) : m_i2c(bus) in Itg3200()
69 m_i2c.address(ITG3200_I2C_ADDR); in Itg3200()
72 m_i2c.write(m_buffer, 2); in Itg3200()
132 m_i2c.address(ITG3200_I2C_ADDR); in update()
133 m_i2c.writeByte(ITG3200_TEMP_H); in update()
135 m_i2c.address(ITG3200_I2C_ADDR); in update()
136 m_i2c.read(m_buffer, DATA_REG_SIZE); in update()
Ditg3200.h114 mraa::I2c m_i2c; variable
/hardware/bsp/intel/peripheral/libupm/src/adc121c021/
Dadc121c021.cxx38 m_i2c = mraa_i2c_init(bus); in ADC121C021()
39 if ( !(m_i2c = mraa_i2c_init(bus)) ) in ADC121C021()
48 mraa_result_t ret = mraa_i2c_address(m_i2c, m_addr); in ADC121C021()
62 mraa_i2c_stop(m_i2c); in ~ADC121C021()
67 return mraa_i2c_write_byte_data(m_i2c, byte, reg); in writeByte()
77 return mraa_i2c_write_word_data(m_i2c, word, reg); in writeWord()
82 return mraa_i2c_read_byte_data(m_i2c, reg); in readByte()
87 uint16_t val = mraa_i2c_read_word_data(m_i2c, reg); in readWord()
/hardware/bsp/intel/peripheral/libupm/src/lsm303d/
Dlsm303d.cxx40 LSM303d::LSM303d(int bus, int addr, int accScale) : m_i2c(bus) in LSM303d()
167 m_i2c.address(m_addr); in writeThenRead()
168 m_i2c.writeByte(reg); in writeThenRead()
169 m_i2c.address(m_addr); in writeThenRead()
170 return (int) m_i2c.readByte(); in writeThenRead()
196 if (m_i2c.address(slave) != mraa::SUCCESS) { in setRegisterSafe()
201 if (m_i2c.write(buf, 2) != mraa::SUCCESS) { in setRegisterSafe()
206 uint8_t val = m_i2c.readReg(sregister); in setRegisterSafe()
/hardware/bsp/intel/peripheral/libupm/src/pca9685/
Dpca9685.cxx44 m_i2c = mraa_i2c_init_raw(bus); in PCA9685()
48 m_i2c = mraa_i2c_init(bus); in PCA9685()
51 if ( !m_i2c) in PCA9685()
60 if ( (rv = mraa_i2c_address(m_i2c, m_addr)) != MRAA_SUCCESS) in PCA9685()
77 mraa_i2c_stop(m_i2c); in ~PCA9685()
82 mraa_result_t rv = mraa_i2c_write_byte_data(m_i2c, byte, reg); in writeByte()
96 mraa_result_t rv = mraa_i2c_write_word_data(m_i2c, word, reg); in writeWord()
110 return mraa_i2c_read_byte_data(m_i2c, reg); in readByte()
115 return mraa_i2c_read_word_data(m_i2c, reg); in readWord()
/hardware/bsp/intel/peripheral/libupm/src/ds1307/
Dds1307.cxx38 DS1307::DS1307(int bus) : m_i2c(bus) in DS1307()
41 mraa::Result ret = m_i2c.address(DS1307_I2C_ADDR); in DS1307()
64 mraa::Result ret = m_i2c.address(DS1307_I2C_ADDR); in writeBytes()
71 return m_i2c.write(buf2, len + 1); in writeBytes()
79 mraa::Result ret = m_i2c.address(DS1307_I2C_ADDR); in readBytes()
85 m_i2c.writeByte(reg); in readBytes()
87 return m_i2c.read(buffer, len); in readBytes()
/hardware/bsp/intel/peripheral/libupm/src/si114x/
Dsi114x.cxx45 if ( !(m_i2c = mraa_i2c_init(bus)) ) in SI114X()
54 if ( (rv = mraa_i2c_address(m_i2c, m_addr)) != MRAA_SUCCESS) in SI114X()
75 mraa_i2c_stop(m_i2c); in ~SI114X()
80 mraa_result_t rv = mraa_i2c_write_byte_data(m_i2c, byte, reg); in writeByte()
94 return mraa_i2c_read_byte_data(m_i2c, reg); in readByte()
99 return mraa_i2c_read_word_data(m_i2c, reg); in readWord()
/hardware/bsp/intel/peripheral/libupm/src/m24lr64e/
Dm24lr64e.cxx37 m_i2c(bus) in M24LR64E()
45 if ( (rv = m_i2c.address(m_addr)) != mraa::SUCCESS) in M24LR64E()
79 if (m_i2c.write(buf, pktLen)) in submitPasswd()
110 if (m_i2c.write(buf, pktLen)) in writePasswd()
222 if ((rv = m_i2c.write(buf, pktLen))) in EEPROM_Write_Byte()
243 if ((rv = m_i2c.write(buf, pktLen))) in EEPROM_Write_Bytes()
260 if (m_i2c.write(abuf, apktLen)) in EEPROM_Read_Byte()
272 if (m_i2c.read(buf, pktLen) != pktLen) in EEPROM_Read_Byte()
291 if (m_i2c.write(abuf, apktLen)) in EEPROM_Read_Bytes()
298 int rv = m_i2c.read(buffer, len); in EEPROM_Read_Bytes()
/hardware/bsp/intel/peripheral/libupm/src/at42qt1070/
Dat42qt1070.cxx42 if (!(m_i2c = mraa_i2c_init(bus))) { in AT42QT1070()
50 if ((rv = mraa_i2c_address(m_i2c, m_addr)) != MRAA_SUCCESS) { in AT42QT1070()
67 mraa_i2c_stop(m_i2c); in ~AT42QT1070()
73 mraa_result_t rv = mraa_i2c_write_byte_data(m_i2c, byte, reg); in writeByte()
87 mraa_result_t rv = mraa_i2c_write_word_data(m_i2c, word, reg); in writeWord()
101 return mraa_i2c_read_byte_data(m_i2c, reg); in readByte()
107 return mraa_i2c_read_word_data(m_i2c, reg); in readWord()
/hardware/bsp/intel/peripheral/libupm/src/mpr121/
Dmpr121.cxx35 MPR121::MPR121(int bus, uint8_t address) : m_i2c(bus) in MPR121()
38 mraa::Result ret = m_i2c.address(m_addr); in MPR121()
66 m_i2c.address(m_addr); in writeBytes()
68 return m_i2c.write(buf2, len + 1); in writeBytes()
79 buffer[i] = m_i2c.readReg(reg + i); in readBytes()
/hardware/bsp/intel/peripheral/libupm/src/hp20x/
Dhp20x.cxx38 m_i2c(bus) in HP20X()
43 if ( (rv = m_i2c.address(m_addr)) != mraa::SUCCESS) in HP20X()
103 if ((rv = m_i2c.writeByte(cmd)) != mraa::SUCCESS) in writeCmd()
120 if ((rv = m_i2c.writeReg(r, data)) != mraa::SUCCESS) in writeReg()
134 return m_i2c.readReg(r); in readReg()
141 if (!m_i2c.read(buf, 3)) in readData()
/hardware/bsp/intel/peripheral/libupm/src/mma7660/
Dmma7660.cxx41 if ( !(m_i2c = mraa_i2c_init(bus)) ) in MMA7660()
50 if ( (rv = mraa_i2c_address(m_i2c, m_addr)) != MRAA_SUCCESS) in MMA7660()
64 mraa_i2c_stop(m_i2c); in ~MMA7660()
69 mraa_result_t rv = mraa_i2c_write_byte_data(m_i2c, byte, reg); in writeByte()
81 return mraa_i2c_read_byte_data(m_i2c, reg); in readByte()
/hardware/bsp/intel/peripheral/libupm/src/grovemd/
Dgrovemd.cxx37 m_i2c(bus) in GroveMD()
43 if ( (rv = m_i2c.frequency(mraa::I2C_STD)) != mraa::SUCCESS ) in GroveMD()
50 if (m_i2c.address(m_addr)) in GroveMD()
76 if ( m_i2c.write(buf, 3) != mraa::SUCCESS ) in writePacket()

12