mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
feat: Massive OS expansion with IPC, Sound & TTS, Block layer, FAT32/ext2/sysfs, Signals, Syscalls, Modules, Drivers & 50+ LazyBox applets
This commit is contained in:
1 parent
5662be29f5
commit
d680335f05
64 files changed
+2370
-166
No files matched your search
@@ -0,0 +1,11 @@
|
||||
#ifndef _DRIVERS_ACPI_H
|
||||
#define _DRIVERS_ACPI_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
void acpi_init(void);
|
||||
void acpi_poweroff(void);
|
||||
void acpi_reboot(void);
|
||||
|
||||
#endif // _DRIVERS_ACPI_H
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef _DRIVERS_FB_H
|
||||
#define _DRIVERS_FB_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t* address;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t pitch;
|
||||
uint8_t bpp;
|
||||
bool active;
|
||||
} fb_info_t;
|
||||
|
||||
void fb_init(void);
|
||||
const fb_info_t* fb_get_info(void);
|
||||
void fb_put_pixel(uint32_t x, uint32_t y, uint32_t color);
|
||||
void fb_draw_rect(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t color);
|
||||
void fb_clear(uint32_t color);
|
||||
void fb_draw_char(uint32_t x, uint32_t y, char c, uint32_t fg, uint32_t bg);
|
||||
void fb_draw_string(uint32_t x, uint32_t y, const char* str, uint32_t fg, uint32_t bg);
|
||||
|
||||
#endif // _DRIVERS_FB_H
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef _DRIVERS_MOUSE_H
|
||||
#define _DRIVERS_MOUSE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
int x;
|
||||
int y;
|
||||
bool left_btn;
|
||||
bool right_btn;
|
||||
bool middle_btn;
|
||||
} mouse_state_t;
|
||||
|
||||
void mouse_init(void);
|
||||
const mouse_state_t* mouse_get_state(void);
|
||||
void mouse_set_bounds(int max_x, int max_y);
|
||||
|
||||
#endif // _DRIVERS_MOUSE_H
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef _DRIVERS_RTC_H
|
||||
#define _DRIVERS_RTC_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct {
|
||||
uint8_t second;
|
||||
uint8_t minute;
|
||||
uint8_t hour;
|
||||
uint8_t day;
|
||||
uint8_t month;
|
||||
uint32_t year;
|
||||
} rtc_time_t;
|
||||
|
||||
void rtc_init(void);
|
||||
void rtc_get_time(rtc_time_t* time);
|
||||
void rtc_format_string(char* buf, size_t max_len);
|
||||
|
||||
#endif // _DRIVERS_RTC_H
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef _DRIVERS_USB_H
|
||||
#define _DRIVERS_USB_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define USB_MAX_DEVICES 8
|
||||
|
||||
typedef enum {
|
||||
USB_SPEED_LOW = 0,
|
||||
USB_SPEED_FULL = 1,
|
||||
USB_SPEED_HIGH = 2
|
||||
} usb_speed_t;
|
||||
|
||||
typedef struct usb_device {
|
||||
uint8_t address;
|
||||
uint16_t vendor_id;
|
||||
uint16_t product_id;
|
||||
uint8_t class_code;
|
||||
char product_name[32];
|
||||
usb_speed_t speed;
|
||||
bool connected;
|
||||
} usb_device_t;
|
||||
|
||||
void usb_init(void);
|
||||
size_t usb_get_device_count(void);
|
||||
const usb_device_t* usb_get_device(size_t index);
|
||||
|
||||
#endif // _DRIVERS_USB_H
|
||||
Reference in new issue
Block a user