Another bugfix, improve header documentation a bit.
This commit is contained in:
parent
a9c80c2ed5
commit
2ce994677a
3 changed files with 16 additions and 7 deletions
17
Joystick.h
17
Joystick.h
|
@ -33,14 +33,19 @@ class Joystick {
|
|||
void Init();
|
||||
void Update();
|
||||
|
||||
// Add a button to the joystick.
|
||||
// Button types are documented in the ButtonType enum.
|
||||
// If `pullup` is true, your button should connect the pin to ground. (also be sure that your board supports INPUT_PULLUP on that pin)
|
||||
// If `pullup` is false, your button should connect the pin to VCC.
|
||||
// Setting `analogOnly` to true indicates your button *must* be read with analog code, such as the A6 and A7 pins
|
||||
// on the Arduino Nano.
|
||||
// Use these functions to add a button to the joystick.
|
||||
// Button types are documented in the ButtonType enum. See Button.h for details.
|
||||
// If 'pullup' is true, your button should connect the pin to ground. (also be sure that your board supports INPUT_PULLUP on that pin)
|
||||
// If 'pullup' is false, your button should connect the pin to VCC.
|
||||
|
||||
// Add a button connected directly to a pin on the microcontroller.
|
||||
void AddButton(uint8_t pin, ButtonType type, bool pullup=true);
|
||||
|
||||
// Add a button connected to a channel on a Multiplexer.
|
||||
// FIXME: This doesn't currently work!
|
||||
void AddMuxButton(uint8_t channel, Mux* mux, ButtonType type, bool pullup=true);
|
||||
|
||||
// Add a button connected to a scan matrix.
|
||||
void AddMatrixButton(uint8_t row, uint8_t col, Matrix* matrix, ButtonType type, bool pullup=true);
|
||||
|
||||
// Add a rotary encoder. ENCODER button types allow you to treat an encoder as a momentary button or an axis (TODO)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue