Defines | |
#define | FROB_BITS (10) |
#define | FROB_MIN (0) |
#define | FROB_MAX (1 << FROB_BITS) |
Functions | |
uint8_t | go_press () |
uint8_t | stop_press () |
void | go_click () |
void | stop_click () |
uint16_t | frob_read () |
uint16_t | frob_read_range (uint16_t min, uint16_t max) |
uint16_t | read_battery () |
void | beep (uint16_t freq, uint16_t duration) |
#define FROB_BITS (10) |
Bits of precision for the frob knob.
#define FROB_MAX (1 << FROB_BITS) |
Max value of frob knob.
#define FROB_MIN (0) |
Min value of frob knob.
void beep | ( | uint16_t | freq, | |
uint16_t | duration | |||
) |
Beep at a given frequency for a given duration.
freq | Frequency to beep | |
duration | Duration of beep |
uint16_t frob_read | ( | ) |
Read a value from the Frob knob.
uint16_t frob_read_range | ( | uint16_t | min, | |
uint16_t | max | |||
) |
Read the from the frob and scale into the range min<=frob<=max
min | minimum scaled value | |
max | maximum scaled value |
void go_click | ( | ) |
Wait for the user to click the 'Go' button. This will loop until the 'Go' button is pressed and released.
uint8_t go_press | ( | ) |
Check if the 'Go' button is pressed.
uint16_t read_battery | ( | ) |
Read the battery voltage. Returns a value in decivolts. @ return The battery voltage in decivolts.
void stop_click | ( | ) |
Wait for the user to click the 'Stop' button. This will loop until the 'Stop' button is pressed and released.
uint8_t stop_press | ( | ) |
Check if the 'Stop' button is pressed.