Currently on rp2 the time.time_ns() function has only seconds resolution.
This commit makes it have microsecond resolution, by using the output of
time_us_64() instead of the RTC.
Tested that it does not drift from the RTC over long periods of time.
Signed-off-by: Damien George <damien.p.george@gmail.com>
No other network-enabled board has urllib.urequest frozen in to the
firmware, and esp8266 is relatively low on flash, so remove this module.
And (u)requests is already included by bundle-networking.
Signed-off-by: Damien George <damien@micropython.org>
Also remove corresponding commented line from esp8266/boards/manifest.py.
It doesn't have enough flash to have this frozen by default.
Signed-off-by: Glenn Moloney <glenn.moloney@gmail.com>
Allows using gdb, addr2line, etc. on a "release" ELF file.
No impact to .bin or .uf2 size, only the .elf will get bigger.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
The current code assumes all I2Cs are on the same peripheral bus, which is
not true for I2C4 and the same goes for the clock enable code.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Flushing console output in msvc builds always fails because that
output is not buffered so don't propagate that as an error (in a
simlar way as was done in 1c047742 for macOS).
Signed-off-by: stijn <stijn@ignitron.net>
The IDF-provided version of TinyUSB defaults to Espressif's standard
VID:PID unless specific sdkconfig options are present. The numbers
already defined for the CUSTOM_* config options were ignored otherwise.
Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
This removes the duplicate code in cyw43, esp32, esp8266 that implements
the same logic as network.hostname.
Renames the `mod_network_hostname` (where we store the hostname value in
`.data`) to `mod_network_hostname_data` to make way for calling the shared
function `mod_network_hostname`.
And uses memcpy for mod_network_hostname_data, because the length of source
is already known and removes reliance on string data being null-terminated.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This changes from the previous limit of 15 characters. Although DHCP and
mDNS allow for up to 63, ESP32 and ESP8266 only allow 32, so this seems
like a reasonable limit to enforce across all ports (and avoids wasting the
additional memory).
Also clarifies that `MICROPY_PY_NETWORK_HOSTNAME_MAX_LEN` does not include
the null terminator (which was unclear before).
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Update the documentation in circuitpython/shared-bindings/rotaryio/IncrementalEncoder.c
to explicitly state that rotaryio.IncrementalEncoder assumes the encoder's pins are
connected to ground and sets pull-ups on the pins accordingly.
Closes#5847
Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
This patch reinstalls the pin IRQ handler on WiFi init, as some
ports disable/remove pin IRQs on soft-reboot, or deinit the pins.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>