PowerBlocks SDK
 
Loading...
Searching...
No Matches
gpio.h File Reference

Wii GPIO. More...

#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define GPIO_SLOT_LED   0x000020
 
#define GPIO_SLOT_IN   0x000080
 
#define GPIO_SENSOR_BAR   0x000100
 
#define GPIO_EJECT   0x000200
 
#define GPIO_AVE_SCL   0x004000
 
#define GPIO_AVE_SDA   0x008000
 

Functions

void gpio_write (uint32_t bit, bool set)
 Writes a GPIO output.
 
bool gpio_read (uint32_t bit)
 Reads a GPIO Input.
 
void gpio_set_direction (uint32_t bit, bool direction)
 Sets the direction of the GPIO.
 

Detailed Description

Wii GPIO.

Control the GPIO controller on the Wii

Author
Samuel Fitzsimons (rainbain)
Date
2025 @license MIT (see LICENSE file)

Function Documentation

◆ gpio_read()

bool gpio_read ( uint32_t bit)
extern

Reads a GPIO Input.

Reads the value of a GPIO Input

Parameters
bitBit to read value of

◆ gpio_set_direction()

void gpio_set_direction ( uint32_t bit,
bool direction )
extern

Sets the direction of the GPIO.

Sets the direction of a bit.

This is set to the expected value before the game runs.

Parameters
bitBit to set
DirectionFalse = Input, True = Output

◆ gpio_write()

void gpio_write ( uint32_t bit,
bool set )
extern

Writes a GPIO output.

Writes the bit to the GPIO controller.

Parameters
bitBit to set/clear