@@ -214,7 +214,7 @@ static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitmapsize_obj, 6, 6, _bitmapsize);
214214//| def BitmapSource(self, addr: int) -> None:
215215//| """Set the source address for bitmap graphics
216216//|
217- //| :param int addr: Bitmap start address, pixel-aligned. May be in SRAM or flash. Range 0-16777215
217+ //| :param int addr: Bitmap start address, pixel-aligned, low part.
218218//| """
219219//| ...
220220
@@ -225,6 +225,20 @@ static mp_obj_t _bitmapsource(mp_obj_t self, mp_obj_t a0) {
225225}
226226static MP_DEFINE_CONST_FUN_OBJ_2 (bitmapsource_obj , _bitmapsource ) ;
227227
228+ //| def BitmapSourceH(self, addr: int) -> None:
229+ //| """Set the high source address for bitmap graphics
230+ //|
231+ //| :param int addr: Bitmap start address, pixel-aligned, high part.
232+ //| """
233+ //| ...
234+
235+ static mp_obj_t _bitmapsourceh (mp_obj_t self , mp_obj_t a0 ) {
236+ uint32_t addr = mp_obj_get_int_truncated (a0 );
237+ common_hal__eve_BitmapSourceH (EVEHAL (self ), addr );
238+ return mp_const_none ;
239+ }
240+ static MP_DEFINE_CONST_FUN_OBJ_2 (bitmapsourceh_obj , _bitmapsourceh ) ;
241+
228242//| def BitmapSwizzle(self, r: int, g: int, b: int, a: int) -> None:
229243//| """Set the source for the r,g,b and a channels of a bitmap
230244//|
@@ -650,7 +664,7 @@ static MP_DEFINE_CONST_FUN_OBJ_1(nop_obj, _nop);
650664//| def PaletteSource(self, addr: int) -> None:
651665//| """Set the base address of the palette
652666//|
653- //| :param int addr: Address in graphics SRAM , 2-byte aligned. Range 0-4194303. The initial value is 0
667+ //| :param int addr: Address in graphics RAM , 2-byte aligned, low part.
654668//|
655669//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.
656670//| """
@@ -663,6 +677,22 @@ static mp_obj_t _palettesource(mp_obj_t self, mp_obj_t a0) {
663677}
664678static MP_DEFINE_CONST_FUN_OBJ_2 (palettesource_obj , _palettesource ) ;
665679
680+ //| def PaletteSourceH(self, addr: int) -> None:
681+ //| """Set the base address of the palette
682+ //|
683+ //| :param int addr: Address in graphics RAM, 2-byte aligned, high part.
684+ //|
685+ //| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.
686+ //| """
687+ //| ...
688+
689+ static mp_obj_t _palettesourceh (mp_obj_t self , mp_obj_t a0 ) {
690+ uint32_t addr = mp_obj_get_int_truncated (a0 );
691+ common_hal__eve_PaletteSourceH (EVEHAL (self ), addr );
692+ return mp_const_none ;
693+ }
694+ static MP_DEFINE_CONST_FUN_OBJ_2 (palettesourceh_obj , _palettesourceh ) ;
695+
666696//| def RestoreContext(self) -> None:
667697//| """Restore the current graphics context from the context stack"""
668698//| ...
@@ -854,6 +884,7 @@ static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(vertex2ii_obj, 3, 5, _vertex2ii);
854884 { MP_ROM_QSTR(MP_QSTR_BitmapSizeH), MP_ROM_PTR(&bitmapsizeh_obj) }, \
855885 { MP_ROM_QSTR(MP_QSTR_BitmapSize), MP_ROM_PTR(&bitmapsize_obj) }, \
856886 { MP_ROM_QSTR(MP_QSTR_BitmapSource), MP_ROM_PTR(&bitmapsource_obj) }, \
887+ { MP_ROM_QSTR(MP_QSTR_BitmapSourceH), MP_ROM_PTR(&bitmapsourceh_obj) }, \
857888 { MP_ROM_QSTR(MP_QSTR_BitmapSwizzle), MP_ROM_PTR(&bitmapswizzle_obj) }, \
858889 { MP_ROM_QSTR(MP_QSTR_BitmapTransformA), MP_ROM_PTR(&bitmaptransforma_obj) }, \
859890 { MP_ROM_QSTR(MP_QSTR_BitmapTransformB), MP_ROM_PTR(&bitmaptransformb_obj) }, \
@@ -879,6 +910,7 @@ static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(vertex2ii_obj, 3, 5, _vertex2ii);
879910 { MP_ROM_QSTR(MP_QSTR_Macro), MP_ROM_PTR(¯o_obj) }, \
880911 { MP_ROM_QSTR(MP_QSTR_Nop), MP_ROM_PTR(&nop_obj) }, \
881912 { MP_ROM_QSTR(MP_QSTR_PaletteSource), MP_ROM_PTR(&palettesource_obj) }, \
913+ { MP_ROM_QSTR(MP_QSTR_PaletteSourceH), MP_ROM_PTR(&palettesourceh_obj) }, \
882914 { MP_ROM_QSTR(MP_QSTR_PointSize), MP_ROM_PTR(&pointsize_obj) }, \
883915 { MP_ROM_QSTR(MP_QSTR_RestoreContext), MP_ROM_PTR(&restorecontext_obj) }, \
884916 { MP_ROM_QSTR(MP_QSTR_Return), MP_ROM_PTR(&return_obj) }, \
0 commit comments