File tree Expand file tree Collapse file tree 2 files changed +322
-295
lines changed
boards/adafruit_fruit_jam Expand file tree Collapse file tree 2 files changed +322
-295
lines changed Original file line number Diff line number Diff line change 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+
3348void 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
You can’t perform that action at this time.
0 commit comments