File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 30
30
31
31
#include "py/runtime.h"
32
32
33
- enum { align_bits = 8 * sizeof (uint32_t ) };
33
+ enum { ALIGN_BITS = 8 * sizeof (uint32_t ) };
34
34
35
35
static int stride (uint32_t width , uint32_t bits_per_value ) {
36
36
uint32_t row_width = width * bits_per_value ;
37
37
// align to uint32_t
38
- return (row_width + align_bits - 1 ) / align_bits ;
38
+ return (row_width + ALIGN_BITS - 1 ) / ALIGN_BITS ;
39
39
}
40
40
41
41
void common_hal_displayio_bitmap_construct (displayio_bitmap_t * self , uint32_t width ,
@@ -66,7 +66,7 @@ void common_hal_displayio_bitmap_construct_from_buffer(displayio_bitmap_t *self,
66
66
self -> x_shift = 0 ; // Used to divide the index by the number of pixels per word. Its used in a
67
67
// shift which effectively divides by 2 ** x_shift.
68
68
uint32_t power_of_two = 1 ;
69
- while (power_of_two < align_bits / bits_per_value ) {
69
+ while (power_of_two < ALIGN_BITS / bits_per_value ) {
70
70
self -> x_shift ++ ;
71
71
power_of_two <<= 1 ;
72
72
}
You can’t perform that action at this time.
0 commit comments