Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/shared_bindings_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def build_module_map():
for module in modules:
full_name = module
search_name = module.lstrip("_")
re_pattern = "CIRCUITPY_{}\s=\s(.+)".format(search_name.upper())
re_pattern = "CIRCUITPY_{}\s*\??=\s*(.+)".format(search_name.upper())
find_config = re.findall(re_pattern, configs)
if not find_config:
continue
Expand Down
7 changes: 5 additions & 2 deletions locale/ID.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
Expand Down Expand Up @@ -1095,6 +1094,10 @@ msgstr "Tidak ada pin TX"
msgid "No available clocks"
msgstr ""

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "Tidak ada standar bus %q"
Expand Down
6 changes: 5 additions & 1 deletion locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"POT-Creation-Date: 2020-04-30 09:13-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -1084,6 +1084,10 @@ msgstr ""
msgid "No available clocks"
msgstr ""

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr ""
Expand Down
7 changes: 5 additions & 2 deletions locale/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
"Language: de_DE\n"
Expand Down Expand Up @@ -1093,6 +1092,10 @@ msgstr "Kein TX Pin"
msgid "No available clocks"
msgstr "Keine Taktgeber verfügbar"

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "Kein Standard %q Bus"
Expand Down
7 changes: 5 additions & 2 deletions locale/en_US.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
Expand Down Expand Up @@ -1084,6 +1083,10 @@ msgstr ""
msgid "No available clocks"
msgstr ""

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr ""
Expand Down
7 changes: 5 additions & 2 deletions locale/en_x_pirate.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n"
"Language: en_x_pirate\n"
Expand Down Expand Up @@ -1088,6 +1087,10 @@ msgstr ""
msgid "No available clocks"
msgstr ""

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr ""
Expand Down
7 changes: 5 additions & 2 deletions locale/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
Expand Down Expand Up @@ -1092,6 +1091,10 @@ msgstr "Sin pin TX"
msgid "No available clocks"
msgstr "Relojes no disponibles"

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "Sin bus %q por defecto"
Expand Down
7 changes: 5 additions & 2 deletions locale/fil.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: Timothy <[email protected]>\n"
"Language-Team: fil\n"
"Language: fil\n"
Expand Down Expand Up @@ -1100,6 +1099,10 @@ msgstr "Walang TX pin"
msgid "No available clocks"
msgstr ""

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "Walang default na %q bus"
Expand Down
7 changes: 5 additions & 2 deletions locale/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: Pierrick Couturier <[email protected]>\n"
"Language-Team: fr\n"
"Language: fr\n"
Expand Down Expand Up @@ -1107,6 +1106,10 @@ msgstr "Pas de broche TX"
msgid "No available clocks"
msgstr "Pas d'horloge disponible"

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "Pas de bus %q par défaut"
Expand Down
7 changes: 5 additions & 2 deletions locale/it_IT.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: Enrico Paganin <[email protected]>\n"
"Language-Team: \n"
"Language: it_IT\n"
Expand Down Expand Up @@ -1104,6 +1103,10 @@ msgstr "Nessun pin TX"
msgid "No available clocks"
msgstr "Nessun orologio a disposizione"

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "Nessun bus %q predefinito"
Expand Down
7 changes: 5 additions & 2 deletions locale/ko.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: \n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: ko\n"
Expand Down Expand Up @@ -1088,6 +1087,10 @@ msgstr ""
msgid "No available clocks"
msgstr ""

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr ""
Expand Down
7 changes: 5 additions & 2 deletions locale/pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: Radomir Dopieralski <[email protected]>\n"
"Language-Team: pl\n"
"Language: pl\n"
Expand Down Expand Up @@ -1089,6 +1088,10 @@ msgstr "Brak nóżki TX"
msgid "No available clocks"
msgstr "Brak wolnych zegarów"

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "Nie ma domyślnej magistrali %q"
Expand Down
7 changes: 5 additions & 2 deletions locale/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: pt_BR\n"
Expand Down Expand Up @@ -1096,6 +1095,10 @@ msgstr "Nenhum pino TX"
msgid "No available clocks"
msgstr ""

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "Nenhum barramento %q padrão"
Expand Down
7 changes: 5 additions & 2 deletions locale/zh_Latn_pinyin.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-26 14:46-0500\n"
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
"POT-Creation-Date: 2020-04-30 09:11-0400\n"
"Last-Translator: hexthat\n"
"Language-Team: Chinese Hanyu Pinyin\n"
"Language: zh\n"
Expand Down Expand Up @@ -1097,6 +1096,10 @@ msgstr "Wèi zhǎodào TX yǐn jiǎo"
msgid "No available clocks"
msgstr "Méiyǒu kěyòng de shízhōng"

