Цветная анимация индикации переключения задач

This commit is contained in:
Aren Elchinyan 2023-12-14 11:33:10 +03:00
parent 56d3e73f6d
commit 730fa37119
3 changed files with 9 additions and 4 deletions

View File

@ -15,6 +15,8 @@
"fb.h": "c",
"system.h": "c",
"mod.h": "c",
"modstd.h": "c"
"modstd.h": "c",
"stdbool.h": "c",
"stdint.h": "c"
}
}

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 1
#define VERSION_BUILD 837
#define VERSION_BUILD 840

View File

@ -13,15 +13,18 @@
#include <tool.h>
static volatile uint64_t count = 0;
static volatile uint64_t test_color = 0x00D000;
extern uint32_t width;
static volatile void isr_local( ) {
if (test_color >= 0xFFFFFF) { test_color = 0x00D000; }
uint32_t last = fb_get_text_color( );
fb_set_text_color(0x00FF00 + count);
fb_set_text_color(test_color);
fb_printf_at(SCREEN_WIDTH - 6 * 7, 0, "БМПОС");
fb_set_text_color(last);
count++;
test_color += 0x010101;
}
void pit_set_interval(int hz) {
@ -33,5 +36,5 @@ void pit_set_interval(int hz) {
void pit_init( ) {
idt_set_int(32, isr_local);
pit_set_interval(10000);
pit_set_interval(10);
}