|
Treehopper C# API
|
Nintendo Entertainment System (NES) Controller More...
Public Member Functions | |
| NesController (Spi spi, SpiChipSelectPin ps) | |
| virtual async Task | UpdateAsync () |
| Requests a reading from the controller and updates its data properties with the gathered values. More... | |
Protected Member Functions | |
| void | RaiseDPadChanged () |
Protected Attributes | |
| SpiDevice | dev |
| DPadState | dpad |
Properties | |
| Button | A [get] |
| Button | B [get] |
| Button | Start [get] |
| Button | Select [get] |
| DPadState | DPad [get] |
| bool | AutoUpdateWhenPropertyRead = true [get, set] |
| int | AwaitPollingInterval = 25 [get, set] |
Events | |
| DPadStateEventHandler | DPadStateChanged |
| PropertyChangedEventHandler | PropertyChanged |
Nintendo Entertainment System (NES) Controller
| NesController | ( | Spi | spi, |
| SpiChipSelectPin | ps | ||
| ) |
|
virtual |
Requests a reading from the controller and updates its data properties with the gathered values.
Note that when AutoUpdateWhenPropertyRead is true (which it is, by default), this method is implicitly called when any sensor data property is read from — there's no need to call this method unless you set AutoUpdateWhenPropertyRead to false.
Unless otherwise noted, this method updates all sensor data simultaneously, which can often lead to more efficient bus usage (as well as reducing USB chattiness).
Implements IPollable.
Reimplemented in SuperNesController.
|
protected |
|
protected |
|
protected |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |
|
getset |
| DPadStateEventHandler DPadStateChanged |
| PropertyChangedEventHandler PropertyChanged |