Skip to content

Commit 4b56717

Browse files
authored
Merge pull request #44 from adafruit/main
Update from adafruit main
2 parents ef0ce0d + d2563c5 commit 4b56717

File tree

55 files changed

+1465
-359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1465
-359
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ jobs:
314314
- "simmel"
315315
- "snekboard"
316316
- "sparkfun_lumidrive"
317+
- "sparkfun_nrf52840_micromod"
317318
- "sparkfun_nrf52840_mini"
318319
- "sparkfun_qwiic_micro_no_flash"
319320
- "sparkfun_qwiic_micro_with_flash"

extmod/vfs_fat_diskio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ STATIC fs_user_mount_t *disk_get_device(void *bdev) {
3434
/*-----------------------------------------------------------------------*/
3535

3636
DRESULT disk_read (
37-
bdev_t pdrv, /* Physical drive nmuber (0..) */
37+
bdev_t pdrv, /* Physical drive */
3838
BYTE *buff, /* Data buffer to store read data */
3939
DWORD sector, /* Sector address (LBA) */
4040
UINT count /* Number of sectors to read (1..128) */
@@ -75,7 +75,7 @@ DRESULT disk_read (
7575
/*-----------------------------------------------------------------------*/
7676

7777
DRESULT disk_write (
78-
bdev_t pdrv, /* Physical drive nmuber (0..) */
78+
bdev_t pdrv, /* Physical drive */
7979
const BYTE *buff, /* Data to be written */
8080
DWORD sector, /* Sector address (LBA) */
8181
UINT count /* Number of sectors to write (1..128) */
@@ -122,7 +122,7 @@ DRESULT disk_write (
122122
/*-----------------------------------------------------------------------*/
123123

124124
DRESULT disk_ioctl (
125-
bdev_t pdrv, /* Physical drive nmuber (0..) */
125+
bdev_t pdrv, /* Physical drive */
126126
BYTE cmd, /* Control code */
127127
void *buff /* Buffer to send/receive control data */
128128
)

lib/mp3

locale/ID.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3695,7 +3695,7 @@ msgstr ""
36953695
msgid "out of range of source"
36963696
msgstr ""
36973697

3698-
#: shared-bindings/displayio/Bitmap.c
3698+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36993699
msgid "out of range of target"
37003700
msgstr ""
37013701

locale/circuitpython.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3643,7 +3643,7 @@ msgstr ""
36433643
msgid "out of range of source"
36443644
msgstr ""
36453645

3646-
#: shared-bindings/displayio/Bitmap.c
3646+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36473647
msgid "out of range of target"
36483648
msgstr ""
36493649

locale/cs.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3646,7 +3646,7 @@ msgstr ""
36463646
msgid "out of range of source"
36473647
msgstr ""
36483648

3649-
#: shared-bindings/displayio/Bitmap.c
3649+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36503650
msgid "out of range of target"
36513651
msgstr ""
36523652

locale/de_DE.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3732,7 +3732,7 @@ msgstr ""
37323732
msgid "out of range of source"
37333733
msgstr "Außerhalb des Bereichs der Quelle"
37343734

3735-
#: shared-bindings/displayio/Bitmap.c
3735+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
37363736
msgid "out of range of target"
37373737
msgstr "Außerhalb des Bereichs des Ziels"
37383738

locale/el.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3643,7 +3643,7 @@ msgstr ""
36433643
msgid "out of range of source"
36443644
msgstr ""
36453645

3646-
#: shared-bindings/displayio/Bitmap.c
3646+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36473647
msgid "out of range of target"
36483648
msgstr ""
36493649

locale/en_GB.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3642,7 +3642,7 @@ msgstr ""
36423642
msgid "out of range of source"
36433643
msgstr ""
36443644

3645-
#: shared-bindings/displayio/Bitmap.c
3645+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36463646
msgid "out of range of target"
36473647
msgstr ""
36483648

locale/es.po

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
11-
"PO-Revision-Date: 2021-03-07 15:50+0000\n"
12-
"Last-Translator: Jose David M <[email protected]>\n"
11+
"PO-Revision-Date: 2021-03-12 02:03+0000\n"
12+
"Last-Translator: Alvaro Figueroa <[email protected]>\n"
1313
"Language-Team: \n"
1414
"Language: es\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=UTF-8\n"
1717
"Content-Transfer-Encoding: 8bit\n"
1818
"Plural-Forms: nplurals=2; plural=n != 1;\n"
19-
"X-Generator: Weblate 4.5.1\n"
19+
"X-Generator: Weblate 4.5.2-dev\n"
2020

2121
#: main.c
2222
msgid ""
@@ -1836,7 +1836,7 @@ msgstr ""
18361836

18371837
#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c
18381838
msgid "Pins must be sequential"
1839-
msgstr ""
1839+
msgstr "Los pines deben estar en orden secuencial"
18401840

18411841
#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c
18421842
msgid "Pins must share PWM slice"
@@ -2142,11 +2142,10 @@ msgid ""
21422142
"enough power for the whole circuit and press reset (after ejecting "
21432143
"CIRCUITPY).\n"
21442144
msgstr ""
2145-
"La alimentación del microntrolador cayó. Asegúrate que tu fuente de "
2145+
"La alimentación del microntrolador bajó. Asegúrate que tu fuente de "
21462146
"alimentación\n"
21472147
"pueda aportar suficiente energía para todo el circuito y presiona reset "
2148-
"(luego de\n"
2149-
"expulsar CIRCUITPY)\n"
2148+
"(luego de expulsar CIRCUITPY)\n"
21502149

21512150
#: shared-module/audiomixer/MixerVoice.c
21522151
msgid "The sample's bits_per_sample does not match the mixer's"
@@ -2818,7 +2817,7 @@ msgstr "circulo solo puede ser registrado con un pariente"
28182817

28192818
#: shared-bindings/bitmaptools/__init__.c
28202819
msgid "clip point must be (x,y) tuple"
2821-
msgstr "El punto clip debe ser una tupla (x, y)"
2820+
msgstr "El punto de recorte debe ser una tupla (x, y)"
28222821

28232822
#: shared-bindings/msgpack/ExtType.c
28242823
msgid "code outside range 0~127"
@@ -3740,7 +3739,7 @@ msgstr "ord() espera un carácter, pero encontró un string de longitud %d"
37403739
msgid "out of range of source"
37413740
msgstr "fuera de rango de fuente"
37423741

3743-
#: shared-bindings/displayio/Bitmap.c
3742+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
37443743
msgid "out of range of target"
37453744
msgstr "fuera de rango del objetivo"
37463745

@@ -3842,7 +3841,7 @@ msgstr "presionando ambos botones al inicio.\n"
38423841

38433842
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
38443843
msgid "pull masks conflict with direction masks"
3845-
msgstr ""
3844+
msgstr "máscara de pull en conflicto con máscara de dirección"
38463845

38473846
#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
38483847
msgid "pull_threshold must be between 1 and 32"

locale/fil.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3691,7 +3691,7 @@ msgstr "ord() umaasa ng character pero string ng %d haba ang nakita"
36913691
msgid "out of range of source"
36923692
msgstr ""
36933693

3694-
#: shared-bindings/displayio/Bitmap.c
3694+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36953695
msgid "out of range of target"
36963696
msgstr ""
36973697

locale/fr.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3760,7 +3760,7 @@ msgstr ""
37603760
msgid "out of range of source"
37613761
msgstr "dépassement des bornes de source"
37623762

3763-
#: shared-bindings/displayio/Bitmap.c
3763+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
37643764
msgid "out of range of target"
37653765
msgstr "dépassement des bornes de target"
37663766

locale/hi.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3643,7 +3643,7 @@ msgstr ""
36433643
msgid "out of range of source"
36443644
msgstr ""
36453645

3646-
#: shared-bindings/displayio/Bitmap.c
3646+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36473647
msgid "out of range of target"
36483648
msgstr ""
36493649

locale/it_IT.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3707,7 +3707,7 @@ msgstr ""
37073707
msgid "out of range of source"
37083708
msgstr ""
37093709

3710-
#: shared-bindings/displayio/Bitmap.c
3710+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
37113711
msgid "out of range of target"
37123712
msgstr ""
37133713

locale/ja.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3671,7 +3671,7 @@ msgstr "ord()は1文字を要求しますが、長さ %d の文字列が与え
36713671
msgid "out of range of source"
36723672
msgstr "ソースが範囲外"
36733673

3674-
#: shared-bindings/displayio/Bitmap.c
3674+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36753675
msgid "out of range of target"
36763676
msgstr ""
36773677

locale/ko.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3647,7 +3647,7 @@ msgstr ""
36473647
msgid "out of range of source"
36483648
msgstr ""
36493649

3650-
#: shared-bindings/displayio/Bitmap.c
3650+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36513651
msgid "out of range of target"
36523652
msgstr ""
36533653

locale/nl.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3704,7 +3704,7 @@ msgstr "ord() verwacht een teken (char) maar vond een string van lengte %d"
37043704
msgid "out of range of source"
37053705
msgstr "buiten bereik van bron"
37063706

3707-
#: shared-bindings/displayio/Bitmap.c
3707+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
37083708
msgid "out of range of target"
37093709
msgstr "buiten bereik van doel"
37103710

locale/pl.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3664,7 +3664,7 @@ msgstr "ord() oczekuje znaku, a jest łańcuch od długości %d"
36643664
msgid "out of range of source"
36653665
msgstr ""
36663666

3667-
#: shared-bindings/displayio/Bitmap.c
3667+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
36683668
msgid "out of range of target"
36693669
msgstr ""
36703670

locale/pt_BR.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3749,7 +3749,7 @@ msgstr ""
37493749
msgid "out of range of source"
37503750
msgstr "fora do alcance da fonte"
37513751

3752-
#: shared-bindings/displayio/Bitmap.c
3752+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
37533753
msgid "out of range of target"
37543754
msgstr "fora do alcance do alvo"
37553755

locale/sv.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3707,7 +3707,7 @@ msgstr "ord() förväntade sig ett tecken, men en sträng med längden %d hittad
37073707
msgid "out of range of source"
37083708
msgstr "utanför räckvidd för source"
37093709

3710-
#: shared-bindings/displayio/Bitmap.c
3710+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
37113711
msgid "out of range of target"
37123712
msgstr "utanför räckvidd för target"
37133713

locale/zh_Latn_pinyin.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3704,7 +3704,7 @@ msgstr "ord() yùqí zìfú, dàn chángdù zìfú chuàn %d"
37043704
msgid "out of range of source"
37053705
msgstr "yuán fàn wéi wài"
37063706

3707-
#: shared-bindings/displayio/Bitmap.c
3707+
#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c
37083708
msgid "out of range of target"
37093709
msgstr "mù biāo fàn wéi wài"
37103710

ports/cxd56/common-hal/busio/I2C.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ uint8_t common_hal_busio_i2c_write(busio_i2c_obj_t *self, uint16_t address, cons
103103
msg.flags = (stop ? 0 : I2C_M_NOSTOP);
104104
msg.buffer = (uint8_t *) data;
105105
msg.length = len;
106-
return I2C_TRANSFER(self->i2c_dev, &msg, 1);
106+
return -I2C_TRANSFER(self->i2c_dev, &msg, 1);
107107
}
108108

109109
uint8_t common_hal_busio_i2c_read(busio_i2c_obj_t *self, uint16_t address, uint8_t *data, size_t len) {
@@ -114,7 +114,7 @@ uint8_t common_hal_busio_i2c_read(busio_i2c_obj_t *self, uint16_t address, uint8
114114
msg.flags = I2C_M_READ;
115115
msg.buffer = data;
116116
msg.length = len;
117-
return I2C_TRANSFER(self->i2c_dev, &msg, 1);
117+
return -I2C_TRANSFER(self->i2c_dev, &msg, 1);
118118
}
119119

120120
void common_hal_busio_i2c_never_reset(busio_i2c_obj_t *self) {

ports/cxd56/common-hal/busio/SPI.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, const mcu_pin_obj_t *
3535
const mcu_pin_obj_t *mosi, const mcu_pin_obj_t *miso) {
3636
int port = -1;
3737

38-
if (clock->number == PIN_SPI4_SCK && mosi->number == PIN_SPI4_MOSI && miso->number == PIN_SPI4_MISO) {
38+
if (clock->number == PIN_SPI4_SCK &&
39+
(mosi == NULL || mosi->number == PIN_SPI4_MOSI) &&
40+
(miso == NULL || miso->number == PIN_SPI4_MISO)) {
3941
port = 4;
40-
} else if (clock->number == PIN_EMMC_CLK && mosi->number == PIN_EMMC_DATA0 && miso->number == PIN_EMMC_DATA1) {
42+
} else if (clock->number == PIN_EMMC_CLK &&
43+
(mosi == NULL || mosi->number == PIN_EMMC_DATA0) &&
44+
(miso == NULL || miso->number == PIN_EMMC_DATA1)) {
4145
port = 5;
4246
}
4347

ports/esp32s2/common-hal/busio/I2C.c

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ void i2c_reset(void) {
5353
}
5454
}
5555
}
56-
static bool i2c_inited[I2C_NUM_MAX];
5756

5857
void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
5958
const mcu_pin_obj_t* scl, const mcu_pin_obj_t* sda, uint32_t frequency, uint32_t timeout) {
@@ -90,10 +89,9 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
9089
#endif
9190

9291

93-
if (xSemaphoreCreateBinaryStatic(&self->semaphore) != &self->semaphore) {
92+
if (xSemaphoreCreateMutexStatic(&self->semaphore) != &self->semaphore) {
9493
mp_raise_RuntimeError(translate("Unable to create lock"));
9594
}
96-
xSemaphoreGive(&self->semaphore);
9795
self->sda_pin = sda;
9896
self->scl_pin = scl;
9997
self->i2c_num = I2C_NUM_MAX;
@@ -106,6 +104,10 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
106104
mp_raise_ValueError(translate("All I2C peripherals are in use"));
107105
}
108106
i2c_status[self->i2c_num] = STATUS_IN_USE;
107+
108+
// Delete any previous driver.
109+
i2c_driver_delete(self->i2c_num);
110+
109111
i2c_config_t i2c_conf = {
110112
.mode = I2C_MODE_MASTER,
111113
.sda_io_num = self->sda_pin->number,
@@ -117,23 +119,16 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
117119
.clk_speed = frequency,
118120
}
119121
};
120-
esp_err_t result = i2c_param_config(self->i2c_num, &i2c_conf);
121-
if (result != ESP_OK) {
122-
mp_raise_ValueError(translate("Invalid pins"));
122+
if (i2c_param_config(self->i2c_num, &i2c_conf) != ESP_OK) {
123+
mp_raise_ValueError(translate("Invalid frequency"));
123124
}
124125

125-
126-
if (!i2c_inited[self->i2c_num]) {
127-
result = i2c_driver_install(self->i2c_num,
128-
I2C_MODE_MASTER,
129-
0,
130-
0,
131-
0);
132-
if (result != ESP_OK) {
133-
mp_raise_OSError(MP_EIO);
134-
}
135-
i2c_inited[self->i2c_num] = true;
136-
126+
if (i2c_driver_install(self->i2c_num,
127+
I2C_MODE_MASTER,
128+
0,
129+
0,
130+
0) != ESP_OK) {
131+
mp_raise_OSError(MP_EIO);
137132
}
138133

139134
claim_pin(sda);
@@ -149,12 +144,14 @@ void common_hal_busio_i2c_deinit(busio_i2c_obj_t *self) {
149144
return;
150145
}
151146

152-
i2c_status[self->i2c_num] = STATUS_FREE;
147+
i2c_driver_delete(self->i2c_num);
153148

154149
common_hal_reset_pin(self->sda_pin);
155150
common_hal_reset_pin(self->scl_pin);
156151
self->sda_pin = NULL;
157152
self->scl_pin = NULL;
153+
154+
i2c_status[self->i2c_num] = STATUS_FREE;
158155
}
159156

160157
bool common_hal_busio_i2c_probe(busio_i2c_obj_t *self, uint8_t addr) {

ports/esp32s2/common-hal/wifi/__init__.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ void common_hal_wifi_init(void) {
109109

110110
wifi_radio_obj_t* self = &common_hal_wifi_radio_obj;
111111
self->netif = esp_netif_create_default_wifi_sta();
112+
self->started = false;
112113

113114
// Even though we just called esp_netif_create_default_wifi_sta,
114115
// station mode isn't actually ready for use until esp_wifi_set_mode()

ports/esp32s2/esp-idf

0 commit comments

Comments
 (0)