Monado OpenXR Runtime
Loading...
Searching...
No Matches
esp770u.h
Go to the documentation of this file.
1// Copyright 2017, Philipp Zabel
2// Copyright 2025, Jan Schmidt
3// Copyright 2025-2026, Beyley Cardellio
4// SPDX-License-Identifier: BSL-1.0
5/*!
6 * @file
7 * @brief Implementation of esp770u sensor initialization
8 * @author Philipp Zabel <philipp.zabel@gmail.com>
9 * @author Jan Schmidt <jan@centricular.com>
10 * @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
11 * @ingroup drv_rift_sensor
12 */
13
14#pragma once
15
16#include "xrt/xrt_defines.h"
17
18#include <libusb.h>
19
20
21/*!
22 * Reads a buffer from the flash storage.
23 *
24 * @param[in] devh libusb device handle
25 * @param[in] addr Address to read from
26 * @param[out] data Buffer to read into
27 * @param[in] len Number of bytes to read
28 * @return 0 on success, negative error code on failure
29 */
30int
31rift_sensor_esp770u_flash_read(libusb_device_handle *devh, uint32_t addr, uint8_t *data, uint16_t len);
32
33/*!
34 * Sets up the radio with the given ID.
35 *
36 * @param[in] devhandle libusb device handle
37 * @param[in] radio_id 5-byte radio ID
38 * @return 0 on success, negative error code on failure
39 */
40int
41rift_sensor_esp770u_setup_radio(libusb_device_handle *devhandle, const uint8_t radio_id[5]);
42
43/*!
44 * Initial register setup, only after camera plugin
45 *
46 * @param[in] devhandle libusb device handle
47 * @return 0 on success, negative error code on failure
48 */
49int
50rift_sensor_esp770u_init_regs(libusb_device_handle *devhandle);
51
52/*!
53 * Extra initialisation sent after UVC config when in USB2 / MJPEG mode
54 *
55 * @param[in] devhandle libusb device handle
56 * @return 0 on success, negative error code on failure
57 */
58int
59rift_sensor_esp770u_init_jpeg(libusb_device_handle *devhandle);
int rift_sensor_esp770u_init_regs(libusb_device_handle *devhandle)
Initial register setup, only after camera plugin.
Definition esp770u.c:319
int rift_sensor_esp770u_init_jpeg(libusb_device_handle *devhandle)
Extra initialisation sent after UVC config when in USB2 / MJPEG mode.
Definition esp770u.c:417
int rift_sensor_esp770u_flash_read(libusb_device_handle *devh, uint32_t addr, uint8_t *data, uint16_t len)
Reads a buffer from the flash storage.
Definition esp770u.c:247
int rift_sensor_esp770u_setup_radio(libusb_device_handle *devhandle, const uint8_t radio_id[5])
Sets up the radio with the given ID.
Definition esp770u.c:286
Common defines and enums for XRT.