Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

コンフィグ済みの判定ロジック改善 #7

Open
kimushu opened this issue Jan 27, 2017 · 1 comment
Open

コンフィグ済みの判定ロジック改善 #7

kimushu opened this issue Jan 27, 2017 · 1 comment
Assignees

Comments

@kimushu
Copy link
Owner

kimushu commented Jan 27, 2017

open()内部でのconfiguredの判定に、現在はAS/PSスイッチ状態を用いているが、
スイッチ状態は必ずしもコンフィグレーションの状態を示しておらず、CONF_DONE(CPLD応答bit2)を用いるべきである。

そうすることで、以下のような場合にも正しく判定できる。

  • SW=ASだがコンフィグレーションされていない場合 (EPCSがEraseされている等)
  • NewGenを繋いだ場合 (そもそも応答する相手がいる時点でコンフィグ済みなので)

同時に、config()関数については、ボードが1stGenである場合に限定して使えるように改善する。
判定ロジックはboardInfoのシリアル番号先頭4桁(J72A:1stGen)を用いるのがよい。

@kimushu kimushu self-assigned this Jan 27, 2017
@kimushu kimushu added this to the newgen-support milestone Jan 27, 2017
@kimushu
Copy link
Owner Author

kimushu commented Jan 31, 2017

config()の1stGen限定については、config()のboardInfo引数に.id=J72Aを暗黙に設定する方法で実装する。
なお、boardInfo.idをconfig()呼び出し時に指定したときは、そちらを優先させる。
例えばconfig({id: "J72B"}, arrayBuffer) とすることで、J72A以外のボードにコンフィグを流し込むこともできる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant