Home
last modified time | relevance | path

Searched refs:MP_ERROR_TEXT (Results 26 – 50 of 214) sorted by relevance

123456789

/dports/lang/micropython/micropython-1.17/ports/teensy/
H A Dtimer.c257 mp_raise_ValueError(MP_ERROR_TEXT("can't have 0 frequency")); in pyb_timer_init_helper()
279 mp_raise_TypeError(MP_ERROR_TEXT("must specify either freq, or prescaler and period")); in pyb_timer_init_helper()
284 …mp_raise_msg_varg(&mp_type_TypeError, MP_ERROR_TEXT("invalid counter mode: %d"), init->CounterMode… in pyb_timer_init_helper()
335 … mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Timer %d does not exist"), tim->tim_id); in pyb_timer_make_new()
457 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Invalid channel (%d)"), channel); in pyb_timer_channel()
510 mp_raise_ValueError(MP_ERROR_TEXT("pin argument needs to be be a Pin type")); in pyb_timer_channel()
572 …mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Invalid polarity (%d)"), oc_config.OCPolarit… in pyb_timer_channel()
592 …mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Invalid polarity (%d)"), ic_config.ICPolarit… in pyb_timer_channel()
604 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Invalid mode (%d)"), chan->mode); in pyb_timer_channel()
680 mp_raise_ValueError(MP_ERROR_TEXT("callback must be None or a callable object")); in pyb_timer_callback()
[all …]
/dports/lang/micropython/micropython-1.17/ports/rp2/
H A Dmachine_uart.c193 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("UART(%d) doesn't exist"), uart_id); in machine_uart_make_new()
229 mp_raise_ValueError(MP_ERROR_TEXT("bad TX pin")); in machine_uart_make_new()
236 mp_raise_ValueError(MP_ERROR_TEXT("bad RX pin")); in machine_uart_make_new()
245 mp_raise_ValueError(MP_ERROR_TEXT("bad CTS pin")); in machine_uart_make_new()
252 mp_raise_ValueError(MP_ERROR_TEXT("bad RTS pin")); in machine_uart_make_new()
270 mp_raise_ValueError(MP_ERROR_TEXT("bad inversion mask")); in machine_uart_make_new()
278 mp_raise_ValueError(MP_ERROR_TEXT("bad hardware flow control mask")); in machine_uart_make_new()
292 mp_raise_ValueError(MP_ERROR_TEXT("rxbuf too large")); in machine_uart_make_new()
303 mp_raise_ValueError(MP_ERROR_TEXT("txbuf too large")); in machine_uart_make_new()
H A Dmachine_spi.c116 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("SPI(%d) doesn't exist"), spi_id); in machine_spi_make_new()
126 mp_raise_ValueError(MP_ERROR_TEXT("bad SCK pin")); in machine_spi_make_new()
133 mp_raise_ValueError(MP_ERROR_TEXT("bad MOSI pin")); in machine_spi_make_new()
140 mp_raise_ValueError(MP_ERROR_TEXT("bad MISO pin")); in machine_spi_make_new()
153 mp_raise_NotImplementedError(MP_ERROR_TEXT("LSB")); in machine_spi_make_new()
204 mp_raise_NotImplementedError(MP_ERROR_TEXT("LSB")); in machine_spi_init()
H A Dmachine_i2c.c87 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("I2C(%d) doesn't exist"), i2c_id); in machine_i2c_make_new()
97 mp_raise_ValueError(MP_ERROR_TEXT("bad SCL pin")); in machine_i2c_make_new()
104 mp_raise_ValueError(MP_ERROR_TEXT("bad SDA pin")); in machine_i2c_make_new()
/dports/lang/micropython/micropython-1.17/ports/stm32/
H A Dmachine_uart.c208 mp_raise_ValueError(MP_ERROR_TEXT("unsupported combination of bits and parity")); in pyb_uart_init_helper()
230 … mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("UART(%d) doesn't exist"), self->uart_id); in pyb_uart_init_helper()
251 mp_raise_ValueError(MP_ERROR_TEXT("UART is static and rxbuf can't be changed")); in pyb_uart_init_helper()
283 …mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("set baudrate %d is not within 5%% of desired… in pyb_uart_init_helper()
362 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("UART(%s) doesn't exist"), port); in pyb_uart_make_new()
367 … mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("UART(%d) doesn't exist"), uart_id); in pyb_uart_make_new()
373 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("UART(%d) is reserved"), uart_id); in pyb_uart_make_new()
486 mp_raise_ValueError(MP_ERROR_TEXT("handler must be None or callable")); in pyb_uart_irq()
493 …mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("trigger 0x%08x unsupported"), not_supported); in pyb_uart_irq()
H A Dmachine_i2s.c718 mp_raise_ValueError(MP_ERROR_TEXT("SCK not a Pin type")); in machine_i2s_init_helper()
725 mp_raise_ValueError(MP_ERROR_TEXT("invalid WS pin")); in machine_i2s_init_helper()
728 mp_raise_ValueError(MP_ERROR_TEXT("WS not a Pin type")); in machine_i2s_init_helper()
738 mp_raise_ValueError(MP_ERROR_TEXT("SD not a Pin type")); in machine_i2s_init_helper()
745 mp_raise_ValueError(MP_ERROR_TEXT("invalid mode")); in machine_i2s_init_helper()
752 mp_raise_ValueError(MP_ERROR_TEXT("invalid bits")); in machine_i2s_init_helper()
759 mp_raise_ValueError(MP_ERROR_TEXT("invalid format")); in machine_i2s_init_helper()
772 mp_raise_ValueError(MP_ERROR_TEXT("invalid ibuf")); in machine_i2s_init_helper()
855 mp_raise_ValueError(MP_ERROR_TEXT("invalid id")); in machine_i2s_make_new()
914 mp_raise_ValueError(MP_ERROR_TEXT("invalid callback")); in machine_i2s_irq()
[all …]
H A Dtimer.c299 mp_raise_ValueError(MP_ERROR_TEXT("must have positive freq")); in compute_prescaler_period_from_freq()
326 mp_raise_ValueError(MP_ERROR_TEXT("must have positive freq")); in compute_prescaler_period_from_t()
348 mp_raise_ValueError(MP_ERROR_TEXT("period too large")); in compute_prescaler_period_from_t()
494 mp_raise_ValueError(MP_ERROR_TEXT("need a Timer object")); in pyb_timer_get_handle()
896 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Timer(%d) doesn't exist"), tim_id); in pyb_timer_make_new()
901 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("Timer(%d) is reserved"), tim_id); in pyb_timer_make_new()
1050 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("invalid channel (%d)"), channel); in pyb_timer_channel()
1103 mp_raise_ValueError(MP_ERROR_TEXT("pin argument needs to be be a Pin type")); in pyb_timer_channel()
1287 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("invalid mode (%d)"), chan->mode); in pyb_timer_channel()
1402 mp_raise_ValueError(MP_ERROR_TEXT("callback must be None or a callable object")); in pyb_timer_callback()
[all …]
H A Dextint.c210 …mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("ExtInt vector %d < 16, use a Pin object"), v… in extint_register()
213 …mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("ExtInt vector %d >= max of %d"), v_line, EXT… in extint_register()
225 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("invalid ExtInt Mode: %d"), mode); in extint_register()
230 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("invalid ExtInt Pull: %d"), pull); in extint_register()
235 …mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("ExtInt vector %d is already in use"), v_line… in extint_register()
282 … mp_raise_msg_varg(&mp_type_OSError, MP_ERROR_TEXT("ExtInt vector %d is already in use"), line); in extint_register_pin()
286 MP_ERROR_TEXT("IRQ resource already taken by Pin('%q')"), other_pin->name); in extint_register_pin()
/dports/lang/micropython/micropython-1.17/py/
H A Dbuiltinimport.c231 mp_raise_msg(&mp_type_ImportError, MP_ERROR_TEXT("script compilation not supported")); in do_load()
316 mp_raise_msg(&mp_type_ImportError, MP_ERROR_TEXT("can't perform relative import")); in mp_builtin___import__()
400 mp_raise_msg(&mp_type_ImportError, MP_ERROR_TEXT("module not found")); in mp_builtin___import__()
402 … mp_raise_msg_varg(&mp_type_ImportError, MP_ERROR_TEXT("no module named '%q'"), mod_name); in mp_builtin___import__()
481 mp_raise_NotImplementedError(MP_ERROR_TEXT("relative import")); in mp_builtin___import__()
503 mp_raise_msg(&mp_type_ImportError, MP_ERROR_TEXT("module not found")); in mp_builtin___import__()
505 … mp_raise_msg_varg(&mp_type_ImportError, MP_ERROR_TEXT("no module named '%q'"), module_name_qstr); in mp_builtin___import__()
H A Dcompile.c597 compile_syntax_error(comp, pn, MP_ERROR_TEXT("can't assign to expression")); in c_assign()
862 compile_syntax_error(comp, name_nodes[1], MP_ERROR_TEXT("invalid arch")); in compile_built_in_decorator()
866 compile_syntax_error(comp, name_nodes[1], MP_ERROR_TEXT("invalid arch")); in compile_built_in_decorator()
1254 compile_syntax_error(comp, pn, MP_ERROR_TEXT("identifier redefined as global")); in compile_declare_global()
1271 compile_syntax_error(comp, pn, MP_ERROR_TEXT("no binding for nonlocal found")); in compile_declare_nonlocal()
1274 compile_syntax_error(comp, pn, MP_ERROR_TEXT("identifier redefined as nonlocal")); in compile_declare_nonlocal()
1978 MP_ERROR_TEXT("async for/with outside async function")); in compile_async_stmt()
2315 MP_ERROR_TEXT("super() can't find self")); // really a TypeError in compile_atom_expr_normal()
2892 compile_syntax_error(comp, pn, MP_ERROR_TEXT("invalid syntax")); in compile_scope_func_lambda_param()
2924 compile_syntax_error(comp, pn, MP_ERROR_TEXT("invalid syntax")); in compile_scope_func_lambda_param()
[all …]
H A Dobjgenerator.c163 mp_raise_ValueError(MP_ERROR_TEXT("generator already executing")); in mp_obj_gen_resume()
176 … mp_raise_TypeError(MP_ERROR_TEXT("can't send non-None value to a just-started generator")); in mp_obj_gen_resume()
232 …*ret_val = mp_obj_new_exception_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("generator raised StopIte… in mp_obj_gen_resume()
300 mp_raise_msg(&mp_type_RuntimeError, MP_ERROR_TEXT("generator ignored GeneratorExit")); in gen_instance_close()
321 mp_raise_ValueError(MP_ERROR_TEXT("generator already executing")); in gen_instance_pend_throw()
H A Dobjint_mpz.c239 mp_raise_msg(&mp_type_ZeroDivisionError, MP_ERROR_TEXT("divide by zero")); in mp_obj_int_binary_op()
278 mp_raise_ValueError(MP_ERROR_TEXT("negative shift count")); in mp_obj_int_binary_op()
294 mp_raise_ValueError(MP_ERROR_TEXT("negative power with no float support")); in mp_obj_int_binary_op()
347 mp_raise_TypeError(MP_ERROR_TEXT("pow() with 3 arguments requires integers")); in mp_obj_int_pow3()
428 …mp_raise_msg(&mp_type_OverflowError, MP_ERROR_TEXT("overflow converting long int to machine word")… in mp_obj_int_get_checked()
446 …mp_raise_msg(&mp_type_OverflowError, MP_ERROR_TEXT("overflow converting long int to machine word")… in mp_obj_int_get_uint_checked()
H A Dmodstruct.c144 mp_raise_ValueError(MP_ERROR_TEXT("buffer too small")); in struct_unpack_from()
153 mp_raise_ValueError(MP_ERROR_TEXT("buffer too small")); in struct_unpack_from()
235 mp_raise_ValueError(MP_ERROR_TEXT("buffer too small")); in struct_pack_into()
245 mp_raise_ValueError(MP_ERROR_TEXT("buffer too small")); in struct_pack_into()
H A Dobjtype.c352 mp_raise_TypeError(MP_ERROR_TEXT("__init__() should return None")); in mp_obj_instance_make_new()
627 mp_raise_msg(&mp_type_AttributeError, MP_ERROR_TEXT("unreadable attribute")); in mp_obj_instance_load_attr()
864 mp_raise_TypeError(MP_ERROR_TEXT("object not callable")); in mp_obj_instance_call()
867 MP_ERROR_TEXT("'%s' object isn't callable"), mp_obj_get_type_str(self_in)); in mp_obj_instance_call()
978 mp_raise_TypeError(MP_ERROR_TEXT("type takes 1 or 3 arguments")); in type_make_new()
989 mp_raise_TypeError(MP_ERROR_TEXT("can't create instance")); in type_call()
1129 mp_raise_TypeError(MP_ERROR_TEXT("type isn't an acceptable base type")); in mp_obj_new_type()
1132 MP_ERROR_TEXT("type '%q' isn't an acceptable base type"), t->name); in mp_obj_new_type()
1169 mp_raise_NotImplementedError(MP_ERROR_TEXT("multiple inheritance not supported")); in mp_obj_new_type()
1196 mp_raise_TypeError(MP_ERROR_TEXT("multiple bases have instance lay-out conflict")); in mp_obj_new_type()
[all …]
/dports/lang/micropython/micropython-1.17/ports/nrf/modules/machine/
H A Dtimer.c80 mp_raise_ValueError(MP_ERROR_TEXT("Timer doesn't exist")); in timer_find()
117 mp_raise_ValueError(MP_ERROR_TEXT("Timer reserved by Bluetooth LE stack")); in machine_timer_make_new()
123 mp_raise_ValueError(MP_ERROR_TEXT("Timer reserved by ticker driver")); in machine_timer_make_new()
134 mp_raise_ValueError(MP_ERROR_TEXT("callback must be a function")); in machine_timer_make_new()
/dports/lang/micropython/micropython-1.17/ports/esp32/
H A Desp32_rmt.c77 mp_raise_ValueError(MP_ERROR_TEXT("clock_div must be between 1 and 255")); in esp32_rmt_make_new()
102 mp_raise_ValueError(MP_ERROR_TEXT("tx_carrier frequency must be >0")); in esp32_rmt_make_new()
105 mp_raise_ValueError(MP_ERROR_TEXT("tx_carrier duty must be 0..100")); in esp32_rmt_make_new()
229 mp_raise_ValueError(MP_ERROR_TEXT("duration and data must have same length")); in esp32_rmt_write_pulses()
235 mp_raise_ValueError(MP_ERROR_TEXT("No pulses")); in esp32_rmt_write_pulses()
238 mp_raise_ValueError(MP_ERROR_TEXT("Too many pulses for loop")); in esp32_rmt_write_pulses()
H A Dmodesp32.c57 mp_raise_ValueError(MP_ERROR_TEXT("no resources")); in esp32_wake_on_touch()
69 mp_raise_ValueError(MP_ERROR_TEXT("no resources")); in esp32_wake_on_ext0()
85 mp_raise_ValueError(MP_ERROR_TEXT("invalid pin")); in esp32_wake_on_ext0()
120 mp_raise_ValueError(MP_ERROR_TEXT("invalid pin")); in esp32_wake_on_ext1()
H A Dmachine_pin.c229 mp_raise_ValueError(MP_ERROR_TEXT("expecting a pin")); in machine_pin_get_id()
281 mp_raise_ValueError(MP_ERROR_TEXT("pin can only be input")); in machine_pin_obj_init_helper()
324 mp_raise_ValueError(MP_ERROR_TEXT("invalid pin")); in mp_pin_make_new()
401 mp_raise_ValueError(MP_ERROR_TEXT("bad wake value")); in machine_pin_irq()
404 mp_raise_ValueError(MP_ERROR_TEXT("bad wake value")); in machine_pin_irq()
408 mp_raise_ValueError(MP_ERROR_TEXT("no resources")); in machine_pin_irq()
412 mp_raise_ValueError(MP_ERROR_TEXT("invalid pin for wake")); in machine_pin_irq()
418 mp_raise_ValueError(MP_ERROR_TEXT("no resources")); in machine_pin_irq()
H A Dmachine_pwm.c152 mp_raise_ValueError(MP_ERROR_TEXT("out of PWM channels")); in esp32_pwm_init_helper()
170 … mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("PWM not supported on pin %d"), self->pin); in esp32_pwm_init_helper()
180 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("bad frequency %d"), tval); in esp32_pwm_init_helper()
254 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("bad frequency %d"), tval); in esp32_pwm_freq()
/dports/lang/micropython/micropython-1.17/ports/zephyr/
H A Dzephyr_storage.c62 mp_raise_ValueError(MP_ERROR_TEXT("disk not found")); in zephyr_disk_access_make_new()
66 mp_raise_ValueError(MP_ERROR_TEXT("unable to get sector size")); in zephyr_disk_access_make_new()
70 mp_raise_ValueError(MP_ERROR_TEXT("unable to get block count")); in zephyr_disk_access_make_new()
165 mp_raise_ValueError(MP_ERROR_TEXT("invalid block size")); in zephyr_flash_area_make_new()
169 mp_raise_ValueError(MP_ERROR_TEXT("unable to open flash area")); in zephyr_flash_area_make_new()
/dports/lang/micropython/micropython-1.17/ports/nrf/boards/microbit/modules/
H A Dmicrobitimage.c230 mp_raise_TypeError(MP_ERROR_TEXT("Image(s) takes a string.")); in microbit_image_make_new()
354 mp_raise_ValueError(MP_ERROR_TEXT("index can't be negative")); in microbit_image_get_pixel()
359 mp_raise_ValueError(MP_ERROR_TEXT("index too large")); in microbit_image_get_pixel()
378 mp_raise_ValueError(MP_ERROR_TEXT("index can't be negative")); in microbit_image_set_pixel()
382 mp_raise_ValueError(MP_ERROR_TEXT("brightness out of bounds.")); in microbit_image_set_pixel()
387 mp_raise_ValueError(MP_ERROR_TEXT("index too large")); in microbit_image_set_pixel()
396 mp_raise_ValueError(MP_ERROR_TEXT("brightness out of bounds.")); in microbit_image_fill()
409 mp_raise_TypeError(MP_ERROR_TEXT("expecting an image")); in microbit_image_blit()
412 mp_raise_TypeError(MP_ERROR_TEXT("must specify both offsets")); in microbit_image_blit()
419 mp_raise_ValueError(MP_ERROR_TEXT("size can't be negative")); in microbit_image_blit()
[all …]
/dports/lang/micropython/micropython-1.17/ports/esp8266/
H A Dmodnetwork.c184 mp_raise_ValueError(MP_ERROR_TEXT("unknown status param")); in esp_status()
232 mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("STA must be active")); in esp_scan()
249 mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("scan failed")); in esp_scan()
320 mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("wifi_set_ip_info() failed")); in esp_ifconfig()
333 mp_raise_TypeError(MP_ERROR_TEXT("either pos or kw args are allowed")); in esp_config()
360 mp_raise_ValueError(MP_ERROR_TEXT("invalid buffer length")); in esp_config()
430 mp_raise_TypeError(MP_ERROR_TEXT("can query only one param")); in esp_config()
483 mp_raise_ValueError(MP_ERROR_TEXT("unknown config param")); in esp_config()
H A Dmachine_uart.c110 mp_raise_ValueError(MP_ERROR_TEXT("invalid data bits")); in pyb_uart_init_helper()
146 mp_raise_ValueError(MP_ERROR_TEXT("invalid tx/rx")); in pyb_uart_init_helper()
162 mp_raise_ValueError(MP_ERROR_TEXT("invalid stop bits")); in pyb_uart_init_helper()
201 mp_raise_msg_varg(&mp_type_ValueError, MP_ERROR_TEXT("UART(%d) does not exist"), uart_id); in pyb_uart_make_new()
251 mp_raise_msg(&mp_type_OSError, MP_ERROR_TEXT("UART(1) can't read")); in pyb_uart_read()
H A Dmachine_rtc.c184 mp_raise_ValueError(MP_ERROR_TEXT("buffer too long")); in pyb_rtc_memory()
208 mp_raise_ValueError(MP_ERROR_TEXT("invalid alarm")); in pyb_rtc_alarm()
222 mp_raise_ValueError(MP_ERROR_TEXT("invalid alarm")); in pyb_rtc_alarm_left()
245 mp_raise_ValueError(MP_ERROR_TEXT("invalid alarm")); in pyb_rtc_irq()
/dports/lang/micropython/micropython-1.17/ports/nrf/modules/ubluepy/
H A Dubluepy_service.c71 mp_raise_ValueError(MP_ERROR_TEXT("Invalid Service type")); in ubluepy_service_make_new()
77 mp_raise_ValueError(MP_ERROR_TEXT("Invalid UUID parameter")); in ubluepy_service_make_new()
128 mp_raise_ValueError(MP_ERROR_TEXT("Invalid UUID parameter")); in service_get_characteristic()

123456789