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

Commit6f28051

Browse files
committed
esp32 and unix are compiling properly
1 parent35913ce commit6f28051

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+604
-746
lines changed

‎api_drivers/common_api_drivers/display/st7789/st7789.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
BYTE_ORDER_RGB=display_driver_framework.BYTE_ORDER_RGB
1414
BYTE_ORDER_BGR=display_driver_framework.BYTE_ORDER_BGR
1515

16-
_MADCTL_MV=const(0x20)#0=Normal, 1=Row/column exchange
17-
_MADCTL_MX=const(0x40)#0=Left to Right, 1=Right to Left
18-
_MADCTL_MY=const(0x80)#0=Top to Bottom, 1=Bottom to Top
16+
_MADCTL_MV=const(0x20)#X, Y = Y, X
17+
_MADCTL_MX=const(0x40)#Mirror X
18+
_MADCTL_MY=const(0x80)#Mirror Y
1919

2020

2121
classST7789(display_driver_framework.DisplayDriver):
2222
_ORIENTATION_TABLE= (
2323
0x0,
24-
_MADCTL_MV|_MADCTL_MX,
25-
_MADCTL_MY|_MADCTL_MX,
26-
_MADCTL_MV|_MADCTL_MY
24+
_MADCTL_MV,
25+
_MADCTL_MX|_MADCTL_MY,
26+
_MADCTL_MV|_MADCTL_MX|_MADCTL_MY
2727
)

‎api_drivers/py_api_drivers/frozen/display/display_driver_framework.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class DisplayDriver:
4646
_INVOFF=0x20
4747

4848
_ORIENTATION_TABLE= (
49-
_MADCTL_MX,
49+
0x0,
5050
_MADCTL_MV,
51-
_MADCTL_MY,
52-
_MADCTL_MY|_MADCTL_MX|_MADCTL_MV
51+
_MADCTL_MX|_MADCTL_MY,
52+
_MADCTL_MV|_MADCTL_MX|_MADCTL_MY
5353
)
5454

5555
_displays= []

‎builder/unix.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def update_mpconfigvariant_common():
396396
'#define MICROPY_MEM_STATS (0)'
397397
)
398398

399-
data+='\nn#define MICROPY_SCHEDULER_DEPTH (128)\n'
399+
data+='\n#define MICROPY_SCHEDULER_DEPTH (128)\n'
400400
data+='\n#define MICROPY_STACK_CHECK (0)\n'
401401

402402
write_file(MPCONFIGVARIANT_COMMON_PATH,data)
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#ifndef__LCD_BUS_UTILS_H__
22
#define__LCD_BUS_UTILS_H__
33

4+
#include"lcd_framebuf.h"
5+
#include"lcd_common_types.h"
6+
#include"lcd_types.h"
7+
48
mp_lcd_err_tmp_lcd_verify_frame_buffers(mp_lcd_framebuf_t*fb1,mp_lcd_framebuf_t*fb2);
59
mp_lcd_err_tmp_lcd_allocate_rotation_buffers(mp_lcd_bus_obj_t*self);
6-
voidmp_lcd_free_rotation_buffers(mp_lcd_bus_obj_tself);
10+
voidmp_lcd_free_rotation_buffers(mp_lcd_bus_obj_t*self);
711

812
#endif/* __LCD_BUS_UTILS_H__ */

‎ext_mod/lcd_bus/include/common/lcd_common_types.h‎

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,20 @@
88
#ifndef_COMMON_LCD_TYPES_H_
99
#define_COMMON_LCD_TYPES_H_
1010

11+
typedefenum {
12+
LCD_OK=0,
13+
LCD_FAIL=-1,
14+
LCD_ERR_NO_MEM=0x101,
15+
LCD_ERR_INVALID_ARG=0x102,
16+
LCD_ERR_INVALID_STATE=0x103,
17+
LCD_ERR_INVALID_SIZE=0x104,
18+
LCD_ERR_NOT_SUPPORTED=0x106
19+
}mp_lcd_err_t;
20+
1121
#include"lcd_framebuf.h"
1222
#include"lcd_types.h"
23+
#include"sw_rotate_task_common.h"
24+
#include"sw_rotate.h"
1325

1426
#defineLCD_UNUSED(x) ((void)x)
1527

@@ -34,21 +46,9 @@
3446

3547
typedefstruct_lcd_panel_io_tlcd_panel_io_t;
3648

37-
38-
typedefenum {
39-
LCD_OK=0,
40-
LCD_FAIL=-1,
41-
LCD_ERR_NO_MEM=0x101,
42-
LCD_ERR_INVALID_ARG=0x102,
43-
LCD_ERR_INVALID_STATE=0x103,
44-
LCD_ERR_INVALID_SIZE=0x104,
45-
LCD_ERR_NOT_SUPPORTED=0x106
46-
}mp_lcd_err_t;
47-
48-
4949
typedefstruct_mp_lcd_bus_obj_t {
5050
mp_obj_base_tbase;
51-
lcd_panel_io_tpanel_io_handle;
51+
struct_lcd_panel_io_tpanel_io_handle;
5252

5353
mp_obj_tcallback;
5454

@@ -62,7 +62,4 @@
6262
mp_lcd_sw_rotation_tsw_rot;
6363
}mp_lcd_bus_obj_t;
6464

65-
66-
voidmp_lcd_flush_ready_cb(mp_obj_tcb);
67-
6865
#endif/* _COMMON_LCD_TYPES_H_ */

‎ext_mod/lcd_bus/include/common/lcd_framebuf.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
}mp_lcd_framebuf_t;
1818

1919

20-
21-
2220
externconstmp_obj_type_tmp_lcd_framebuf_type;
2321

2422
#endif/* __LCD_FRAMEBUF_H__ */

‎ext_mod/lcd_bus/include/common/modlcd_bus.h‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,7 @@
55
#ifndef_MODLCD_BUS_H_
66
#define_MODLCD_BUS_H_
77

8-
externconstmp_obj_fun_builtin_var_tmp_lcd_bus_init_obj;
9-
externconstmp_obj_fun_builtin_var_tmp_lcd_bus_get_lane_count_obj;
10-
externconstmp_obj_fun_builtin_var_tmp_lcd_bus_tx_param_obj;
11-
externconstmp_obj_fun_builtin_var_tmp_lcd_bus_tx_color_obj;
12-
externconstmp_obj_fun_builtin_fixed_tmp_lcd_bus_deinit_obj;
13-
externconstmp_obj_fun_builtin_var_tmp_lcd_bus_rx_param_obj;
14-
externconstmp_obj_fun_builtin_var_tmp_lcd_bus_register_callback_obj;
15-
externconstmp_obj_fun_builtin_var_tmp_lcd_bus_free_framebuffer_obj;
16-
externconstmp_obj_fun_builtin_var_tmp_lcd_bus_allocate_framebuffer_obj;
17-
188
externconstmp_obj_dict_tmp_lcd_bus_locals_dict;
19-
209
voidmp_lcd_bus_shutdown(void);
2110

2211
#endif/* _MODLCD_BUS_H_ */

‎ext_mod/lcd_bus/include/common/sw_rotate.h‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
#include"sw_rotate_task_common.h"
33
#include"sw_rotate_task.h"
4+
#include"lcd_common_types.h"
5+
6+
#include"py/misc.h"
47

58

69
#ifndef__SW_ROTATE_H__
@@ -12,6 +15,9 @@
1215
#defineLCD_ROTATION_180 (2)
1316
#defineLCD_ROTATION_270 (3)
1417

18+
#defineLCD_MIN(v1,v2) v1 <= v2 ? v1 : v2
19+
20+
1521
typedefstruct_mp_lcd_sw_rotation_data_t {
1622
uint32_tx_start:16;
1723
uint32_ty_start:16;
@@ -59,11 +65,11 @@
5965
mp_lcd_sw_rotate_tx_param_t*params;
6066
uint8_tlen;
6167
mp_lcd_lock_tlock;
62-
mp_lcd_tx_param_cb_ttx_param_cb;
68+
mp_lcd_tx_param_cb_tcb;
6369
}mp_lcd_sw_rotate_tx_params_t;
6470

6571

66-
typedefbool (*mp_lcd_sw_rotation_init_cb_t)(void*self_in)
72+
typedefbool (*mp_lcd_sw_rotation_init_cb_t)(void*self_in);
6773

6874
typedefstruct_mp_lcd_sw_rotation_init_t {
6975
mp_lcd_err_terr;
@@ -72,7 +78,7 @@
7278
}mp_lcd_sw_rotation_init_t;
7379

7480

75-
typedefvoid (*mp_lcd_sw_rotate_flush_cb_t)(void*self_in,uint8_tlast_update,uint8_t*idle_fb);
81+
typedefvoid (*mp_lcd_sw_rotate_flush_cb_t)(void*self_in,intcmd,uint8_tlast_update,uint8_t*idle_fb);
7682

7783

7884
typedefstruct_mp_lcd_sw_rotation_t {
@@ -85,6 +91,6 @@
8591
}mp_lcd_sw_rotation_t;
8692

8793

88-
staticvoidmp_lcd_sw_rotation(void*dst,void*src,mp_lcd_sw_rotation_data_t*data);
94+
voidmp_lcd_sw_rotate(void*dst,void*src,mp_lcd_sw_rotation_data_t*copy_data);
8995

9096
#endif/* __SW_ROTATE_H__ */

‎ext_mod/lcd_bus/include/common/sw_rotate_task_common.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include"sw_rotate_task.h"
22

3+
#include"py/obj.h"
4+
5+
36
#ifndef__SW_ROTATE_TASK_COMMON_H__
47
#define__SW_ROTATE_TASK_COMMON_H__
58

@@ -26,6 +29,7 @@
2629

2730

2831
boolmp_lcd_start_rotate_task(void*self_in);
29-
voidmp_lcd_sw_rotate_task(void*self_in)
32+
voidmp_lcd_sw_rotate_task(void*self_in);
33+
voidmp_lcd_flush_ready_cb(mp_obj_tcallback,boolwake);
3034

3135
#endif/* __SW_ROTATE_TASK_COMMON_H__ */

‎ext_mod/lcd_bus/include/esp32/i2c_bus.h‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,25 @@
1111
#include"driver/i2c.h"
1212

1313
#include"common/lcd_common_types.h"
14+
#include"common/sw_rotate_task_common.h"
15+
#include"common/sw_rotate.h"
16+
#include"lcd_types.h"
1417

1518

1619
struct_mp_lcd_i2c_bus_obj_t {
17-
struct_mp_lcd_bus_obj_t;
20+
mp_obj_base_tbase;
21+
lcd_panel_io_tpanel_io_handle;
22+
23+
mp_obj_tcallback;
24+
25+
mp_lcd_framebuf_t*fb1;
26+
mp_lcd_framebuf_t*fb2;
27+
28+
uint8_ttrans_done:1;
29+
uint8_tsw_rotate:1;
30+
uint8_tlanes:5;
31+
32+
mp_lcd_sw_rotation_tsw_rot;
1833

1934
esp_lcd_panel_io_i2c_config_t*panel_io_config;
2035
i2c_config_t*bus_config;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp