@@ -203,7 +203,6 @@ Napi::Value HID::readSync(const Napi::CallbackInfo &info)
203
203
204
204
unsigned char buff_read[READ_BUFF_MAXSIZE];
205
205
int returnedLength = hid_read (_hidHandle, buff_read, sizeof buff_read);
206
-
207
206
if (returnedLength == -1 )
208
207
{
209
208
Napi::TypeError::New (env, " could not read data from device" ).ThrowAsJavaScriptException ();
@@ -533,13 +532,13 @@ void HID::Initialize(Napi::Env &env, Napi::Object &exports)
533
532
Napi::Function ctor = DefineClass (env, " HID" , {
534
533
InstanceMethod (" close" , &HID::close ),
535
534
InstanceMethod (" read" , &HID::read ),
536
- InstanceMethod (" write" , &HID::write ),
537
- InstanceMethod (" getFeatureReport" , &HID::getFeatureReport),
538
- InstanceMethod (" sendFeatureReport" , &HID::sendFeatureReport),
539
- InstanceMethod (" setNonBlocking" , &HID::setNonBlocking),
540
- InstanceMethod (" readSync" , &HID::readSync),
541
- InstanceMethod (" readTimeout" , &HID::readTimeout),
542
- InstanceMethod (" getDeviceInfo" , &HID::getDeviceInfo),
535
+ InstanceMethod (" write" , &HID::write , napi_enumerable ),
536
+ InstanceMethod (" getFeatureReport" , &HID::getFeatureReport, napi_enumerable ),
537
+ InstanceMethod (" sendFeatureReport" , &HID::sendFeatureReport, napi_enumerable ),
538
+ InstanceMethod (" setNonBlocking" , &HID::setNonBlocking, napi_enumerable ),
539
+ InstanceMethod (" readSync" , &HID::readSync, napi_enumerable ),
540
+ InstanceMethod (" readTimeout" , &HID::readTimeout, napi_enumerable ),
541
+ InstanceMethod (" getDeviceInfo" , &HID::getDeviceInfo, napi_enumerable ),
543
542
});
544
543
545
544
exports.Set (" HID" , ctor);
0 commit comments