Add method to disable cursor.

This commit is contained in:
giomba 2023-10-22 11:40:03 +02:00
parent d3e2651212
commit a49102fbac
2 changed files with 13 additions and 0 deletions

View File

@ -24,3 +24,13 @@ void cursor_setEndRaster(uint8_t end) {
io_out(0xA0, 11); io_out(0xA0, 11);
io_out(0xA1, end); io_out(0xA1, end);
} }
void cursor_enable(bool enable) {
if (enable) {
cursor_setStartRaster(0xd);
cursor_setEndRaster(0xd);
} else {
cursor_setStartRaster(0xd);
cursor_setEndRaster(0x0);
}
}

View File

@ -1,6 +1,7 @@
#ifndef CEDA_CURSOR_H #ifndef CEDA_CURSOR_H
#define CEDA_CURSOR_H #define CEDA_CURSOR_H
#include <stdbool.h>
#include <stdint.h> #include <stdint.h>
void cursor_setRaw(uint16_t address); void cursor_setRaw(uint16_t address);
@ -11,4 +12,6 @@ void cursor_setStartRaster(uint8_t start);
void cursor_setEndRaster(uint8_t end); void cursor_setEndRaster(uint8_t end);
void cursor_enable(bool enable);
#endif #endif