summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2022-01-06drivers/ninaw10/nina_wifi_drv: Fix DNS resolution.iabdalkader
- The wrong ACK is returned and checked. - Send secondary DNS to google.
2022-01-06rp2: Add support for DHT11 and DHT22 sensors.iabdalkader
2021-11-19drivers/ninaw10: Fix BSSID byte order, and add null byte to ESSID.iabdalkader
- Fix the BSSID byte order from scan and netinfo. - Make sure ESSID from netinfo is null terminated.
2021-11-19drivers/neopixel: Avoid heap alloc in fill().Jim Mussared
Previously the use of `range(start,stop,step)` caused an allocation. Replace with while loop. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-11-16drivers/lsm6dsox: Add LSM6DSOX driver and examples.iabdalkader
2021-11-13drivers/ninaw10: Add ublox Nina-W10 WiFi/BT module driver.iabdalkader
- Add WiFi/BT drivers for ublox Nina-W10 (esp32 based) module. - Add ublox Nina-W10 Python module in extmod.
2021-10-25mimxrt: Add dht_readinto() to the mimxrt module, and freeze dht.py.robert-hh
The change affects dht.py from the drivers directory as well to include the logic for the mimxrt port.
2021-08-31drivers/cyw43: Make wifi join fail if interface is not active.Damien George
Otherwise the Python network object continues to report that it is attempting to connect. Also make the return error code consistent with wifi scan. Signed-off-by: Damien George <damien@micropython.org>
2021-08-31drivers/cyw43: Fix cyw43_deinit so it can be called many times in a row.Damien George
This makes sure deinit() can be called on the interface many times without error, and that the state of the driver is fully reset. Fixes issue #7493. Signed-off-by: Damien George <damien@micropython.org>
2021-08-30drivers/neopixel: Reduce code size of driver.Jim Mussared
Saves 71 bytes of bytecode. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-30drivers/neopixel: Optimize fill() for speed.Jim Mussared
This makes fill() about 7x faster (PYBV11 and PYBD_SF6) for the cost of +40 bytes of bytecode (or 120 bytes text). Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-08-19drivers/neopixel: Add common machine.bitstream-based neopixel module.Jim Mussared
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2021-07-12all: Update to point to files in new shared/ directory.Damien George
Signed-off-by: Damien George <damien@micropython.org>
2021-06-17drivers/display/ssd1306.py: Add support for 72x40 displays.Mike Causer
The 72x40 OLED requires selecting the internal IREF, as opposed to the default external IREF. This is an undocumented feature in the SSD1306 datasheet, but is present in the SSD1315 datasheet. It's possible the 72x40 OLED is actually using the newer SSD1315 controller. Sending the IREF select command to SSD1306 displays has no effect on them, so it's added to the init_display() instead of wrapping in an "if width = 72". Also tested on a 128x64 OLED using the SSD1315 controller (smaller ribbon cable) and the proposed change has no effect on the display, as the module comes with the correct current limiting resistor. Internal and external IREF work the same. Fixes issue #7281.
2021-05-06drivers/display/ssd1306.py: Add rotate method.Mike Causer
And clean up (make more efficient) display set-up commands.
2021-04-30drivers/cyw43/cywbt: Remove hard-coded UART6 alternate function setting.iabdalkader
2021-04-30drivers/cyw43/cywbt: Add compile option for RF switch.iabdalkader
2021-04-30drivers/cyw43/cyw43_ctrl: Use new sdio enable API functions.iabdalkader
This removes any references to a specific SDMMC instance, making the driver more generic/portable.
2021-04-23drivers/sdcard: Add sleep_ms(1) delay in SDCard.readinto sync loop.Damien George
So this driver works on faster MCUs (that run this loop fast) with older, slower SD cards. Fixes issue #7129. Signed-off-by: Damien George <damien@micropython.org>
2020-12-18drivers/memory/spiflash: Add MICROPY_HW_SPIFLASH_ENABLE_CACHE option.Damien George
This only needs to be enabled if a board uses FAT FS on external SPI flash. When disabled (and using external SPI flash) 4k of RAM can be saved. Signed-off-by: Damien George <damien@micropython.org>
2020-09-08extmod/modbluetooth: Refactor stack/hci/driver/port bindings.Jim Mussared
Previously the interaction between the different layers of the Bluetooth stack was different on each port and each stack. This commit defines common interfaces between them and implements them for cyw43, btstack, nimble, stm32, unix.
2020-09-04all: Rename "sys" module to "usys".stijn
This is consistent with the other 'micro' modules and allows implementing additional features in Python via e.g. micropython-lib's sys. Note this is a breaking change (not backwards compatible) for ports which do not enable weak links, as "import sys" must now be replaced with "import usys".
2020-04-07drivers/display/ssd1306.py: Change the SET_COM_PIN_CFG setting.robert-hh
Making it more specific to use 0x02 for display with an aspect ratio > 2 (resolutions 96x16 and 128x32) and 0x12 for all other sizes as recommended by @mcauser. Tested with a 64x32 display which did not work before.
2020-04-05all: Use MP_ERROR_TEXT for all error messages.Jim Mussared
2020-03-25drivers/onewire: Fix undefined variable errors.Andreas Motl
On CPython, and with pylint, the variables MATCH_ROM and SEARCH_ROM are undefined. This code works in MicroPython because these variables are constants and the MicroPython parser/compiler optimises them out. But it is not valid Python because they are technically undefined within the scope they are used. This commit makes the code valid Python code. The const part is removed completely because these constants are part of the public API and so cannot be moved to the global scope (where they could still use the MicroPython const optimisation).
2020-03-10stm32: Refactor bluetooth stack/hci/driver bindings.Damien George
This makes a cleaner separation between the: driver, HCI UART and BT stack. Also updated the naming to be more consistent (mp_bluetooth_hci_*). Work done in collaboration with Jim Mussared aka @jimmo.
2020-02-28all: Reformat C and Python source code with tools/codeformat.py.Damien George
This is run with uncrustify 0.70.1, and black 19.10b0.
2020-02-16drivers/nrf24l01: Change pipe addrs in test to match Arduino addrs.Peter Hinch
These addresses were initially chosen to match the nRF24 Arduino library examples but they are byte-reversed. So change them to be on-air compatible with the Arduino library. Also, the data sheet for the nRF24 says that RX data pipes 1-5 must share the same top 32-bits, and must differ only in the LSbyte. The addresses used here (while correct because they are on TX pipe and RX pipe 0) are misleading in this sense, because it looks like they were chosen to share the top 32-bits per the datasheet.
2020-01-31drivers/cyw43: Return early from cyw43_wifi_set_up if wifi_on fails.Damien George
2020-01-31drivers/cyw43: Include stdio.h in files that use printf.Damien George
2020-01-30drivers, stm32: Support SPI/QSPI flash chips over 16MB.Andrew Leech
With a SPI flash that has more than 16MB, 32-bit addressing is required rather than the standard 24-bit. This commit adds support for 32-bit addressing so that the SPI flash commands (read/write/erase) are selected automatically depending on the size of the address being used at each operation.
2019-12-27drivers/cyw43: Fix to build in nanbox mode.Damien George
2019-12-13drivers/wiznet5k: Allow selecting maximum fixed buffer size for MACRAW.Damien George
Enabling WIZCHIP_USE_MAX_BUFFER will make the TX/RX buffers the maximum available size, for use with MACRAW mode.
2019-11-06drivers/sdcard: Raise exception on timeout of readinto.Jeremy Herbert
Otherwise the code can get stuck in an infinite loop if the SD card fails to respond to a read.
2019-10-16drivers/onewire/ds18x20.py: Add support for DS1822 sensor.Damien George
DS1822P sensors behave just like the DS18B20 except for the following: - it has a different family code: 0x22 - it has only the GND and DQ pins connected, it uses parasitic power from the data line Contributed by @nebelgrau77.
2019-10-01drivers/cyw43: Add low-level CYW43xx Bluetooth HCI UART driver.Damien George
2019-07-03drivers/memory/spiflash: Add support to put SPI flash in sleep mode.Damien George
2019-06-03drivers: Add driver for CYW43xx WiFi SoCs.Damien George
2019-05-20drivers/display/ssd1306.py: Change to use new i2c.writevto() method.Damien George
Fixes issue #3482.
2019-03-08drivers/memory/spiflash: Rework wait_sr to fix uninit'd variable 'sr'.Andrew Leech
2019-01-22drivers/dht: Allow open-drain-high call to be DHT specific if needed.Damien George
Some ports (eg esp8266) need to have specific behaviour for driving a DHT reliably.
2018-09-20drivers/sdcard: Remove debugging print statement in ioctl method.Peter Hinch
2018-09-20drivers/sdcard: In test use os.umount and machine module instead of pyb.Peter Hinch
pyb.umount(None, mountpoint) no longer works.
2018-09-18drivers/display/lcd160cr.py: In fast_spi, send command before flushing.Damien George
The intention of oflush() is to flush the "fast SPI" command itself so that the SPI object is ready to use when the function returns.
2018-08-08drivers/cc3000: Use cc3000_time_t instead of time_t for custom typedef.roland
Otherwise it can clash with time_t from the C standard include headers.
2018-07-05drivers/sdcard: Do not release CS during the middle of read operations.Mateusz Kijowski
It seems that some cards do not tolerate releasing the card (by setting CS high) after issuing CMD17 (and 18) and raising it again before reading data. Somehow this causes the 0xfe data start marker not being read and SDCard.readinto() is spinning forever (or until this byte is in the data). This seems to fix weird behviour of SDCard.readblocks() returning different data, also solved hanging os.mount() for my case with a 16GB Infineon card. This stackexchange answer gives more context: https://electronics.stackexchange.com/questions/307214/sd-card-spi-interface-issue-read-operation-returns-0x3f-0xff-instead-of-0x7f-0#307268
2018-06-15drivers/sdcard: Fix bug in computing number of sectors on SD Card.Damien George
This was a typo from the very first commit of this file.
2018-06-15drivers/sdcard: Change driver to use new block-device protocol.Damien George
2018-06-14drivers/memory/spiflash: Add functions for direct erase/read/write.Damien George
These new API functions do not use the cache.
2018-06-14drivers/memory/spiflash: Rename functions to indicate they use cache.Damien George
This patch renames the existing SPI flash API functions to reflect the fact that the go through the cache: mp_spiflash_flush -> mp_spiflash_cache_flush mp_spiflash_read -> mp_spiflash_cached_read mp_spiflash_write -> mp_spiflash_cached_write