Skip to content

Commit acef93a

Browse files
committed
Rename eveL to _eve, EVEL to _EVE
1 parent a9b34f4 commit acef93a

File tree

7 files changed

+59
-59
lines changed

7 files changed

+59
-59
lines changed

ports/atmel-samd/boards/metro_m4_express/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ EXTERNAL_FLASH_DEVICE_COUNT = 3
1111
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
1212
LONGINT_IMPL = MPZ
1313

14-
CIRCUITPY_EVEL = 1
14+
CIRCUITPY__EVE = 1

ports/nrf/boards/metro_nrf52840_express/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ QSPI_FLASH_FILESYSTEM = 1
99
EXTERNAL_FLASH_DEVICE_COUNT = 1
1010
EXTERNAL_FLASH_DEVICES = "GD25Q16C"
1111

12-
CIRCUITPY_EVEL = 1
12+
CIRCUITPY__EVE = 1

py/circuitpy_defns.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ endif
157157
ifeq ($(CIRCUITPY_MATH),1)
158158
SRC_PATTERNS += math/%
159159
endif
160-
ifeq ($(CIRCUITPY_EVEL),1)
161-
SRC_PATTERNS += eveL/%
160+
ifeq ($(CIRCUITPY__EVE),1)
161+
SRC_PATTERNS += _eve/%
162162
endif
163163
ifeq ($(CIRCUITPY_MICROCONTROLLER),1)
164164
SRC_PATTERNS += microcontroller/%
@@ -301,7 +301,7 @@ $(filter $(SRC_PATTERNS), \
301301
fontio/Glyph.c \
302302
microcontroller/RunMode.c \
303303
math/__init__.c \
304-
eveL/__init__.c \
304+
_eve/__init__.c \
305305
)
306306

307307
SRC_BINDINGS_ENUMS += \

py/circuitpy_mpconfig.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,11 @@ extern const struct _mp_obj_module_t math_module;
384384
#define MATH_MODULE
385385
#endif
386386

387-
#if CIRCUITPY_EVEL
388-
extern const struct _mp_obj_module_t eveL_module;
389-
#define EVEL_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_eveL), (mp_obj_t)&eveL_module },
387+
#if CIRCUITPY__EVE
388+
extern const struct _mp_obj_module_t _eve_module;
389+
#define _EVE_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__eve), (mp_obj_t)&_eve_module },
390390
#else
391-
#define EVEL_MODULE
391+
#define _EVE_MODULE
392392
#endif
393393

394394
#if CIRCUITPY_MICROCONTROLLER
@@ -624,7 +624,7 @@ extern const struct _mp_obj_module_t ustack_module;
624624
I2CSLAVE_MODULE \
625625
JSON_MODULE \
626626
MATH_MODULE \
627-
EVEL_MODULE \
627+
_EVE_MODULE \
628628
MICROCONTROLLER_MODULE \
629629
NEOPIXEL_WRITE_MODULE \
630630
NETWORK_MODULE \

py/circuitpy_mpconfig.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ CIRCUITPY_MATH = $(CIRCUITPY_ALWAYS_BUILD)
174174
endif
175175
CFLAGS += -DCIRCUITPY_MATH=$(CIRCUITPY_MATH)
176176

177-
ifndef CIRCUITPY_EVEL
178-
CIRCUITPY_EVEL = 0
177+
ifndef CIRCUITPY__EVE
178+
CIRCUITPY__EVE = 0
179179
endif
180-
CFLAGS += -DCIRCUITPY_EVEL=$(CIRCUITPY_EVEL)
180+
CFLAGS += -DCIRCUITPY__EVE=$(CIRCUITPY__EVE)
181181

182182
ifndef CIRCUITPY_MICROCONTROLLER
183183
CIRCUITPY_MICROCONTROLLER = $(CIRCUITPY_DEFAULT_BUILD)

shared-bindings/eveL/__init__.c renamed to shared-bindings/_eve/__init__.c

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -31,72 +31,72 @@
3131
#include "py/runtime.h"
3232
#include "py/binary.h"
3333

34-
//| :mod:`eveL` --- low-level BridgeTek EVE bindings
34+
//| :mod:`_eve` --- low-level BridgeTek EVE bindings
3535
//| ================================================
3636
//|
37-
//| .. module:: eveL
37+
//| .. module:: _eve
3838
//| :synopsis: low-level BridgeTek EVE bindings
3939
//| :platform: SAMD21/SAMD51
4040
//|
41-
//| The `eveL` module provides a class EVEL which
41+
//| The `_eve` module provides a class _EVE which
4242
//| contains methods for constructing EVE command
4343
//| buffers and appending basic graphics commands.
4444
//|
4545

