save about 112 bytes
This commit is contained in:
parent
fc549fe345
commit
86a0f9a861
@ -60,6 +60,11 @@ msgstr ""
|
||||
msgid "%%c requires int or char"
|
||||
msgstr ""
|
||||
|
||||
#: main.c
|
||||
#, c-format
|
||||
msgid "%02X"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/rgbmatrix/RGBMatrix.c
|
||||
#, c-format
|
||||
msgid ""
|
||||
@ -2077,6 +2082,10 @@ msgstr ""
|
||||
msgid "UART write"
|
||||
msgstr ""
|
||||
|
||||
#: main.c
|
||||
msgid "UID:"
|
||||
msgstr ""
|
||||
|
||||
#: shared-module/usb_hid/Device.c
|
||||
msgid "USB busy"
|
||||
msgstr ""
|
||||
|
6
main.c
6
main.c
@ -779,9 +779,9 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
|
||||
#if CIRCUITPY_MICROCONTROLLER && COMMON_HAL_MCU_PROCESSOR_UID_LENGTH > 0
|
||||
uint8_t raw_id[COMMON_HAL_MCU_PROCESSOR_UID_LENGTH];
|
||||
common_hal_mcu_processor_get_uid(raw_id);
|
||||
mp_printf(&mp_plat_print, "UID:");
|
||||
for (uint8_t i = 0; i < COMMON_HAL_MCU_PROCESSOR_UID_LENGTH; i++) {
|
||||
mp_printf(&mp_plat_print, "%02X", raw_id[i]);
|
||||
mp_cprintf(&mp_plat_print, translate("UID:"));
|
||||
for (size_t i = 0; i < COMMON_HAL_MCU_PROCESSOR_UID_LENGTH; i++) {
|
||||
mp_cprintf(&mp_plat_print, translate("%02X"), raw_id[i]);
|
||||
}
|
||||
mp_printf(&mp_plat_print, "\n");
|
||||
port_boot_info();
|
||||
|
@ -125,8 +125,6 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
// exact cutoff, but no frequency well under 100kHz is available)
|
||||
if ((frequency < 95000) ||
|
||||
(i2c_m_sync_set_baudrate(&self->i2c_desc, 0, frequency / 1000) != ERR_NONE)) {
|
||||
reset_pin_number(sda->number);
|
||||
reset_pin_number(scl->number);
|
||||
common_hal_busio_i2c_deinit(self);
|
||||
mp_arg_error_invalid(MP_QSTR_frequency);
|
||||
}
|
||||
|
@ -759,7 +759,6 @@ STATIC const mp_rom_map_elem_t mp_module_builtins_globals_table[] = {
|
||||
{ MP_ROM_QSTR(MP_QSTR_KeyError), MP_ROM_PTR(&mp_type_KeyError) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LookupError), MP_ROM_PTR(&mp_type_LookupError) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MemoryError), MP_ROM_PTR(&mp_type_MemoryError) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_MpyError), MP_ROM_PTR(&mp_type_MpyError) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NameError), MP_ROM_PTR(&mp_type_NameError) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_NotImplementedError), MP_ROM_PTR(&mp_type_NotImplementedError) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_OSError), MP_ROM_PTR(&mp_type_OSError) },
|
||||
|
1
py/obj.h
1
py/obj.h
@ -742,7 +742,6 @@ extern const mp_obj_type_t mp_type_ReloadException;
|
||||
extern const mp_obj_type_t mp_type_KeyError;
|
||||
extern const mp_obj_type_t mp_type_LookupError;
|
||||
extern const mp_obj_type_t mp_type_MemoryError;
|
||||
extern const mp_obj_type_t mp_type_MpyError;
|
||||
extern const mp_obj_type_t mp_type_NameError;
|
||||
extern const mp_obj_type_t mp_type_NotImplementedError;
|
||||
extern const mp_obj_type_t mp_type_OSError;
|
||||
|
@ -347,7 +347,6 @@ MP_DEFINE_EXCEPTION(UnicodeError, ValueError)
|
||||
#if CIRCUITPY_ALARM
|
||||
MP_DEFINE_EXCEPTION(DeepSleepRequest, BaseException)
|
||||
#endif
|
||||
MP_DEFINE_EXCEPTION(MpyError, ValueError)
|
||||
/*
|
||||
MP_DEFINE_EXCEPTION(Warning, Exception)
|
||||
MP_DEFINE_EXCEPTION(DeprecationWarning, Warning)
|
||||
|
@ -582,7 +582,7 @@ mp_raw_code_t *mp_raw_code_load(mp_reader_t *reader) {
|
||||
|| MPY_FEATURE_DECODE_FLAGS(header[2]) != MPY_FEATURE_FLAGS
|
||||
|| header[3] > mp_small_int_bits()
|
||||
|| read_uint(reader, NULL) > QSTR_WINDOW_SIZE) {
|
||||
mp_raise_MpyError(MP_ERROR_TEXT("Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info."));
|
||||
mp_raise_ValueError(MP_ERROR_TEXT("Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/mpy-update for more info."));
|
||||
}
|
||||
if (MPY_FEATURE_DECODE_ARCH(header[2]) != MP_NATIVE_ARCH_NONE) {
|
||||
byte arch = MPY_FEATURE_DECODE_ARCH(header[2]);
|
||||
|
@ -1742,10 +1742,6 @@ NORETURN void mp_raise_OverflowError_varg(const compressed_string_t *fmt, ...) {
|
||||
va_end(argptr);
|
||||
}
|
||||
|
||||
NORETURN void mp_raise_MpyError(const compressed_string_t *msg) {
|
||||
mp_raise_msg(&mp_type_MpyError, msg);
|
||||
}
|
||||
|
||||
NORETURN void mp_raise_type_arg(const mp_obj_type_t *exc_type, mp_obj_t arg) {
|
||||
nlr_raise(mp_obj_new_exception_arg1(exc_type, arg));
|
||||
}
|
||||
|
@ -225,7 +225,6 @@ NORETURN void mp_raise_BrokenPipeError(void);
|
||||
NORETURN void mp_raise_NotImplementedError(const compressed_string_t *msg);
|
||||
NORETURN void mp_raise_NotImplementedError_varg(const compressed_string_t *fmt, ...);
|
||||
NORETURN void mp_raise_OverflowError_varg(const compressed_string_t *fmt, ...);
|
||||
NORETURN void mp_raise_MpyError(const compressed_string_t *msg);
|
||||
NORETURN void mp_raise_recursion_depth(void);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user