File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,29 @@ func (b *Board) String() string {
6060 return b .FQBN ()
6161}
6262
63+ // GetConfigOptions returns an OrderedMap of configuration options for this board.
64+ // The returned map will have key and value as option id and option name, respectively.
65+ func (b * Board ) GetConfigOptions () * properties.Map {
66+ res := properties .NewMap ()
67+ menu := b .Properties .SubTree ("menu" )
68+ for _ , option := range menu .FirstLevelKeys () {
69+ res .Set (option , b .PlatformRelease .Menus .Get (option ))
70+ }
71+ return res
72+ }
73+
74+ // GetConfigOptionValues returns an OrderedMap of possible values for a specific configuratio options
75+ // for this board. The returned map will have key and value as option value and option value name,
76+ // respectively.
77+ func (b * Board ) GetConfigOptionValues (option string ) * properties.Map {
78+ res := properties .NewMap ()
79+ menu := b .Properties .SubTree ("menu" ).SubTree (option )
80+ for _ , value := range menu .FirstLevelKeys () {
81+ res .Set (value , menu .Get (value ))
82+ }
83+ return res
84+ }
85+
6386// GetBuildProperties returns the build properties and the build
6487// platform for the Board with the configuration passed as parameter.
6588func (b * Board ) GetBuildProperties (userConfigs * properties.Map ) (* properties.Map , error ) {
You can’t perform that action at this time.
0 commit comments