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

Commit290614c

Browse files
committed
global: Remove the STATIC macro.
Damien has said for a while that he wants to get rid of it. No time likethe present!Methodology was:1)git ls-files | egrep '\.[ch]$' | \ xargs sed -Ei "s/(^| )STATIC($| )/\1static\2/"2)Do some manual cleanup in the diff by searching for the word STATIC incomments and changing those back.3)"git-grep STATIC docs/", manually fixed those cases4)"rg -t python STATIC", manually fixed the codegen lines that used STATIC.5)A few files in renesas-ra port flagged codespell so there are some spellingfixes on top of everything else.This work was funded through GitHub Sponsors.Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent8fdcc25 commit290614c

File tree

481 files changed

+6290
-6296
lines changed

Some content is hidden

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

481 files changed

+6290
-6296
lines changed

‎docs/develop/compiler.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Then also edit ``py/lexer.c`` to add the new keyword literal text:
9898
..code-block::c
9999
:emphasize-lines: 12
100100
101-
STATIC const char *const tok_kw[] = {
101+
static const char *const tok_kw[] = {
102102
...
103103
"or",
104104
"pass",
@@ -301,7 +301,7 @@ code statement:
301301

302302
..code-block::c
303303
304-
STATIC void emit_native_unary_op(emit_t *emit, mp_unary_op_t op) {
304+
static void emit_native_unary_op(emit_t *emit, mp_unary_op_t op) {
305305
vtype_kind_t vtype;
306306
emit_pre_pop_reg(emit, &vtype, REG_ARG_2);
307307
if (vtype == VTYPE_PYOBJ) {

‎docs/develop/library.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ hypothetical new module ``subsystem`` in the file ``modsubsystem.c``:
4848
#if MICROPY_PY_SUBSYSTEM
4949
5050
// info()
51-
STATIC mp_obj_t py_subsystem_info(void) {
51+
static mp_obj_t py_subsystem_info(void) {
5252
return MP_OBJ_NEW_SMALL_INT(42);
5353
}
5454
MP_DEFINE_CONST_FUN_OBJ_0(subsystem_info_obj, py_subsystem_info);
5555
56-
STATIC const mp_rom_map_elem_t mp_module_subsystem_globals_table[] = {
56+
static const mp_rom_map_elem_t mp_module_subsystem_globals_table[] = {
5757
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_subsystem) },
5858
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&subsystem_info_obj) },
5959
};
60-
STATIC MP_DEFINE_CONST_DICT(mp_module_subsystem_globals, mp_module_subsystem_globals_table);
60+
static MP_DEFINE_CONST_DICT(mp_module_subsystem_globals, mp_module_subsystem_globals_table);
6161
6262
const mp_obj_module_t mp_module_subsystem = {
6363
.base = { &mp_type_module },

‎docs/develop/natmod.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ The file ``factorial.c`` contains:
128128
#include "py/dynruntime.h"
129129
130130
// Helper function to compute factorial
131-
STATIC mp_int_t factorial_helper(mp_int_t x) {
131+
static mp_int_t factorial_helper(mp_int_t x) {
132132
if (x == 0) {
133133
return 1;
134134
}
135135
return x * factorial_helper(x - 1);
136136
}
137137
138138
// This is the function which will be called from Python, as factorial(x)
139-
STATIC mp_obj_t factorial(mp_obj_t x_obj) {
139+
static mp_obj_t factorial(mp_obj_t x_obj) {
140140
// Extract the integer from the MicroPython input object
141141
mp_int_t x = mp_obj_get_int(x_obj);
142142
// Calculate the factorial
@@ -145,7 +145,7 @@ The file ``factorial.c`` contains:
145145
return mp_obj_new_int(result);
146146
}
147147
// Define a Python reference to the function above
148-
STATIC MP_DEFINE_CONST_FUN_OBJ_1(factorial_obj, factorial);
148+
static MP_DEFINE_CONST_FUN_OBJ_1(factorial_obj, factorial);
149149
150150
// This is the entry point and is called when the module is imported
151151
mp_obj_t mpy_init(mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, mp_obj_t *args) {

‎docs/develop/porting.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,17 +262,17 @@ To add a custom module like ``myport``, first add the module definition in a fil
262262
263263
#include "py/runtime.h"
264264
265-
STATIC mp_obj_t myport_info(void) {
265+
static mp_obj_t myport_info(void) {
266266
mp_printf(&mp_plat_print, "info about my port\n");
267267
return mp_const_none;
268268
}
269-
STATIC MP_DEFINE_CONST_FUN_OBJ_0(myport_info_obj, myport_info);
269+
static MP_DEFINE_CONST_FUN_OBJ_0(myport_info_obj, myport_info);
270270
271-
STATIC const mp_rom_map_elem_t myport_module_globals_table[] = {
271+
static const mp_rom_map_elem_t myport_module_globals_table[] = {
272272
{ MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_myport) },
273273
{ MP_ROM_QSTR(MP_QSTR_info), MP_ROM_PTR(&myport_info_obj) },
274274
};
275-
STATIC MP_DEFINE_CONST_DICT(myport_module_globals, myport_module_globals_table);
275+
static MP_DEFINE_CONST_DICT(myport_module_globals, myport_module_globals_table);
276276
277277
const mp_obj_module_t myport_module = {
278278
.base = { &mp_type_module },

‎drivers/bus/softqspi.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949

5050
#endif
5151

52-
STATICvoidnibble_write(mp_soft_qspi_obj_t*self,uint8_tv) {
52+
staticvoidnibble_write(mp_soft_qspi_obj_t*self,uint8_tv) {
5353
mp_hal_pin_write(self->io0,v&1);
5454
mp_hal_pin_write(self->io1, (v >>1)&1);
5555
mp_hal_pin_write(self->io2, (v >>2)&1);
5656
mp_hal_pin_write(self->io3, (v >>3)&1);
5757
}
5858

59-
STATICintmp_soft_qspi_ioctl(void*self_in,uint32_tcmd) {
59+
staticintmp_soft_qspi_ioctl(void*self_in,uint32_tcmd) {
6060
mp_soft_qspi_obj_t*self= (mp_soft_qspi_obj_t*)self_in;
6161

6262
switch (cmd) {
@@ -80,7 +80,7 @@ STATIC int mp_soft_qspi_ioctl(void *self_in, uint32_t cmd) {
8080
return0;// success
8181
}
8282

83-
STATICvoidmp_soft_qspi_transfer(mp_soft_qspi_obj_t*self,size_tlen,constuint8_t*src,uint8_t*dest) {
83+
staticvoidmp_soft_qspi_transfer(mp_soft_qspi_obj_t*self,size_tlen,constuint8_t*src,uint8_t*dest) {
8484
// Will run as fast as possible, limited only by CPU speed and GPIO time
8585
mp_hal_pin_input(self->io1);
8686
mp_hal_pin_output(self->io0);
@@ -119,7 +119,7 @@ STATIC void mp_soft_qspi_transfer(mp_soft_qspi_obj_t *self, size_t len, const ui
119119
}
120120
}
121121

122-
STATICvoidmp_soft_qspi_qread(mp_soft_qspi_obj_t*self,size_tlen,uint8_t*buf) {
122+
staticvoidmp_soft_qspi_qread(mp_soft_qspi_obj_t*self,size_tlen,uint8_t*buf) {
123123
// Make all IO lines input
124124
mp_hal_pin_input(self->io2);
125125
mp_hal_pin_input(self->io3);
@@ -137,7 +137,7 @@ STATIC void mp_soft_qspi_qread(mp_soft_qspi_obj_t *self, size_t len, uint8_t *bu
137137
}
138138
}
139139

140-
STATICvoidmp_soft_qspi_qwrite(mp_soft_qspi_obj_t*self,size_tlen,constuint8_t*buf) {
140+
staticvoidmp_soft_qspi_qwrite(mp_soft_qspi_obj_t*self,size_tlen,constuint8_t*buf) {
141141
// Make all IO lines output
142142
mp_hal_pin_output(self->io2);
143143
mp_hal_pin_output(self->io3);
@@ -158,7 +158,7 @@ STATIC void mp_soft_qspi_qwrite(mp_soft_qspi_obj_t *self, size_t len, const uint
158158
//mp_hal_pin_input(self->io1);
159159
}
160160

161-
STATICintmp_soft_qspi_write_cmd_data(void*self_in,uint8_tcmd,size_tlen,uint32_tdata) {
161+
staticintmp_soft_qspi_write_cmd_data(void*self_in,uint8_tcmd,size_tlen,uint32_tdata) {
162162
mp_soft_qspi_obj_t*self= (mp_soft_qspi_obj_t*)self_in;
163163
uint32_tcmd_buf=cmd |data <<8;
164164
CS_LOW(self);
@@ -167,7 +167,7 @@ STATIC int mp_soft_qspi_write_cmd_data(void *self_in, uint8_t cmd, size_t len, u
167167
return0;
168168
}
169169

170-
STATICintmp_soft_qspi_write_cmd_addr_data(void*self_in,uint8_tcmd,uint32_taddr,size_tlen,constuint8_t*src) {
170+
staticintmp_soft_qspi_write_cmd_addr_data(void*self_in,uint8_tcmd,uint32_taddr,size_tlen,constuint8_t*src) {
171171
mp_soft_qspi_obj_t*self= (mp_soft_qspi_obj_t*)self_in;
172172
uint8_tcmd_buf[5]= {cmd};
173173
uint8_taddr_len=mp_spi_set_addr_buff(&cmd_buf[1],addr);
@@ -178,7 +178,7 @@ STATIC int mp_soft_qspi_write_cmd_addr_data(void *self_in, uint8_t cmd, uint32_t
178178
return0;
179179
}
180180

181-
STATICintmp_soft_qspi_read_cmd(void*self_in,uint8_tcmd,size_tlen,uint32_t*dest) {
181+
staticintmp_soft_qspi_read_cmd(void*self_in,uint8_tcmd,size_tlen,uint32_t*dest) {
182182
mp_soft_qspi_obj_t*self= (mp_soft_qspi_obj_t*)self_in;
183183
uint32_tcmd_buf=cmd;
184184
CS_LOW(self);
@@ -188,7 +188,7 @@ STATIC int mp_soft_qspi_read_cmd(void *self_in, uint8_t cmd, size_t len, uint32_
188188
return0;
189189
}
190190

191-
STATICintmp_soft_qspi_read_cmd_qaddr_qdata(void*self_in,uint8_tcmd,uint32_taddr,size_tlen,uint8_t*dest) {
191+
staticintmp_soft_qspi_read_cmd_qaddr_qdata(void*self_in,uint8_tcmd,uint32_taddr,size_tlen,uint8_t*dest) {
192192
mp_soft_qspi_obj_t*self= (mp_soft_qspi_obj_t*)self_in;
193193
uint8_tcmd_buf[7]= {cmd};
194194
uint8_taddr_len=mp_spi_set_addr_buff(&cmd_buf[1],addr);

‎drivers/cyw43/cywbt.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern uint8_t mp_bluetooth_hci_cmd_buf[4 + 256];
5151
// Provided by the port.
5252
externmachine_uart_obj_tmp_bluetooth_hci_uart_obj;
5353

54-
STATICvoidcywbt_wait_cts_low(void) {
54+
staticvoidcywbt_wait_cts_low(void) {
5555
mp_hal_pin_config(CYW43_PIN_BT_CTS,MP_HAL_PIN_MODE_INPUT,MP_HAL_PIN_PULL_UP,0);
5656
for (inti=0;i<200;++i) {
5757
if (mp_hal_pin_read(CYW43_PIN_BT_CTS)==0) {
@@ -64,7 +64,7 @@ STATIC void cywbt_wait_cts_low(void) {
6464
}
6565
#endif
6666

67-
STATICintcywbt_hci_cmd_raw(size_tlen,uint8_t*buf) {
67+
staticintcywbt_hci_cmd_raw(size_tlen,uint8_t*buf) {
6868
mp_bluetooth_hci_uart_write((void*)buf,len);
6969
for (intc,i=0;i<6;++i) {
7070
while ((c=mp_bluetooth_hci_uart_readchar())==-1) {
@@ -96,7 +96,7 @@ STATIC int cywbt_hci_cmd_raw(size_t len, uint8_t *buf) {
9696
return0;
9797
}
9898

99-
STATICintcywbt_hci_cmd(intogf,intocf,size_tparam_len,constuint8_t*param_buf) {
99+
staticintcywbt_hci_cmd(intogf,intocf,size_tparam_len,constuint8_t*param_buf) {
100100
uint8_t*buf=mp_bluetooth_hci_cmd_buf;
101101
buf[0]=0x01;
102102
buf[1]=ocf;
@@ -108,27 +108,27 @@ STATIC int cywbt_hci_cmd(int ogf, int ocf, size_t param_len, const uint8_t *para
108108
returncywbt_hci_cmd_raw(4+param_len,buf);
109109
}
110110

111-
STATICvoidput_le16(uint8_t*buf,uint16_tval) {
111+
staticvoidput_le16(uint8_t*buf,uint16_tval) {
112112
buf[0]=val;
113113
buf[1]=val >>8;
114114
}
115115

116-
STATICvoidput_le32(uint8_t*buf,uint32_tval) {
116+
staticvoidput_le32(uint8_t*buf,uint32_tval) {
117117
buf[0]=val;
118118
buf[1]=val >>8;
119119
buf[2]=val >>16;
120120
buf[3]=val >>24;
121121
}
122122

123-
STATICintcywbt_set_baudrate(uint32_tbaudrate) {
123+
staticintcywbt_set_baudrate(uint32_tbaudrate) {
124124
uint8_tbuf[6];
125125
put_le16(buf,0);
126126
put_le32(buf+2,baudrate);
127127
returncywbt_hci_cmd(0x3f,0x18,6,buf);
128128
}
129129

130130
// download firmware
131-
STATICintcywbt_download_firmware(constuint8_t*firmware) {
131+
staticintcywbt_download_firmware(constuint8_t*firmware) {
132132
cywbt_hci_cmd(0x3f,0x2e,0,NULL);
133133

134134
boollast_packet= false;
@@ -255,7 +255,7 @@ int mp_bluetooth_hci_controller_deinit(void) {
255255
}
256256

257257
#ifdefCYW43_PIN_BT_DEV_WAKE
258-
STATICuint32_tbt_sleep_ticks;
258+
staticuint32_tbt_sleep_ticks;
259259
#endif
260260

261261
intmp_bluetooth_hci_controller_sleep_maybe(void) {

‎drivers/dht/dht.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#definemp_hal_pin_od_high_dht mp_hal_pin_od_high
4141
#endif
4242

43-
STATICmp_obj_tdht_readinto(mp_obj_tpin_in,mp_obj_tbuf_in) {
43+
staticmp_obj_tdht_readinto(mp_obj_tpin_in,mp_obj_tbuf_in) {
4444
mp_hal_pin_obj_tpin=mp_hal_get_pin_obj(pin_in);
4545
mp_hal_pin_open_drain(pin);
4646

‎drivers/esp-hosted/esp_hosted_hal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444

4545
externvoidmod_network_poll_events(void);
4646

47-
STATICmp_obj_tesp_hosted_pin_irq_callback(mp_obj_tself_in) {
47+
staticmp_obj_tesp_hosted_pin_irq_callback(mp_obj_tself_in) {
4848
#ifdefMICROPY_HW_WIFI_LED
4949
led_toggle(MICROPY_HW_WIFI_LED);
5050
#endif
5151
mod_network_poll_events();
5252
returnmp_const_none;
5353
}
54-
STATICMP_DEFINE_CONST_FUN_OBJ_1(esp_hosted_pin_irq_callback_obj,esp_hosted_pin_irq_callback);
54+
staticMP_DEFINE_CONST_FUN_OBJ_1(esp_hosted_pin_irq_callback_obj,esp_hosted_pin_irq_callback);
5555

5656
MP_WEAKintesp_hosted_hal_init(uint32_tmode) {
5757
// Perform a hard reset and set pins to their defaults.

‎drivers/memory/spiflash.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,21 @@
5656
#definePAGE_SIZE (256) // maximum bytes we can write in one SPI transfer
5757
#defineSECTOR_SIZE MP_SPIFLASH_ERASE_BLOCK_SIZE
5858

59-
STATICvoidmp_spiflash_acquire_bus(mp_spiflash_t*self) {
59+
staticvoidmp_spiflash_acquire_bus(mp_spiflash_t*self) {
6060
constmp_spiflash_config_t*c=self->config;
6161
if (c->bus_kind==MP_SPIFLASH_BUS_QSPI) {
6262
c->bus.u_qspi.proto->ioctl(c->bus.u_qspi.data,MP_QSPI_IOCTL_BUS_ACQUIRE);
6363
}
6464
}
6565

66-
STATICvoidmp_spiflash_release_bus(mp_spiflash_t*self) {
66+
staticvoidmp_spiflash_release_bus(mp_spiflash_t*self) {
6767
constmp_spiflash_config_t*c=self->config;
6868
if (c->bus_kind==MP_SPIFLASH_BUS_QSPI) {
6969
c->bus.u_qspi.proto->ioctl(c->bus.u_qspi.data,MP_QSPI_IOCTL_BUS_RELEASE);
7070
}
7171
}
7272

73-
STATICintmp_spiflash_write_cmd_data(mp_spiflash_t*self,uint8_tcmd,size_tlen,uint32_tdata) {
73+
staticintmp_spiflash_write_cmd_data(mp_spiflash_t*self,uint8_tcmd,size_tlen,uint32_tdata) {
7474
intret=0;
7575
constmp_spiflash_config_t*c=self->config;
7676
if (c->bus_kind==MP_SPIFLASH_BUS_SPI) {
@@ -84,7 +84,7 @@ STATIC int mp_spiflash_write_cmd_data(mp_spiflash_t *self, uint8_t cmd, size_t l
8484
returnret;
8585
}
8686

87-
STATICintmp_spiflash_transfer_cmd_addr_data(mp_spiflash_t*self,uint8_tcmd,uint32_taddr,size_tlen,constuint8_t*src,uint8_t*dest) {
87+
staticintmp_spiflash_transfer_cmd_addr_data(mp_spiflash_t*self,uint8_tcmd,uint32_taddr,size_tlen,constuint8_t*src,uint8_t*dest) {
8888
intret=0;
8989
constmp_spiflash_config_t*c=self->config;
9090
if (c->bus_kind==MP_SPIFLASH_BUS_SPI) {
@@ -109,7 +109,7 @@ STATIC int mp_spiflash_transfer_cmd_addr_data(mp_spiflash_t *self, uint8_t cmd,
109109
returnret;
110110
}
111111

112-
STATICintmp_spiflash_read_cmd(mp_spiflash_t*self,uint8_tcmd,size_tlen,uint32_t*dest) {
112+
staticintmp_spiflash_read_cmd(mp_spiflash_t*self,uint8_tcmd,size_tlen,uint32_t*dest) {
113113
constmp_spiflash_config_t*c=self->config;
114114
if (c->bus_kind==MP_SPIFLASH_BUS_SPI) {
115115
mp_hal_pin_write(c->bus.u_spi.cs,0);
@@ -122,7 +122,7 @@ STATIC int mp_spiflash_read_cmd(mp_spiflash_t *self, uint8_t cmd, size_t len, ui
122122
}
123123
}
124124

125-
STATICintmp_spiflash_read_data(mp_spiflash_t*self,uint32_taddr,size_tlen,uint8_t*dest) {
125+
staticintmp_spiflash_read_data(mp_spiflash_t*self,uint32_taddr,size_tlen,uint8_t*dest) {
126126
constmp_spiflash_config_t*c=self->config;
127127
uint8_tcmd;
128128
if (c->bus_kind==MP_SPIFLASH_BUS_SPI) {
@@ -133,11 +133,11 @@ STATIC int mp_spiflash_read_data(mp_spiflash_t *self, uint32_t addr, size_t len,
133133
returnmp_spiflash_transfer_cmd_addr_data(self,cmd,addr,len,NULL,dest);
134134
}
135135

136-
STATICintmp_spiflash_write_cmd(mp_spiflash_t*self,uint8_tcmd) {
136+
staticintmp_spiflash_write_cmd(mp_spiflash_t*self,uint8_tcmd) {
137137
returnmp_spiflash_write_cmd_data(self,cmd,0,0);
138138
}
139139

140-
STATICintmp_spiflash_wait_sr(mp_spiflash_t*self,uint8_tmask,uint8_tval,uint32_ttimeout) {
140+
staticintmp_spiflash_wait_sr(mp_spiflash_t*self,uint8_tmask,uint8_tval,uint32_ttimeout) {
141141
do {
142142
uint32_tsr;
143143
intret=mp_spiflash_read_cmd(self,CMD_RDSR,1,&sr);
@@ -152,11 +152,11 @@ STATIC int mp_spiflash_wait_sr(mp_spiflash_t *self, uint8_t mask, uint8_t val, u
152152
return-MP_ETIMEDOUT;
153153
}
154154

155-
STATICintmp_spiflash_wait_wel1(mp_spiflash_t*self) {
155+
staticintmp_spiflash_wait_wel1(mp_spiflash_t*self) {
156156
returnmp_spiflash_wait_sr(self,2,2,WAIT_SR_TIMEOUT);
157157
}
158158

159-
STATICintmp_spiflash_wait_wip0(mp_spiflash_t*self) {
159+
staticintmp_spiflash_wait_wip0(mp_spiflash_t*self) {
160160
returnmp_spiflash_wait_sr(self,1,0,WAIT_SR_TIMEOUT);
161161
}
162162

@@ -219,7 +219,7 @@ void mp_spiflash_deepsleep(mp_spiflash_t *self, int value) {
219219
}
220220
}
221221

222-
STATICintmp_spiflash_erase_block_internal(mp_spiflash_t*self,uint32_taddr) {
222+
staticintmp_spiflash_erase_block_internal(mp_spiflash_t*self,uint32_taddr) {
223223
intret=0;
224224
// enable writes
225225
ret=mp_spiflash_write_cmd(self,CMD_WREN);
@@ -244,7 +244,7 @@ STATIC int mp_spiflash_erase_block_internal(mp_spiflash_t *self, uint32_t addr)
244244
returnmp_spiflash_wait_wip0(self);
245245
}
246246

247-
STATICintmp_spiflash_write_page(mp_spiflash_t*self,uint32_taddr,size_tlen,constuint8_t*src) {
247+
staticintmp_spiflash_write_page(mp_spiflash_t*self,uint32_taddr,size_tlen,constuint8_t*src) {
248248
intret=0;
249249
// enable writes
250250
ret=mp_spiflash_write_cmd(self,CMD_WREN);
@@ -361,7 +361,7 @@ int mp_spiflash_cached_read(mp_spiflash_t *self, uint32_t addr, size_t len, uint
361361
returnret;
362362
}
363363

364-
STATICintmp_spiflash_cache_flush_internal(mp_spiflash_t*self) {
364+
staticintmp_spiflash_cache_flush_internal(mp_spiflash_t*self) {
365365
#ifUSE_WR_DELAY
366366
if (!(self->flags&1)) {
367367
return0;
@@ -396,7 +396,7 @@ int mp_spiflash_cache_flush(mp_spiflash_t *self) {
396396
returnret;
397397
}
398398

399-
STATICintmp_spiflash_cached_write_part(mp_spiflash_t*self,uint32_taddr,size_tlen,constuint8_t*src) {
399+
staticintmp_spiflash_cached_write_part(mp_spiflash_t*self,uint32_taddr,size_tlen,constuint8_t*src) {
400400
// Align to 4096 sector
401401
uint32_toffset=addr&0xfff;
402402
uint32_tsec=addr >>12;

‎examples/natmod/btree/btree_c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ mp_getiter_iternext_custom_t btree_getiter_iternext;
100100
#include"extmod/modbtree.c"
101101

102102
mp_map_elem_tbtree_locals_dict_table[8];
103-
STATICMP_DEFINE_CONST_DICT(btree_locals_dict,btree_locals_dict_table);
103+
staticMP_DEFINE_CONST_DICT(btree_locals_dict,btree_locals_dict_table);
104104

105-
STATICmp_obj_tbtree_open(size_tn_args,constmp_obj_t*args) {
105+
staticmp_obj_tbtree_open(size_tn_args,constmp_obj_t*args) {
106106
// Make sure we got a stream object
107107
mp_get_stream_raise(args[0],MP_STREAM_OP_READ |MP_STREAM_OP_WRITE |MP_STREAM_OP_IOCTL);
108108

@@ -118,7 +118,7 @@ STATIC mp_obj_t btree_open(size_t n_args, const mp_obj_t *args) {
118118

119119
returnMP_OBJ_FROM_PTR(btree_new(db,args[0]));
120120
}
121-
STATICMP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(btree_open_obj,5,5,btree_open);
121+
staticMP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(btree_open_obj,5,5,btree_open);
122122

123123
mp_obj_tmpy_init(mp_obj_fun_bc_t*self,size_tn_args,size_tn_kw,mp_obj_t*args) {
124124
MP_DYNRUNTIME_INIT_ENTRY

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp