Skip to main content

外设驱动接口

Project description

驱动接口下载方式

 pip install driverApi -i https://www.pypi.org/simple/

驱动接口规范说明

1、driverApi 库包含以下目录:

  • common 基本常量以及基本工具的定义
  • device 基本设备功能及信息定义
  • driver 驱动接口规范
  • logger 日志输出工具

2、使用说明

(1)、目录结构定义

|-- your_project/
    |--package_name/
        |--module1.py
        |--module2.py
        |--your_driver.dll
    |--package_name/
        |--module3.py
        |--dll/
            |--your_driver.dll

package_name:符合变量命名规范,推荐使用设备型号命名,例如 CentA10)
module1.py: 设备功能模块
your_driver.dll: 该设备的驱动文件,可为文件或目录

(2)、加载驱动方式

示例目录
|-- ExtDriver/
    |--A10/
        |--__init__.py
        |--A10_keypad.py
        |--A10_multi_func_screen.py
        |--CENT_GWQ.dll

A10_keypad.py 模块中使用:
dll_GWQ = ctypes.WinDLL(get_absolute_path("plugin/A10/CENT_GWQ.dll"))加载驱动
get_absolute_path为common包中的工具,plugin为外设应用的插件目录

(3)、插件导入方式

将所有 package_name 包复制到外设工具的plugin目录下即可

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

driverApi-1.0.5.tar.gz (19.3 kB view details)

Uploaded Source

File details

Details for the file driverApi-1.0.5.tar.gz.

File metadata

  • Download URL: driverApi-1.0.5.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.10

File hashes

Hashes for driverApi-1.0.5.tar.gz
Algorithm Hash digest
SHA256 21f71143ef867eb868111263fcb92780e5043c148a8b7a59b4a32936760d664c
MD5 0b114b33413db8a241170b0a3c738613
BLAKE2b-256 c0e1bbbbde44946543fd4e2f0b2204f36b84d8901e4fbefcc78c0fd1b84a1055

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page