Implement initial profile reading and writing with little-endian offsets and CLI tool
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "azeron.h"
|
||||
#include <libusb-1.0/libusb.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define AZERON_USB_TIMEOUT 1000
|
||||
#define AZERON_MAX_STRING_LENGTH 256
|
||||
@@ -36,15 +37,17 @@ struct azeron_device {
|
||||
|
||||
/* Protocol functions */
|
||||
int azeron_protocol_init(struct azeron_device *device);
|
||||
int azeron_protocol_read_config(struct azeron_device *device, uint8_t *data, size_t *size);
|
||||
int azeron_protocol_read_config(struct azeron_device *device, uint32_t offset, uint8_t *data, size_t *size);
|
||||
int azeron_protocol_write_config(struct azeron_device *device, const uint8_t *data, size_t size);
|
||||
int azeron_protocol_get_button_mapping(struct azeron_device *device, uint8_t button_id, struct azeron_button_mapping *mapping);
|
||||
int azeron_protocol_set_button_mapping(struct azeron_device *device, const struct azeron_button_mapping *mapping);
|
||||
int azeron_protocol_get_stick_config(struct azeron_device *device, struct azeron_stick_config *config);
|
||||
int azeron_protocol_set_stick_config(struct azeron_device *device, const struct azeron_stick_config *config);
|
||||
int azeron_protocol_get_active_profile(struct azeron_device *device, uint8_t *profile_id);
|
||||
int azeron_protocol_set_active_profile(struct azeron_device *device, uint8_t profile_id);
|
||||
int azeron_protocol_get_profile(struct azeron_device *device, uint8_t profile_id, struct azeron_profile *profile);
|
||||
int azeron_protocol_set_profile(struct azeron_device *device, const struct azeron_profile *profile);
|
||||
int azeron_protocol_save_to_device(struct azeron_device *device);
|
||||
int azeron_protocol_save_to_device(struct azeron_device *device, uint8_t profile_id);
|
||||
|
||||
/* Device functions */
|
||||
int azeron_device_claim(struct azeron_device *device);
|
||||
|
||||
Reference in New Issue
Block a user