Skip to content

Commit 1e5b771

Browse files
AlexJones0marnovandermaas
authored andcommitted
Update Pinmux checker to follow new GP_I pin mapping
The joystick has now moved to come after the User DIP switches in the gpio_board input pin mapping. As such, the corresponding bit indexes in `pinmux_checker` must be updated so that the manual pinmux check procedure can continue to work. This change also needs to be propagated to all other software in the repository - this commit is just to get the manual pinmux checker working.
1 parent a8893e3 commit 1e5b771

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sw/cheri/checks/pinmux_checker.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static bool execute_spi_test(const Test &test, SpiPtr spis[2]) {
159159
* Checks whether Sonata's joystick is currently pressed down or not.
160160
*/
161161
static inline bool joystick_pressed(SonataGpioFull *gpio) {
162-
constexpr uint8_t SonataJoystickPressed = (1 << 2);
162+
constexpr uint16_t SonataJoystickPressed = (1 << 10);
163163
return gpio->general->input & SonataJoystickPressed;
164164
}
165165

@@ -168,7 +168,7 @@ static inline bool joystick_pressed(SonataGpioFull *gpio) {
168168
* (does not include being pressed down) or not.
169169
*/
170170
static inline bool joystick_moved(SonataGpioFull *gpio) {
171-
constexpr uint8_t SonataJoystickMoveMask = 0b11011;
171+
constexpr uint16_t SonataJoystickMoveMask = (0b11011) << 8;
172172
return (gpio->general->input & SonataJoystickMoveMask) > 0;
173173
}
174174

0 commit comments

Comments
 (0)