@@ -214,7 +214,7 @@ static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(bitmapsize_obj, 6, 6, _bitmapsize);
214
214
//| def BitmapSource(self, addr: int) -> None:
215
215
//| """Set the source address for bitmap graphics
216
216
//|
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.
218
218
//| """
219
219
//| ...
220
220
@@ -225,6 +225,20 @@ static mp_obj_t _bitmapsource(mp_obj_t self, mp_obj_t a0) {
225
225
}
226
226
static MP_DEFINE_CONST_FUN_OBJ_2 (bitmapsource_obj , _bitmapsource ) ;
227
227
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
+
228
242
//| def BitmapSwizzle(self, r: int, g: int, b: int, a: int) -> None:
229
243
//| """Set the source for the r,g,b and a channels of a bitmap
230
244
//|
@@ -650,7 +664,7 @@ static MP_DEFINE_CONST_FUN_OBJ_1(nop_obj, _nop);
650
664
//| def PaletteSource(self, addr: int) -> None:
651
665
//| """Set the base address of the palette
652
666
//|
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.
654
668
//|
655
669
//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`.
656
670
//| """
@@ -663,6 +677,22 @@ static mp_obj_t _palettesource(mp_obj_t self, mp_obj_t a0) {
663
677
}
664
678
static MP_DEFINE_CONST_FUN_OBJ_2 (palettesource_obj , _palettesource ) ;
665
679
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
+
666
696
//| def RestoreContext(self) -> None:
667
697
//| """Restore the current graphics context from the context stack"""
668
698
//| ...
@@ -854,6 +884,7 @@ static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(vertex2ii_obj, 3, 5, _vertex2ii);
854
884
{ MP_ROM_QSTR(MP_QSTR_BitmapSizeH), MP_ROM_PTR(&bitmapsizeh_obj) }, \
855
885
{ MP_ROM_QSTR(MP_QSTR_BitmapSize), MP_ROM_PTR(&bitmapsize_obj) }, \
856
886
{ MP_ROM_QSTR(MP_QSTR_BitmapSource), MP_ROM_PTR(&bitmapsource_obj) }, \
887
+ { MP_ROM_QSTR(MP_QSTR_BitmapSourceH), MP_ROM_PTR(&bitmapsourceh_obj) }, \
857
888
{ MP_ROM_QSTR(MP_QSTR_BitmapSwizzle), MP_ROM_PTR(&bitmapswizzle_obj) }, \
858
889
{ MP_ROM_QSTR(MP_QSTR_BitmapTransformA), MP_ROM_PTR(&bitmaptransforma_obj) }, \
859
890
{ 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);
879
910
{ MP_ROM_QSTR(MP_QSTR_Macro), MP_ROM_PTR(¯o_obj) }, \
880
911
{ MP_ROM_QSTR(MP_QSTR_Nop), MP_ROM_PTR(&nop_obj) }, \
881
912
{ MP_ROM_QSTR(MP_QSTR_PaletteSource), MP_ROM_PTR(&palettesource_obj) }, \
913
+ { MP_ROM_QSTR(MP_QSTR_PaletteSourceH), MP_ROM_PTR(&palettesourceh_obj) }, \
882
914
{ MP_ROM_QSTR(MP_QSTR_PointSize), MP_ROM_PTR(&pointsize_obj) }, \
883
915
{ MP_ROM_QSTR(MP_QSTR_RestoreContext), MP_ROM_PTR(&restorecontext_obj) }, \
884
916
{ MP_ROM_QSTR(MP_QSTR_Return), MP_ROM_PTR(&return_obj) }, \
0 commit comments