#: shared-bindings/_bleio/PacketBuffer.c
msgid "No connection: size cannot be determined"
msgstr ""

#: shared-bindings/board/__init__.c
msgid "No default %q bus"
msgstr "wú mòrèn %q zǒngxiàn"
Expand Down
13 changes: 7 additions & 6 deletions ports/mimxrt10xx/common-hal/busio/UART.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,18 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
claim_pin(self->tx_pin->pin);

if (self->rx_pin != NULL) {
ringbuf_alloc(&self->rbuf, receiver_buffer_size, true);
// The LPUART ring buffer wastes one byte to distinguish between full and empty.
self->ringbuf = gc_alloc(receiver_buffer_size + 1, false, true /*long-lived*/);

if (!self->rbuf.buf) {
if (!self->ringbuf) {
LPUART_Deinit(self->uart);
mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate RX buffer"));
}

LPUART_TransferCreateHandle(self->uart, &self->handle, LPUART_UserCallback, self);
LPUART_TransferStartRingBuffer(self->uart, &self->handle, self->rbuf.buf, self->rbuf.size);
// Pass actual allocated size; the LPUART routines are cognizant that
// the capacity is one less than the size.
LPUART_TransferStartRingBuffer(self->uart, &self->handle, self->ringbuf, receiver_buffer_size + 1);

claim_pin(self->rx_pin->pin);
}
Expand All @@ -223,9 +226,7 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) {

LPUART_Deinit(self->uart);

gc_free(self->rbuf.buf);
self->rbuf.size = 0;
self->rbuf.iput = self->rbuf.iget = 0;
gc_free(self->ringbuf);

// reset_pin_number(self->rx_pin);
// reset_pin_number(self->tx_pin);
Expand Down
2 changes: 1 addition & 1 deletion ports/mimxrt10xx/common-hal/busio/UART.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ typedef struct {
mp_obj_base_t base;
LPUART_Type *uart;
lpuart_handle_t handle;
ringbuf_t rbuf;
uint8_t* ringbuf;
bool rx_ongoing;
uint32_t baudrate;
uint8_t character_bits;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ EXTERNAL_FLASH_DEVICES = "GD25Q16C"

# Allocate two, not just one I2C peripheral for CPB, so that we have both
# on-board and off-board I2C available.
# When SPIM3 becomes available we'll be able to have two I2C and two SPI peripherals.
# We use a CFLAGS define here because there are include order issues
# if we try to include "mpconfigport.h" into nrfx_config.h .
CFLAGS += -DCIRCUITPY_NRF_NUM_I2C=2
2 changes: 2 additions & 0 deletions ports/nrf/common-hal/_bleio/Characteristic.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ size_t common_hal_bleio_characteristic_get_value(bleio_characteristic_obj_t *sel
// self->value is set by evt handler.
return common_hal_bleio_gattc_read(self->handle, conn_handle, buf, len);
} else {
// conn_handle is ignored for non-system attributes.
return common_hal_bleio_gatts_read(self->handle, conn_handle, buf, len);
}
}
Expand All @@ -152,6 +153,7 @@ void common_hal_bleio_characteristic_set_value(bleio_characteristic_obj_t *self,
(self->props & CHAR_PROP_WRITE_NO_RESPONSE));
} else {
// Always write the value locally even if no connections are active.
// conn_handle is ignored for non-system attributes, so we use BLE_CONN_HANDLE_INVALID.
common_hal_bleio_gatts_write(self->handle, BLE_CONN_HANDLE_INVALID, bufinfo);
// Check to see if we need to notify or indicate any active connections.
for (size_t i = 0; i < BLEIO_TOTAL_CONNECTION_COUNT; i++) {
Expand Down
Loading