46-
typedef struct _mp_obj_EVEL_t {
46+
typedef struct _mp_obj__EVE_t {
4747
mp_obj_base_t base;
4848
mp_obj_t dest[3];
4949
size_t n;
5050
uint8_t buf[512];
51-
} mp_obj_EVEL_t;
51+
} mp_obj__EVE_t;
5252

53-
STATIC const mp_obj_type_t EVEL_type;
53+
STATIC const mp_obj_type_t _EVE_type;
5454

55-
STATIC void _write(mp_obj_EVEL_t *EVEL, mp_obj_t b) {
56-
EVEL->dest[2] = b;
57-
mp_call_method_n_kw(1, 0, EVEL->dest);
55+
STATIC void _write(mp_obj__EVE_t *_EVE, mp_obj_t b) {
56+
_EVE->dest[2] = b;
57+
mp_call_method_n_kw(1, 0, _EVE->dest);
5858
}
5959

6060
STATIC mp_obj_t _register(mp_obj_t self, mp_obj_t o) {
61-
mp_obj_EVEL_t *EVEL = mp_instance_cast_to_native_base(self, &EVEL_type);
62-
EVEL->n = 0;
63-
mp_load_method(o, MP_QSTR_write, EVEL->dest);
61+
mp_obj__EVE_t *_EVE = mp_instance_cast_to_native_base(self, &_EVE_type);
62+
_EVE->n = 0;
63+
mp_load_method(o, MP_QSTR_write, _EVE->dest);
6464
return mp_const_none;
6565
}
6666
STATIC MP_DEFINE_CONST_FUN_OBJ_2(register_obj, _register);
6767

6868
STATIC mp_obj_t _flush(mp_obj_t self) {
69-
mp_obj_EVEL_t *EVEL = mp_instance_cast_to_native_base(self, &EVEL_type);
70-
if (EVEL->n != 0) {
71-
_write(EVEL, mp_obj_new_bytearray_by_ref(EVEL->n, EVEL->buf));
72-
EVEL->n = 0;
69+
mp_obj__EVE_t *_EVE = mp_instance_cast_to_native_base(self, &_EVE_type);
70+
if (_EVE->n != 0) {
71+
_write(_EVE, mp_obj_new_bytearray_by_ref(_EVE->n, _EVE->buf));
72+
_EVE->n = 0;
7373
}
7474
return mp_const_none;
7575
}
7676
STATIC MP_DEFINE_CONST_FUN_OBJ_1(flush_obj, _flush);
7777

7878
STATIC void *append(mp_obj_t self, size_t m) {
79-
mp_obj_EVEL_t *EVEL = mp_instance_cast_to_native_base(self, &EVEL_type);
80-
if ((EVEL->n + m) > sizeof(EVEL->buf))
81-
_flush((mp_obj_t)EVEL);
82-
uint8_t *r = EVEL->buf + EVEL->n;
83-
EVEL->n += m;
79+
mp_obj__EVE_t *_EVE = mp_instance_cast_to_native_base(self, &_EVE_type);
80+
if ((_EVE->n + m) > sizeof(_EVE->buf))
81+
_flush((mp_obj_t)_EVE);
82+
uint8_t *r = _EVE->buf + _EVE->n;
83+
_EVE->n += m;
8484
return (void*)r;
8585
}
8686

8787
STATIC mp_obj_t _cc(mp_obj_t self, mp_obj_t b) {
88-
mp_obj_EVEL_t *EVEL = mp_instance_cast_to_native_base(self, &EVEL_type);
88+
mp_obj__EVE_t *_EVE = mp_instance_cast_to_native_base(self, &_EVE_type);
8989
mp_buffer_info_t buffer_info;
9090
mp_get_buffer_raise(b, &buffer_info, MP_BUFFER_READ);
91-
if (buffer_info.len <= sizeof(EVEL->buf)) {
92-
uint8_t *p = (uint8_t*)append(EVEL, buffer_info.len);
91+
if (buffer_info.len <= sizeof(_EVE->buf)) {
92+
uint8_t *p = (uint8_t*)append(_EVE, buffer_info.len);
9393
// memcpy(p, buffer_info.buf, buffer_info.len);
9494
uint8_t *s = buffer_info.buf;
9595
for (size_t i = 0; i < buffer_info.len; i++)
9696
*p++ = *s++;
9797
} else {
9898
_flush(self);
99-
_write(EVEL, b);
99+
_write(_EVE, b);
100100
}
101101

102102
return mp_const_none;
@@ -105,7 +105,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(cc_obj, _cc);
105105

106106
#define C4(self, u) (*(uint32_t*)append((self), sizeof(uint32_t)) = (u))
107107

108-
#include "modeveL-gen.h"
108+
#include "mod_eve-gen.h"
109109

110110
// Hand-written functions {
111111

@@ -175,7 +175,7 @@ STATIC mp_obj_t _cmd(size_t n_args, const mp_obj_t *args) {
175175
}
176176
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(cmd_obj, 4, 4, _cmd);
177177

178-
STATIC const mp_rom_map_elem_t EVEL_locals_dict_table[] = {
178+
STATIC const mp_rom_map_elem_t _EVE_locals_dict_table[] = {
179179
{ MP_ROM_QSTR(MP_QSTR_register), MP_ROM_PTR(&register_obj) },
180180
{ MP_ROM_QSTR(MP_QSTR_cc), MP_ROM_PTR(&cc_obj) },
181181
{ MP_ROM_QSTR(MP_QSTR_flush), MP_ROM_PTR(&flush_obj) },
@@ -184,40 +184,40 @@ STATIC const mp_rom_map_elem_t EVEL_locals_dict_table[] = {
184184
{ MP_ROM_QSTR(MP_QSTR_cmd0), MP_ROM_PTR(&cmd0_obj) },
185185
ROM_DECLS
186186
};
187-
STATIC MP_DEFINE_CONST_DICT(EVEL_locals_dict, EVEL_locals_dict_table);
187+
STATIC MP_DEFINE_CONST_DICT(_EVE_locals_dict, _EVE_locals_dict_table);
188188

189-
STATIC void EVEL_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
189+
STATIC void _EVE_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
190190
(void)self_in;
191191
(void)kind;
192-
mp_printf(print, "<EVEL>");
192+
mp_printf(print, "<_EVE>");
193193
}
194194

195-
STATIC mp_obj_t EVEL_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
195+
STATIC mp_obj_t _EVE_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
196196
// mp_arg_check_num(n_args, kw_args, 1, 1, false);
197-
mp_obj_EVEL_t *o = m_new_obj(mp_obj_EVEL_t);
198-
mp_printf(&mp_plat_print, "EVEL %p make_new\n", o);
199-
o->base.type = &EVEL_type;
197+
mp_obj__EVE_t *o = m_new_obj(mp_obj__EVE_t);
198+
mp_printf(&mp_plat_print, "_EVE %p make_new\n", o);
199+
o->base.type = &_EVE_type;
200200
return MP_OBJ_FROM_PTR(o);
201201
}
202202

203-
STATIC const mp_obj_type_t EVEL_type = {
203+
STATIC const mp_obj_type_t _EVE_type = {
204204
{ &mp_type_type },
205205
// Save on qstr's, reuse same as for module
206-
.name = MP_QSTR_EVEL,
207-
.print = EVEL_print,
208-
.make_new = EVEL_make_new,
209-
// .attr = EVEL_attr,
210-
.locals_dict = (void*)&EVEL_locals_dict,
206+
.name = MP_QSTR__EVE,
207+
.print = _EVE_print,
208+
.make_new = _EVE_make_new,
209+
// .attr = _EVE_attr,
210+
.locals_dict = (void*)&_EVE_locals_dict,
211211
};
212212

213-
STATIC const mp_rom_map_elem_t mp_module_eveL_globals_table[] = {
214-
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_eveL) },
215-
{ MP_ROM_QSTR(MP_QSTR_EVEL), MP_OBJ_FROM_PTR(&EVEL_type) },
213+
STATIC const mp_rom_map_elem_t mp_module__eve_globals_table[] = {
214+
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__eve) },
215+
{ MP_ROM_QSTR(MP_QSTR__EVE), MP_OBJ_FROM_PTR(&_EVE_type) },
216216
};
217217

218-
STATIC MP_DEFINE_CONST_DICT(mp_module_eveL_globals, mp_module_eveL_globals_table);
218+
STATIC MP_DEFINE_CONST_DICT(mp_module__eve_globals, mp_module__eve_globals_table);
219219

220-
const mp_obj_module_t eveL_module = {
220+
const mp_obj_module_t _eve_module = {
221221
.base = { &mp_type_module },
222-
.globals = (mp_obj_dict_t*)&mp_module_eveL_globals,
222+
.globals = (mp_obj_dict_t*)&mp_module__eve_globals,
223223
};

0 commit comments

Comments
 (0)