Skip to content

Commit 9f1734f

Browse files
committed
800x480 wip
1 parent bdedbe0 commit 9f1734f

File tree

2 files changed

+322
-295
lines changed

2 files changed

+322
-295
lines changed

ports/raspberrypi/boards/adafruit_fruit_jam/board.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#include "shared-bindings/usb_host/Port.h"
1010
#include "supervisor/board.h"
1111

12+
#include "shared-module/displayio/__init__.h"
13+
#include "common-hal/picodvi/__init__.h"
14+
1215
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
1316

1417

@@ -29,8 +32,21 @@ bool board_reset_pin_number(uint8_t pin_number) {
2932
}
3033
#endif
3134

32-
#if defined(DEFAULT_USB_HOST_DATA_PLUS)
35+
extern void mp_module_board_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest);
36+
37+
void mp_module_board_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
38+
if (attr == MP_QSTR_DISPLAY && dest[0] == MP_OBJ_NULL) {
39+
mp_obj_base_t *first_display = &displays[0].display_base;
40+
if (first_display->type != &mp_type_NoneType && first_display->type != NULL) {
41+
dest[0] = MP_OBJ_FROM_PTR(first_display);
42+
}
43+
}
44+
}
45+
46+
MP_REGISTER_MODULE_DELEGATION(board_module, mp_module_board_attr);
47+
3348
void board_init(void) {
49+
picodvi_autoconstruct();
50+
3451
common_hal_usb_host_port_construct(DEFAULT_USB_HOST_DATA_PLUS, DEFAULT_USB_HOST_DATA_MINUS);
3552
}
36-
#endif

0 commit comments

Comments
 (0)