feat: add EskinDeviceFunc FFI bindings and update Python/README
- Add FFI wrappers for all EskinDeviceFunc trait methods: eskin_read_hdw_version, eskin_read_matrix_row/col, eskin_read_device_config1/2, eskin_write_device_config1/2, eskin_write_matrix_row/col - Extract sdk_error_to_code() helper for SdkError -> SdkErrorCode conversion - Update C header (include/eskin_ffi.h) with new function declarations - Update Python FFI bindings (example/python/eskin_ffi.py) with new methods - Update README with Python usage instructions and full FFI interface table
This commit is contained in:
@@ -60,6 +60,59 @@ EskinSdkErrorCode eskin_write_register(
|
||||
uint16_t* return_count
|
||||
);
|
||||
|
||||
// Device function interfaces (EskinDeviceFunc)
|
||||
|
||||
EskinSdkErrorCode eskin_read_hdw_version(
|
||||
EskinDeviceHandle handle,
|
||||
char* buf,
|
||||
uint32_t buf_len,
|
||||
uint32_t* actual_len
|
||||
);
|
||||
|
||||
EskinSdkErrorCode eskin_read_matrix_row(
|
||||
EskinDeviceHandle handle,
|
||||
uint8_t* out
|
||||
);
|
||||
|
||||
EskinSdkErrorCode eskin_read_matrix_col(
|
||||
EskinDeviceHandle handle,
|
||||
uint8_t* out
|
||||
);
|
||||
|
||||
EskinSdkErrorCode eskin_read_device_config1(
|
||||
EskinDeviceHandle handle,
|
||||
uint8_t* out
|
||||
);
|
||||
|
||||
EskinSdkErrorCode eskin_read_device_config2(
|
||||
EskinDeviceHandle handle,
|
||||
uint8_t* out
|
||||
);
|
||||
|
||||
EskinSdkErrorCode eskin_write_device_config1(
|
||||
EskinDeviceHandle handle,
|
||||
bool enable,
|
||||
uint16_t* return_count
|
||||
);
|
||||
|
||||
EskinSdkErrorCode eskin_write_device_config2(
|
||||
EskinDeviceHandle handle,
|
||||
bool enable,
|
||||
uint16_t* return_count
|
||||
);
|
||||
|
||||
EskinSdkErrorCode eskin_write_matrix_row(
|
||||
EskinDeviceHandle handle,
|
||||
uint8_t row,
|
||||
uint16_t* return_count
|
||||
);
|
||||
|
||||
EskinSdkErrorCode eskin_write_matrix_col(
|
||||
EskinDeviceHandle handle,
|
||||
uint8_t col,
|
||||
uint16_t* return_count
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user