Monado OpenXR Runtime
Loading...
Searching...
No Matches
esp570.h File Reference

Implementation of esp570 sensor initialization. More...

#include "xrt/xrt_defines.h"
#include <libusb.h>
Include dependency graph for esp570.h:

Go to the source code of this file.

Functions

int esp570_i2c_read (libusb_device_handle *devh, uint8_t addr, uint8_t reg, uint16_t *val)
 Performs a 16-bit read operation on the I2C bus.
 
int esp570_i2c_write (libusb_device_handle *devh, uint8_t addr, uint8_t reg, uint16_t val)
 Performs a 16-bit write operation on the I2C bus.
 
int esp570_eeprom_read (libusb_device_handle *devh, uint16_t addr, uint8_t *buf, uint8_t len)
 Reads a buffer from the Microchip 24AA128 EEPROM.
 
int esp570_setup_unknown_3 (libusb_device_handle *devh)
 Calls SET_CUR and GET_CUR on the extension unit's selector 3 with values captured from the Oculus Windows drivers to setup the device.
 

Detailed Description

Function Documentation

◆ esp570_eeprom_read()

int esp570_eeprom_read ( libusb_device_handle *  devh,
uint16_t  addr,
uint8_t *  buf,
uint8_t  len 
)

Reads a buffer from the Microchip 24AA128 EEPROM.

Parameters
[in]devhlibusb device handle
[in]addrAddress to read from
[out]bufBuffer to read into
[in]lenNumber of bytes to read (max 32)
Returns
0 on success, negative error code on failure

References U_LOG_E, and uvc_xu_set_get_cur().

◆ esp570_i2c_read()

int esp570_i2c_read ( libusb_device_handle *  devh,
uint8_t  addr,
uint8_t  reg,
uint16_t *  val 
)

Performs a 16-bit read operation on the I2C bus.

Parameters
[in]devhlibusb device handle
[in]addrI2C address
[in]regRegister to read from
[out]valValue read
Returns
0 on success, negative error code on failure

References U_LOG_W, and uvc_xu_set_get_cur().

◆ esp570_i2c_write()

int esp570_i2c_write ( libusb_device_handle *  devh,
uint8_t  addr,
uint8_t  reg,
uint16_t  val 
)

Performs a 16-bit write operation on the I2C bus.

Parameters
[in]devhlibusb device handle
[in]addrI2C address
[in]regRegister to write to
[in]valValue to write
Returns
0 on success, negative error code on failure

References U_LOG_W, and uvc_xu_set_get_cur().

◆ esp570_setup_unknown_3()

int esp570_setup_unknown_3 ( libusb_device_handle *  devh)

Calls SET_CUR and GET_CUR on the extension unit's selector 3 with values captured from the Oculus Windows drivers to setup the device.

I have no idea what these mean.

Parameters
[in]devhlibusb device handle
Returns
0 on success, negative error code on failure

References U_LOG_W, and uvc_xu_set_get_cur().