From e491cdb48129752324c4e3764f99bd9203c56dec Mon Sep 17 00:00:00 2001
From: lgq <1015864684@qq.com>
Date: 星期二, 31 三月 2026 09:48:44 +0800
Subject: [PATCH] 1.新增VF205门禁机代码

---
 vf205_access/dxmodules/dxDriver.js |   81 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/vf205_access/dxmodules/dxDriver.js b/vf205_access/dxmodules/dxDriver.js
new file mode 100644
index 0000000..f1d77e4
--- /dev/null
+++ b/vf205_access/dxmodules/dxDriver.js
@@ -0,0 +1,81 @@
+const dxDriver = {}
+
+/*************************************Device Resource Enumeration*************************************/
+
+/**
+ * GPIO device pins
+ */
+dxDriver.GPIO = {
+
+    // Relay
+    RELAY0:         44,
+}
+
+/**
+ * Channel communication
+ */
+dxDriver.CHANNEL = {
+
+    // 485       
+    UART_PATH:      "/dev/ttySLB2",
+
+    // USBHID
+	USBHID_PATH:    "/dev/hidg1",
+}
+
+/**
+ * Camera related parameters
+ */
+dxDriver.CAPTURER = {
+    // Camera image width
+	RGB_WIDTH:  1280,
+    // Camera image height
+	RGB_HEIGHT:	800,
+    // Camera device files
+    RGB_PATH:  "/dev/video3",
+
+    // Camera image width
+	NIR_WIDTH:  800,
+    // Camera image height
+	NIR_HEIGHT:	600,
+    // Camera device files
+    NIR_PATH:  "/dev/video0"
+}
+
+/**
+ * PWM channel
+ */
+dxDriver.PWM = {
+
+    // Fill light
+    WHITE_SUPPLEMENT_CHANNEL:       4,
+    WHITE_SUPPLEMENT_PERIOD_NS:     255000,
+    WHITE_SUPPLEMENT_DUTY:          255000 * 255 / 255,
+    
+    NIR_SUPPLEMENT_CHANNEL:         7,
+    NIR_SUPPLEMENT_PERIOD_NS:       255000,
+    NIR_SUPPLEMENT_DUTY:            255000 * 255 / 255,
+}
+
+/**
+ * GPIO pin function enumeration
+ */
+dxDriver.GPIO_FUNC = {
+	GPIO_FUNC_3:    0x03,  //0011, GPIO as function 3 / device 3
+	GPIO_OUTPUT0:   0x04,  //0100, GPIO output low  level
+	GPIO_OUTPUT1:   0x05  //0101, GPIO output high level
+};
+
+/**
+ * Door opening button
+ */
+dxDriver.GPIO_KEY_OPEN = 30
+
+/**
+ * Door magnetic status
+ */
+dxDriver.GPIO_KEY_SEN = 48
+
+
+
+export default dxDriver
\ No newline at end of file

--
Gitblit v1.9.3