Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove const requirement from cplugin device_info function #89

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ ANALOGSDK_API int read_full_buffer(uint16_t code_buffer[],
///
/// Although, the client should be copying any data they want to use for a
/// prolonged time as there is no lifetime guarantee on the data.
ANALOGSDK_API int device_info(const WootingAnalog_DeviceInfo_FFI *buffer[],
ANALOGSDK_API int device_info(WootingAnalog_DeviceInfo_FFI *buffer[],
int len);

/// Function called to get the analog value for a particular HID key `code` from
/// the device with ID `device`. If `device` is 0 then no specific device is
/// specified and the value should be read from all devices and combined
ANALOGSDK_API float read_analog(uint16_t code, WootingAnalog_DeviceID device);
ANALOGSDK_API float read_analog(uint16_t code, WootingAnalog_DeviceID device);
4 changes: 2 additions & 2 deletions wooting-analog-sdk/test_c_plugin/src/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int read_full_buffer(uint16_t code_buffer[], float analog_buffer[], int len,
///
/// Although, the client should be copying any data they want to use for a
/// prolonged time as there is no lifetime guarantee on the data.
int device_info(const WootingAnalog_DeviceInfo_FFI *buffer[], int len) {
int device_info(WootingAnalog_DeviceInfo_FFI *buffer[], int len) {
buffer[0] = &deviceInfo;
return 1;
}
Expand All @@ -80,4 +80,4 @@ float read_analog(uint16_t code, WootingAnalog_DeviceID device) {
}

return 0.56f;
}
}