Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2cbcce

Browse files
committed
adds some additional debugging messages
1 parenteafeb00 commitb2cbcce

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

‎ext_mod/lcd_bus/src/common/modlcd_bus.c‎

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,20 @@ static mp_obj_t mp_lcd_bus_init(size_t n_args, const mp_obj_t *pos_args, mp_map_
134134
returnmp_const_none;
135135
}
136136

137-
if (mp_lcd_start_rotate_task(self)) {
138-
if ((self->sw_rotate||self->sw_rot.data.rgb565_swap)&&self->sw_rot.buffers.active==NULL) {
139-
ret=mp_lcd_allocate_rotation_buffers(self);
140-
if (ret==LCD_ERR_NO_MEM) {
141-
mp_raise_msg(&mp_type_MemoryError,MP_ERROR_TEXT("Not enough memory to allocate frame buffers"));
142-
returnmp_const_none;
143-
}
137+
if ((self->sw_rotate||self->sw_rot.data.rgb565_swap)&&self->sw_rot.buffers.active==NULL) {
138+
ret=mp_lcd_allocate_rotation_buffers(self);
139+
if (ret==LCD_ERR_NO_MEM) {
140+
mp_raise_msg(&mp_type_MemoryError,MP_ERROR_TEXT("Not enough memory to allocate frame buffers"));
141+
returnmp_const_none;
144142
}
145143
}
146144

147-
running_bus_count+=1;
148-
running_busses=realloc(running_busses,running_bus_count* (sizeof(mp_lcd_bus_obj_t*)));
149-
running_busses[running_bus_count-1]=self;
145+
if (mp_lcd_start_rotate_task(self)) {
146+
LCD_DEBUG_PRINT("mp_lcd_sw_rotate_task, running...\n")
147+
running_bus_count+=1;
148+
running_busses=realloc(running_busses,running_bus_count* (sizeof(mp_lcd_bus_obj_t*)));
149+
running_busses[running_bus_count-1]=self;
150+
}
150151

151152
returnmp_const_none;
152153
}
@@ -191,7 +192,10 @@ static mp_obj_t mp_lcd_bus_tx_param(size_t n_args, const mp_obj_t *pos_args, mp_
191192
mp_get_buffer_raise(args[ARG_params].u_obj,&bufinfo,MP_BUFFER_READ);
192193

193194
tx_params->params[tx_params->len-1].cmd= (int)args[ARG_cmd].u_int;
194-
tx_params->params[tx_params->len-1].params= (uint8_t*)bufinfo.buf;
195+
196+
tx_params->params[tx_params->len-1].params= (uint8_t*)malloc(bufinfo.len);
197+
memcpy(tx_params->params[tx_params->len-1].params,bufinfo.buf,bufinfo.len);
198+
195199
tx_params->params[tx_params->len-1].params_len= (size_t)bufinfo.len;
196200
tx_params->params[tx_params->len-1].flush_next= (bool)args[ARG_flush_next].u_bool;
197201
}else {

‎ext_mod/lcd_bus/src/common/sw_rotate_task_common.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ void mp_lcd_sw_rotate_task(void *self_in)
2020
mp_lcd_sw_rotation_handles_t*handles=&sw_rot->handles;
2121
mp_lcd_sw_rotate_tx_params_t*tx_params=&sw_rot->tx_params;
2222
mp_lcd_sw_rotation_init_t*init=&sw_rot->init;
23+
LCD_DEBUG_PRINT("mp_lcd_sw_rotate_task - starting bus init\n")
24+
2325

2426
if (!init->cb(self_in)) {
2527
mp_lcd_lock_release(&handles->init_lock);
2628
return;
2729
}
30+
LCD_DEBUG_PRINT("mp_lcd_sw_rotate_task - finished bus init\n")
2831

2932
uint8_t*idle_fb;
3033
uint8_tlast_update;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp