Skip to content

Commit 58817f4

Browse files
committed
【完善】修复一些警告提示信息
1 parent 6715862 commit 58817f4

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

port/machine_hw_spi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ STATIC void machine_hard_spi_init(mp_obj_base_t *self_in, size_t n_args, const m
114114
}
115115
}
116116

117-
STATIC void machine_hard_spi_deinit(mp_obj_base_t *self_in) {
118-
return;
119-
}
117+
//STATIC void machine_hard_spi_deinit(mp_obj_base_t *self_in) {
118+
// return;
119+
//}
120120

121121
STATIC void machine_hard_spi_transfer(mp_obj_base_t *self_in, size_t len, const uint8_t *src, uint8_t *dest) {
122122
machine_hard_spi_obj_t *self = (machine_hard_spi_obj_t*)self_in;

port/machine_lcd.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ STATIC mp_obj_t machine_lcd_make_new(const mp_obj_type_t *type, size_t n_args, s
6666
///
6767
/// Turn the backlight on/off. True or 1 turns it on, False or 0 turns it off.
6868
STATIC mp_obj_t machine_lcd_light(mp_obj_t self_in, mp_obj_t value) {
69-
machine_lcd_obj_t *self = MP_OBJ_TO_PTR(self_in);
69+
// machine_lcd_obj_t *self = MP_OBJ_TO_PTR(self_in);
7070
if (mp_obj_is_true(value)) {
7171
lcd_display_on(); // set pin high to turn backlight on
7272
} else {
@@ -81,7 +81,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(machine_lcd_light_obj, machine_lcd_light);
8181
/// Fill the screen with the given colour.
8282
///
8383
STATIC mp_obj_t machine_lcd_fill(mp_obj_t self_in, mp_obj_t col_in) {
84-
machine_lcd_obj_t *self = MP_OBJ_TO_PTR(self_in);
84+
// machine_lcd_obj_t *self = MP_OBJ_TO_PTR(self_in);
8585

8686
int col = mp_obj_get_int(col_in);
8787
lcd_clear(col);
@@ -95,7 +95,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(machine_lcd_fill_obj, machine_lcd_fill);
9595
/// Set the pixel at `(x, y)` to the given colour.
9696
///
9797
STATIC mp_obj_t machine_lcd_pixel(size_t n_args, const mp_obj_t *args) {
98-
machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
98+
// machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
9999
int x = mp_obj_get_int(args[1]);
100100
int y = mp_obj_get_int(args[2]);
101101

@@ -113,8 +113,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_lcd_pixel_obj, 4, 4, machine_
113113
/// Draw the given text to the position `(x, y)` using the given size (16 24 32).
114114
///
115115
STATIC mp_obj_t machine_lcd_text(size_t n_args, const mp_obj_t *args) {
116-
// extract arguments
117-
machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
116+
// machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
118117
size_t len;
119118
const char *data = mp_obj_str_get_data(args[1], &len);
120119
int x = mp_obj_get_int(args[2]);
@@ -137,7 +136,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_lcd_text_obj, 5, 5, machine_l
137136
///
138137
STATIC mp_obj_t machine_lcd_line(size_t n_args, const mp_obj_t *args) {
139138
// extract arguments
140-
machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
139+
// machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
141140

142141
int x1 = mp_obj_get_int(args[1]);
143142
int y1 = mp_obj_get_int(args[2]);
@@ -158,7 +157,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_lcd_line_obj, 5, 5, machine_l
158157
///
159158
STATIC mp_obj_t machine_lcd_rectangle(size_t n_args, const mp_obj_t *args) {
160159
// extract arguments
161-
machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
160+
// machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
162161

163162
int x1 = mp_obj_get_int(args[1]);
164163
int y1 = mp_obj_get_int(args[2]);
@@ -178,8 +177,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_lcd_rectangle_obj, 5, 5, mach
178177
/// display a circle on the lcd, center(x1, y1) R = r.
179178
///
180179
STATIC mp_obj_t machine_lcd_circle(size_t n_args, const mp_obj_t *args) {
181-
// extract arguments
182-
machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
180+
// machine_lcd_obj_t *self = MP_OBJ_TO_PTR(args[0]);
183181

184182
int x1 = mp_obj_get_int(args[1]);
185183
int y1 = mp_obj_get_int(args[2]);

0 commit comments

Comments
 (0)