GPIO
Interface class for manipulating GPIOs in order to do performance measurements on target. Not used on the PC simulator.
Public Types
| enum | GPIO_ID { VSYNC_FREQ, RENDER_TIME, FRAME_RATE, MCU_ACTIVE } |
| Enum for the GPIOs used. | |
Public Functions
| void | clear(GPIO_ID id) |
| Sets a pin low. | |
| bool | get(GPIO_ID id) |
| Gets the state of a pin. | |
| void | init() |
| Perform configuration of IO pins. | |
| void | set(GPIO_ID id) |
| Sets a pin high. | |
| void | toggle(GPIO_ID id) |
| Toggles a pin. | |
Public Types Documentation
GPIO_ID
enum GPIO_ID
Enum for the GPIOs used.
| VSYNC_FREQ | |
| RENDER_TIME | Pin is toggled at each VSYNC. |
| FRAME_RATE | Pin is high when frame rendering begins, low when finished. |
| MCU_ACTIVE | Pin is toggled when the framebuffers are swapped. Pin is high when the MCU is doing work (i.e. not in idle task). |
Public Functions Documentation
clear
get
Gets the state of a pin.
Parameters:
| id | the pin to get. |
Returns:
true if the pin is high, false otherwise.
init
| static void init | ( | ) |
Perform configuration of IO pins.