PortaPack: Add reference oscillator control function.

This commit is contained in:
Jared Boone
2019-03-19 10:04:08 -07:00
parent c5e9b55b14
commit af66a7c076
2 changed files with 8 additions and 0 deletions

View File

@ -423,6 +423,12 @@ void portapack_backlight(const bool on) {
portapack_io_write(1, portapack_if.io_reg);
}
void portapack_reference_oscillator(const bool on) {
const uint8_t mask = 1 << 6;
portapack_if.io_reg = (portapack_if.io_reg & ~mask) | (on ? mask : 0);
portapack_io_write(1, portapack_if.io_reg);
}
void portapack_fill_rectangle(
const ui_rect_t rect,
const ui_color_t color

View File

@ -68,6 +68,8 @@ const portapack_t* portapack_init(void);
void portapack_backlight(const bool on);
void portapack_reference_oscillator(const bool on);
void portapack_fill_rectangle(
const ui_rect_t rect,
const ui_color_t color