()
| 26 | } |
| 27 | |
| 28 | func (c *Controller) Read() byte { |
| 29 | value := byte(0) |
| 30 | if c.index < 8 && c.buttons[c.index] { |
| 31 | value = 1 |
| 32 | } |
| 33 | c.index++ |
| 34 | if c.strobe&1 == 1 { |
| 35 | c.index = 0 |
| 36 | } |
| 37 | return value |
| 38 | } |
| 39 | |
| 40 | func (c *Controller) Write(value byte) { |
| 41 | c.strobe = value |
nothing calls this directly
no outgoing calls
no test coverage detected