summaryrefslogtreecommitdiff
path: root/util/intelp2m/fields/fields.go
blob: e8d8625d0c975d1c785738186238e35ff0a1acfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package fields

import (
	"../config"
	"../platforms/common"
	"./fsp"
	"./cb"
	"./raw"
)

// InterfaceSet - set the interface for decoding configuration
// registers DW0 and DW1.
func InterfaceGet() common.Fields {
	var fldstylemap = map[uint8]common.Fields{
		config.NoFlds  : cb.FieldMacros{}, // analyze fields using cb macros
		config.CbFlds  : cb.FieldMacros{},
		config.FspFlds : fsp.FieldMacros{},
		config.RawFlds : raw.FieldMacros{},
	}
	return fldstylemap[config.FldStyleGet()]
}