Ken Van Hoeylandt b9427d4eba
App Loading via Loader (#1)
* app loading wip

* various improvements

irq/isr stuff is now working
lvgl locking where needed
hello world now uses proper mutex for app unlocking
etc?

* various improvements

* cmsis_esp improvements

* implement interrupts
2023-12-30 12:39:07 +01:00

16 lines
636 B
C

#include "check.h"
#include "display.h"
DisplayDevice _Nonnull* nb_display_device_alloc(DisplayDriver _Nonnull* driver) {
DisplayDevice _Nonnull* display = malloc(sizeof(DisplayDevice));
memset(display, 0, sizeof(DisplayDevice));
furi_check(driver->create_display_device(display), "failed to create display");
furi_check(display->io_handle != NULL);
furi_check(display->display_handle != NULL);
furi_check(display->horizontal_resolution != 0);
furi_check(display->vertical_resolution != 0);
furi_check(display->draw_buffer_height > 0);
furi_check(display->bits_per_pixel > 0);
return display;
}