diff --git a/README.md b/README.md deleted file mode 100644 index bff81f4dc7c1d3348c55ae22e03fffdd1f53f0d2..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# gpio-manager - -#### 介绍 -``` - gpio-manager用于以DBus的形式管理GPIO,包括输出控制,输入监控(DBus signal和执 -行GPIO服务单元)以及简单的上下电控制。软件支持配置延时防抖,上下电控制支持配置电平或 -者脉冲的方式。 -``` - -#### 使用说明 -``` - 通过配置gpio_defs.json文件,软件读取配置后将根据配置生成对应的DBus路径,配置示 -例如下: -``` -``` -{ - "power_config": { - "power_good_in": "TEST_PWRGD", - "power_up_outs": [ - {"Name": "POWER_BOTH", "Power": "both", "LevelTriggered": flase}, - {"Name": "POWER_ON", "Power": "on", "LevelTriggered": flase}, - {"Name": "POWER_OFF", "Power": "off", "LevelTriggered": flase} - ], - "reset_outs": [ - ] - }, - "gpio_monitor": { - "TEST_PWRGD": { - "Monitor": "both", - "Target": "power-good-event.service" - } - }, - "gpio_manager": [ - "TEST_OUTPUT", - "TEST_INPUT" - ...... - ...... - ...... - ], - "gpio_definitions": [ - { - "Name": "TEST_OUTPUT", - "Chip": 0, - "Line": 1, - "Direction": "out", - "Polarity": false, - "DelayTime": 1000 - }, - { - "Name": "TEST_INPUT", - "Chip": 0, - "Line": 2, - "Direction": "in", - "Polarity": false - }, - { - "Name": "TEST_PWRGD", - "Chip": 0, - "Line": 3, - "Direction": "in", - "Polarity": false - }, - { - "Name": "POWER_BOTH", - "Chip": 1, - "Line": 1, - "Direction": "out", - "Polarity": false, - "DelayTime": 1000, - "DefaultValue": 1 - }, - { - "Name": "POWER_OFF", - "Chip": 1, - "Line": 2, - "Direction": "out", - "Polarity": false, - "DelayTime": 1000, - "DefaultValue": 1 - }, - { - "Name": "POWER_ON", - "Chip": 1, - "Line": 3, - "Direction": "out", - "Polarity": false, - "DelayTime": 1000, - "DefaultValue": 0 - } - ...... - ...... - ...... - ] -} -``` -``` - 其中Name、Chip、Line、Direction、Polarity为必选,DelayTime和DefaultValue为可 -选字段,对应键含义如下: - Name:GPIO名称(tring) - Chip:对应的gpiochip编号(int) - Line:对应line编号(int) - Direction:配置GPIO的方向(string,"out"/"in") - Polarity:配置对应GPIO的极性(bool) - DelayTime:配置的延时时间(uint64_t) - DefaultValue:GPIO生成的默认值(bool) - - power_config用于配置上下电的GPIO包括POWER GOOD输入GPIO以及控制的输出GPIO;其中 -power_up_outs中的Name用于匹配定义的GPIO名字,Power用于指定此GPIO用于开机(on)、关 -机(off)或者都支持(both),LevelTriggered用于配置触发方式:电平触发(true)脉冲 -(false); - gpio_monitor用于配置需要监控的输入GPIO,根据配置方式:由低到高(high)由高到低 -(low)以及同时监控(both),执行对应的服务; - gpio_manager暴露到DBus的GPIO;gpio_definitions用于定义GPIO信息的集合。 -``` -