16 lines
249 B
Go
16 lines
249 B
Go
package core
|
|
|
|
import (
|
|
"th7/data/config"
|
|
"th7/ports"
|
|
)
|
|
|
|
func NewAdapter(pcb ports.PCBPort, cfg config.Config) (ports.CorePort, error) {
|
|
|
|
if cfg.Board.Debug {
|
|
return NewDummyAdapter(pcb), nil
|
|
} else {
|
|
return NewTH7Adapter(pcb, cfg), nil
|
|
}
|
|
}
|