已合并
【80cedcd530864bbb035b4d2a39098752】支持GPIO初始电平(CSR配置), 版本升级1.140.1 #9
liuyanyu09创建于 26 天前
【80cedcd530864bbb035b4d2a39098752】支持GPIO初始电平(CSR配置), 版本升级1.140.1 #9
已合并
共 6 个文件变更+40-1
| @@ -1,3 +1,6 @@ | |||
| 1 | +--version: 1.140.1 2026.10.21 | ||
| 2 | +* 增加GPIO初始电平的CSR配置 | ||
| 3 | + | ||
| 1 | --version: 1.140.0 2026.10.15 | 4 | --version: 1.140.0 2026.10.15 |
| 2 | * 修改依赖版本号 | 5 | * 修改依赖版本号 |
| 3 | 6 | ||
| @@ -1001,6 +1001,12 @@ local Gpio = { | |||
| 1001 | ['Id'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Id}, | 1001 | ['Id'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Id}, |
| 1002 | ['Direction'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Direction}, | 1002 | ['Direction'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Direction}, |
| 1003 | ['ReverseBit'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.ReverseBit}, | 1003 | ['ReverseBit'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.ReverseBit}, |
| 1004 | + ['InitialLevel'] = { | ||
| 1005 | + ['usage'] = {'CSR'}, | ||
| 1006 | + ['baseType'] = 'U8', | ||
| 1007 | + ['default'] = 255, | ||
| 1008 | + ['validator'] = gpio_class_types.InitialLevel | ||
| 1009 | + }, | ||
| 1004 | ['Bit0GpioNum'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Bit0GpioNum}, | 1010 | ['Bit0GpioNum'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Bit0GpioNum}, |
| 1005 | ['Bit1GpioNum'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Bit1GpioNum}, | 1011 | ['Bit1GpioNum'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Bit1GpioNum}, |
| 1006 | ['Bit2GpioNum'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Bit2GpioNum}, | 1012 | ['Bit2GpioNum'] = {['usage'] = {'CSR'}, ['baseType'] = 'U8', ['validator'] = gpio_class_types.Bit2GpioNum}, |
| @@ -1014,6 +1020,7 @@ local Gpio = { | |||
| 1014 | ['Id'] = gpio_class_types.Id.default[1], | 1020 | ['Id'] = gpio_class_types.Id.default[1], |
| 1015 | ['Direction'] = gpio_class_types.Direction.default[1], | 1021 | ['Direction'] = gpio_class_types.Direction.default[1], |
| 1016 | ['ReverseBit'] = gpio_class_types.ReverseBit.default[1], | 1022 | ['ReverseBit'] = gpio_class_types.ReverseBit.default[1], |
| 1023 | + ['InitialLevel'] = 255, | ||
| 1017 | ['Bit0GpioNum'] = gpio_class_types.Bit0GpioNum.default[1], | 1024 | ['Bit0GpioNum'] = gpio_class_types.Bit0GpioNum.default[1], |
| 1018 | ['Bit1GpioNum'] = gpio_class_types.Bit1GpioNum.default[1], | 1025 | ['Bit1GpioNum'] = gpio_class_types.Bit1GpioNum.default[1], |
| 1019 | ['Bit2GpioNum'] = gpio_class_types.Bit2GpioNum.default[1], | 1026 | ['Bit2GpioNum'] = gpio_class_types.Bit2GpioNum.default[1], |
| @@ -101,6 +101,17 @@ TBit0GpioNum = json_type_factory.define({ | |||
| 101 | 101 | ||
| 102 | MGpio.Bit0GpioNum = TBit0GpioNum | 102 | MGpio.Bit0GpioNum = TBit0GpioNum |
| 103 | 103 | ||
| 104 | +---@class MGpio.InitialLevel | ||
| 105 | +---@field InitialLevel integer | ||
| 106 | +TInitialLevel = json_type_factory.define({ | ||
| 107 | + fields = { | ||
| 108 | + {name = 'InitialLevel', lua_type = 'uint8', is_array = false, default = 255, readonly = false, required = false} | ||
| 109 | + }, | ||
| 110 | + groups = {} | ||
| 111 | +}) | ||
| 112 | + | ||
| 113 | +MGpio.InitialLevel = TInitialLevel | ||
| 114 | + | ||
| 104 | ---@class MGpio.ReverseBit | 115 | ---@class MGpio.ReverseBit |
| 105 | ---@field ReverseBit integer | 116 | ---@field ReverseBit integer |
| 106 | TReverseBit = json_type_factory.define({ | 117 | TReverseBit = json_type_factory.define({ |
| @@ -741,6 +741,14 @@ | |||
| 741 | "baseType": "U8", | 741 | "baseType": "U8", |
| 742 | "description": "0: 不变 1: 比特反转" | 742 | "description": "0: 不变 1: 比特反转" |
| 743 | }, | 743 | }, |
| 744 | + "InitialLevel": { | ||
| 745 | + "usage": [ | ||
| 746 | + "CSR" | ||
| 747 | + ], | ||
| 748 | + "baseType": "U8", | ||
| 749 | + "default": 255, | ||
| 750 | + "description": "GPIO管脚初始输出电平,0:低 1:高;255:未配置(无效默认值);仅Direction为输出且单管脚模式(Id!=255)时生效;不配置则不改变管脚电平" | ||
| 751 | + }, | ||
| 744 | "Bit0GpioNum": { | 752 | "Bit0GpioNum": { |
| 745 | "usage": [ | 753 | "usage": [ |
| 746 | "CSR" | 754 | "CSR" |
| @@ -892,6 +892,16 @@ | |||
| 892 | } | 892 | } |
| 893 | ] | 893 | ] |
| 894 | }, | 894 | }, |
| 895 | + "InitialLevel": { | ||
| 896 | + "allOf": [ | ||
| 897 | + { | ||
| 898 | + "$ref": "base.json#/U8" | ||
| 899 | + }, | ||
| 900 | + { | ||
| 901 | + "description": "GPIO\u7ba1\u811a\u521d\u59cb\u8f93\u51fa\u7535\u5e73, 0:\u4f4e 1:\u9ad8; \u4ec5Direction\u4e3a\u8f93\u51fa\u4e14\u5355\u7ba1\u811a\u6a21\u5f0f(Id!=255)\u65f6\u751f\u6548; \u4e0d\u914d\u7f6e\u5219\u4e0d\u6539\u53d8\u7ba1\u811a\u7535\u5e73" | ||
| 902 | + } | ||
| 903 | + ] | ||
| 904 | + }, | ||
| 895 | "Bit0GpioNum": { | 905 | "Bit0GpioNum": { |
| 896 | "allOf": [ | 906 | "allOf": [ |
| 897 | { | 907 | { |
| @@ -2,7 +2,7 @@ | |||
| 2 | "name": "hwproxy", | 2 | "name": "hwproxy", |
| 3 | "type": "application", | 3 | "type": "application", |
| 4 | "deployConfig": "framework.service", | 4 | "deployConfig": "framework.service", |
| 5 | - "version": "1.140.0", | 5 | + "version": "1.140.1", |
| 6 | "author": "Huawei", | 6 | "author": "Huawei", |
| 7 | "license": "Mulan PSL v2", | 7 | "license": "Mulan PSL v2", |
| 8 | "description": "hardware proxy component", | 8 | "description": "hardware proxy component", |
增加"default": 255后重新自动生成代码