- 20 7月, 2023 5 次提交
-
-
由 robert-hh 提交于
Sometimes mp_hal_get_pin_obj() was used. machine_pin_find() is the internal name, and the external interface is mp_hal_get_pin_obj(). Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 robert-hh 提交于
Allowing the machine.pwm() and esp.apa102() module to accept Pin(x) integer parameters. Not so much of a gain, just consistent with other ports. Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 robert-hh 提交于
This applies to all machine modules which have pins as arguments. Since machine_pin_get_id() calls pin_find(), these pin arguments may be at the moment either integer objects or Pin objects. That allows for instance to write uart = UART(1, tx=Pin(4), rx=Pin(5)) instead of uart = UART(1, tx=4, rx=5) which is consistent with other ports. Since this handling is done at a single place in the code, extending that scheme to accept strings for named pins is easy. Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 robert-hh 提交于
The new machine_pin_find() function accepts a Pin object and a integer object as input and returns a pin object. That can be extended later to accept a string object, once named pins are supported. Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 robert-hh 提交于
And use it in mp_hal_get_pin_obj() and machine_pin_make_new(). That way, mp_hal_get_pin_obj() accepts both int and str objects as argument, allowing use of a pin specifier instead of a pin object in the constructor of devices which need a pin as parameter. E.g. instead of uart = UART(0, tx=Pin(0), rx=Pin(1)) one can write: uart = UART(0, tx=0, rx=1) Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
- 14 7月, 2023 1 次提交
-
-
由 Damien George 提交于
The legacy driver was deprecated in IDF v5, and crashes when the ISR handler is called. Instead of fixing the legacy code, this commit reworks the machine.Timer class to use the low-level HAL driver. Tested on ESP32, ESP32S2, ESP32S3 and ESP32C3. Behaviour is the same as it was before this commit, except the way the Timer object is printed, it now gives more useful information (timer id, mode, period in ms). Fixes issue #11970. Signed-off-by: NDamien George <damien@micropython.org>
-
- 13 7月, 2023 15 次提交
-
-
由 Jim Mussared 提交于
Follow-up to 24c02c4e for when MICROPY_ENABLE_EXTERNAL_IMPORT=0. It now needs to try both extensible and non-extensible modules. Signed-off-by: NJim Mussared <jim.mussared@gmail.com>
-
由 Damien George 提交于
Prior to this fix, async for assumed the iterator expression was a simple identifier, and used that identifier as a local to store the intermediate iterator object. This is incorrect behaviour. This commit fixes the issue by keeping the iterator object on the stack as an anonymous local variable. Fixes issue #11511. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Nicholas H.Tollervey 提交于
When the "typeof window" check is run within a web worker the window is undefined, causing an error because "require" is only defined in a Node environment. Change the logic to reflect the true intentions of when this code should run, ie in Node only. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
In the u-module renaming done in 30628d1b, these duplicate lines were accidentally left. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
Even if MICROPY_PY_MACHINE is disabled, the soft timer is still used. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Victor Rajewski 提交于
The existing qspi for stm32 implementation can only send a spi command with exactly 0 or 2 data bytes. Certain spiflash chips (e.g. AT25SF321B) have commands that only take a single data byte, and will ignore the command if more than that is sent. This commit allows sending a command with a single data byte. Signed-off-by: NVictor Rajewski <victor@allumeenergy.com.au>
-
由 Yuuki NAGAO 提交于
Update adc_refcor before reading ADC_CHANNEL_VBAT because VREFINT_CAL is at VDDA=3.0V. Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 Yuuki NAGAO 提交于
For STM32G4, there is a errata on ADC that may get wrong ADC result. According to the errata sheet, this can be avoid by performing two consecutive ADC conversions and keep second result. Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 Yuuki NAGAO 提交于
Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 Yuuki NAGAO 提交于
For STM32G4 series, the internal sensors are connected to: - ADC1_IN16: Temperature sensor - ADC1_IN17: Battery voltage monitoring - ADC1_IN18: Internal voltage reference but ADC_CHANNEL_TEMPSENSOR_ADC1, ADC_CHANNEL_VBAT, ADC_CHANNEL_VREFINT are not defined as 16, 17, 18. This commit converts channel 16, 17, 18 to ADC_CHANNEL_x in adc_get_internal_channel(). Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 Yuuki NAGAO 提交于
For STM32G4, * TS_CAL1 raw data acquired at a temperature of 30°C * TS_CAL2 raw data acquired at a temperature of 130°C Also, these values are at VDDA=3.0V. Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 Yuuki NAGAO 提交于
For STM32G4, ADC clock frequency should be equal or less than 60MHz. To satisfy this specification, ADC clock prescaler should be equal or greater than 4 (For example, NUCLEO_G474RE runs 170MHz). In addition, to obtain accurate internal channel value, the ADC clock prescaler is set to 16 because vbat needs at least 12us (16/170*247.5=23.3us). Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 Yuuki NAGAO 提交于
For STMG4 MCUs, the peripheral registers for DAC have to be accessed by words (32bits) because DAC is connected to AHB directly. (This requirement is also there for other MCU series. However, if DAC is connected to APB like F4/L1/L4 MCUs, AHB byte or half-word transfer is changed into a 32-bit APB transfer. This means that PSIZE does not have to be DMA_PDATAALIGN_WORD on these MCUs, and in fact must be BYTE/HALFWORD to function correctly.) Fixes issue #9563. Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 Elvis Pfutzenreuter 提交于
This board requires slightly different configuration to work. It is important to hard reset (cycle power) if you try to initialize LAN and it fails, before trying again with new parameters. Discussion: https://github.com/orgs/micropython/discussions/11446 AliExpress purchase link: https://pt.aliexpress.com/item/1005002023196214.htmlSigned-off-by: NElvis Pfutzenreuter <epxx@epxx.co>
-
由 Glenn Moloney 提交于
This is a fix for commit bccbaa92: - Should only wait for WIFI_EVENT_STA_START when invoked on the STA_IF interface. - The WIFI_EVENT_STA_START event is generated every time the STA_IF interface is set active(True) and it was previously inactive, ie. not only after calling esp_wifi_start(). - Also wait for WIFI_EVENT_STA_STOP when deactivating the interface. - Also wait for relevant AP events. Fixes issue #11910. Signed-off-by: NGlenn Moloney <glenn.moloney@gmail.com> Signed-off-by: NDamien George <damien@micropython.org>
-
- 11 7月, 2023 4 次提交
-
-
由 Damien George 提交于
Enabling mDNS put this firmware over the limit of the OTA partition size, so tweak the compiler settings to reduce the firmware size. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Carlosgg 提交于
mDNS was disabled in e4650125. This commit re-enables it. For reference see: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/migration-guides/release-5.x/5.0/removed-components.htmlSigned-off-by: NCarlos Gil <carlosgilglez@gmail.com>
-
由 Damien George 提交于
To match the other functions in the machine module, in particular so that MICROPY_PY_MACHINE can be disabled without getting a compiler warning about unused code. Signed-off-by: NDamien George <damien@micropython.org>
-
由 Tobias Thyrrestrup 提交于
Signed-off-by: NTobias Thyrrestrup <tt@LEGO.com>
-
- 27 6月, 2023 12 次提交
-
-
由 Yuuki NAGAO 提交于
Also, it is needed only when USB is enabled. Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 Yuuki NAGAO 提交于
Signed-off-by: NYuuki NAGAO <wf.yn386@gmail.com>
-
由 elibdev 提交于
This may also call the garbage collector. Signed-off-by: NEli Bierman <eli@elib.dev>
-
由 elibdev 提交于
This fixes a bug where `gc.collect()` would crash due to emscripten_scan_stack being called synchronously within mp_js_do_str. The fix is to make mp_js_do_str asynchronous. Fixes #10692. Signed-off-by: NEli Bierman <eli@elib.dev>
-
由 robert-hh 提交于
Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 robert-hh 提交于
And move the setting to the samd-generic files, now that both samd21 and samd51 support it. Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 robert-hh 提交于
Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 robert-hh 提交于
They are used by both SAMD21 and SAMD51. Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 robert-hh 提交于
SAMD21: set the filesystem type to LFS1. SAMD51: the type is already set to LFS2, support is now dropped for LFS1. It has not been used and dropping it saves 10 k of flash. Signed-off-by: Nrobert-hh <robert@hammelrath.com>
-
由 Damien George 提交于
Fixes issue #11872. Signed-off-by: NDamien George <damien@micropython.org>
-
由 mbedNoobNinja 提交于
Signed-off-by: NmbedNoobNinja <novoltage@gmail.com>
-
由 mbedNoobNinja 提交于
This commit adds support for a new processor RA6M5. It also adds the following classes to the machine module: PWM, DAC, SDCard. Signed-off-by: NmbedNoobNinja <novoltage@gmail.com>
-
- 26 6月, 2023 3 次提交
-
-
由 Takeo Takahashi 提交于
* Use R_SCI_UART_BaudCalculate() of fsp/src/r_sci_uart/r_sci_uart.c * Support UART.init(baudrate) Signed-off-by: NTakeo Takahashi <takeo.takahashi.xv@renesas.com>
-
由 Damien George 提交于
Signed-off-by: NDamien George <damien@micropython.org>
-
由 Damien George 提交于
For coverage. Signed-off-by: NDamien George <damien@micropython.org>
-