9#ifndef INCLUDE_INCLUDE_IO_H_
10#define INCLUDE_INCLUDE_IO_H_
171 unsigned char brightness);
295 const struct oled_font *font,
char character_id);
306 const struct oled_font *font,
char *text);
const unsigned char PROGMEM font5[95][5]
const unsigned char PROGMEM font4[95][4]
const unsigned char PROGMEM font8[95][8]
int io_avr_led_set(struct io_avr_device *dev, unsigned char led, unsigned char brightness)
struct __attribute__((packed)) io_avr_buttons
Represents button states for I/O boards (from I/O board manual).
io_joystick_direction
Predefined joystick directions.
volatile int io_oled_writedata(struct io_oled_device *dev, int data)
Writes data to OLED at current position.
int io_avr_init(struct io_avr_device *dev)
int io_joystick_read_position(struct io_joystick_device *dev, struct io_joystick_position *buffer)
Read the position of a joystick as a percentage from 0 in each axis.
int io_joystick_calibrate(struct io_joystick_device *dev)
Calibrate a joystick. Requires the joystick to be in its neutral position.
int io_oled_clear_all(struct io_oled_device *dev)
Clears all lines on the OLED (fills entire display with black).
int io_avr_buttons_read(struct io_avr_device *dev, struct io_avr_buttons *btn)
static const struct oled_font OLED_FONT_4x6
Predefined 4x6 font for OLED.
static const struct oled_font OLED_FONT_8x8
Predefined 8x8 font for OLED.
int io_oled_goto_line(struct io_oled_device *dev, int line)
Go to specific line in OLED.
int io_oled_write_command(struct io_oled_device *dev, uint8_t command)
int io_oled_print_arrow(struct io_oled_device *dev, uint8_t row, uint8_t col)
Prints an arrow at a specified postion.
int io_oled_clear_line(struct io_oled_device *dev, int line)
Clear specific line in OLED.
int io_oled_home(struct io_oled_device *dev)
Loads homescreen to OLED.
int io_oled_blink(struct io_oled_device *dev, uint8_t blinks)
Alternates screen between black and white.
int io_oled_write_data(struct io_oled_device *dev, uint8_t data)
int io_oled_reset(struct io_oled_device *dev)
Sends command to OLED.
int io_oled_reset_brightness(struct io_oled_device *dev)
Reset OLED brightness.
static const struct oled_font OLED_FONT_5x7
Predefined 5x7 font for OLED.
int io_oled_print(struct io_oled_device *dev, char *text)
Write string to OLED.
uint8_t io_oled_write_glyph(struct io_oled_device *dev, const struct oled_font *font, char character_id)
Prints a single glyph in a specifiec font.
int io_oled_pos(struct io_oled_device *dev, int row, int column)
Set specific position in OLED.
int io_joystick_read_direction(struct io_joystick_device *dev, enum io_joystick_direction *direction)
Fetches the direction of a joystick.
int io_oled_set_brightness(struct io_oled_device *dev, uint8_t brightness)
Set OLED brightness.
int io_joystick_init(struct io_joystick_device *dev)
Initialise and calibrate a joystick.
int io_oled_goto_column(struct io_oled_device *dev, int column)
Go to specific column in OLED.
int io_oled_print_with_font(struct io_oled_device *dev, const struct oled_font *font, char *text)
Prints an arrow at a specified postion.
int io_oled_test(struct io_oled_device *dev)
Prints a known image to the OLED to confirm that it can print and navigate the screen.
int io_oled_init(struct io_oled_device *dev)
Initialise OLED.
spi_slave
Identifiers for available SPI slave devices.
struct io_avr_buttons btn
Represents an SPI-connected AVR-I/O board.
Represents a joystick input device.
unsigned int adc_channel_x
unsigned int adc_channel_y
Represents the position of a joystick relative to center.
Represents an OLED display device controlled via SPI.
Represents a font for OLED displays.