Merge branch 'adafruit:main' into main
This commit is contained in:
commit
44e9e6464c
@ -628,7 +628,7 @@ msgid "Below minimum frame rate"
|
||||
msgstr ""
|
||||
|
||||
#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c
|
||||
msgid "Bit clock and word select must be sequential pins"
|
||||
msgid "Bit clock and word select must be sequential GPIO pins"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
|
||||
@ -1100,8 +1100,6 @@ msgstr ""
|
||||
msgid "Generic Failure"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
#: shared-bindings/displayio/EPaperDisplay.c
|
||||
#: shared-bindings/framebufferio/FramebufferDisplay.c
|
||||
#: shared-module/displayio/Display.c
|
||||
#: shared-module/framebufferio/FramebufferDisplay.c
|
||||
|
728
locale/cs.po
728
locale/cs.po
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2023-09-10 08:50+0000\n"
|
||||
"PO-Revision-Date: 2023-10-13 20:08+0000\n"
|
||||
"Last-Translator: xXx <xxx_xxx_xxxxxxxxx@mail.ru>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: ru\n"
|
||||
@ -16,7 +16,7 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
||||
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
|
||||
"X-Generator: Weblate 5.0.1-dev\n"
|
||||
"X-Generator: Weblate 5.1-dev\n"
|
||||
|
||||
#: main.c
|
||||
msgid ""
|
||||
@ -213,7 +213,7 @@ msgstr "%q должно быть <= %d"
|
||||
|
||||
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
|
||||
msgid "%q must be <= %u"
|
||||
msgstr ""
|
||||
msgstr "%q должно быть <= %u"
|
||||
|
||||
#: py/argcheck.c
|
||||
msgid "%q must be >= %d"
|
||||
|
@ -7,7 +7,7 @@ msgstr ""
|
||||
"Project-Id-Version: circuitpython-cn\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
|
||||
"PO-Revision-Date: 2023-09-13 17:49+0000\n"
|
||||
"PO-Revision-Date: 2023-10-13 20:08+0000\n"
|
||||
"Last-Translator: hexthat <hexthat@gmail.com>\n"
|
||||
"Language-Team: Chinese Hanyu Pinyin\n"
|
||||
"Language: zh_Latn_pinyin\n"
|
||||
@ -15,7 +15,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 5.0.1-dev\n"
|
||||
"X-Generator: Weblate 5.1-dev\n"
|
||||
|
||||
#: main.c
|
||||
msgid ""
|
||||
@ -212,7 +212,7 @@ msgstr "%q bìxū <= %d"
|
||||
|
||||
#: ports/espressif/common-hal/watchdog/WatchDogTimer.c
|
||||
msgid "%q must be <= %u"
|
||||
msgstr ""
|
||||
msgstr "%q bì xū <= %u"
|
||||
|
||||
#: py/argcheck.c
|
||||
msgid "%q must be >= %d"
|
||||
|
106
ports/espressif/boards/m5stack_atoms3/board.c
Normal file
106
ports/espressif/boards/m5stack_atoms3/board.c
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "supervisor/board.h"
|
||||
#include "mpconfigboard.h"
|
||||
#include "shared-bindings/busio/SPI.h"
|
||||
#include "shared-bindings/displayio/FourWire.h"
|
||||
#include "shared-bindings/microcontroller/Pin.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
#include "shared-module/displayio/mipi_constants.h"
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
|
||||
displayio_fourwire_obj_t board_display_obj;
|
||||
|
||||
#define DELAY 0x80
|
||||
|
||||
// display init sequence according to ST7789
|
||||
uint8_t display_init_sequence[] = {
|
||||
0x01, 0 | DELAY, 0x96, // _SWRESET and Delay 150ms
|
||||
0x11, 0 | DELAY, 0xff, // _SLPOUT and Delay 500ms
|
||||
0x3A, 1 | DELAY, 0x55, 0x0a, // _COLMOD and Delay 10ms
|
||||
0x36, 0x01, 0x08, // _MADCTL
|
||||
0x21, 0x80, 0x0A, // _INVON Hack and Delay 10ms
|
||||
0x13, 0x80, 0x0A, // _NORON and Delay 10ms
|
||||
0x36, 0x01, 0xC0, // _MADCTL
|
||||
0x29, 0 | DELAY, 0xff // _DISPON and Delay 500ms
|
||||
};
|
||||
|
||||
|
||||
void board_init(void) {
|
||||
displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
|
||||
// busio_spi_obj_t *spi = common_hal_board_create_spi(0);
|
||||
busio_spi_obj_t *spi = &bus->inline_bus;
|
||||
common_hal_busio_spi_construct(spi, &pin_GPIO17, &pin_GPIO21, NULL, false);
|
||||
common_hal_busio_spi_never_reset(spi);
|
||||
bus->base.type = &displayio_fourwire_type;
|
||||
|
||||
common_hal_displayio_fourwire_construct(
|
||||
bus,
|
||||
spi,
|
||||
&pin_GPIO33, // DC
|
||||
&pin_GPIO15, // CS
|
||||
&pin_GPIO34, // RST
|
||||
40000000, // baudrate
|
||||
0, // polarity
|
||||
0 // phase
|
||||
);
|
||||
displayio_display_obj_t *display = &allocate_display()->display;
|
||||
display->base.type = &displayio_display_type;
|
||||
|
||||
common_hal_displayio_display_construct(
|
||||
display,
|
||||
bus,
|
||||
128, // width (after rotation)
|
||||
128, // height (after rotation)
|
||||
2, // column start
|
||||
1, // row start
|
||||
0, // rotation
|
||||
16, // color depth
|
||||
false, // grayscale
|
||||
false, // pixels in a byte share a row. Only valid for depths < 8
|
||||
1, // bytes per cell. Only valid for depths < 8
|
||||
false, // reverse_pixels_in_byte. Only valid for depths < 8
|
||||
true, // reverse_pixels_in_word
|
||||
MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command
|
||||
MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command
|
||||
MIPI_COMMAND_WRITE_MEMORY_START, // write memory command
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_GPIO16, // backlight pin
|
||||
NO_BRIGHTNESS_COMMAND,
|
||||
1.0f, // brightness
|
||||
false, // single_byte_bounds
|
||||
false, // data_as_commands
|
||||
true, // auto_refresh
|
||||
60, // native_frames_per_second
|
||||
true, // backlight_on_high
|
||||
false, // SH1107_addressing
|
||||
200 // backlight pwm frequency
|
||||
);
|
||||
}
|
||||
|
||||
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
|
39
ports/espressif/boards/m5stack_atoms3/mpconfigboard.h
Normal file
39
ports/espressif/boards/m5stack_atoms3/mpconfigboard.h
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* This file is part of the MicroPython project, http://micropython.org/
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// Micropython setup
|
||||
|
||||
#define MICROPY_HW_BOARD_NAME "M5Stack AtomS3"
|
||||
#define MICROPY_HW_MCU_NAME "ESP32S3"
|
||||
|
||||
// #define MICROPY_HW_NEOPIXEL (&pin_GPIO35)
|
||||
|
||||
#define CIRCUITPY_BOARD_I2C (2)
|
||||
#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO39, .sda = &pin_GPIO38}, \
|
||||
{.scl = &pin_GPIO1, .sda = &pin_GPIO2}}
|
||||
|
||||
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO17)
|
||||
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO21)
|
11
ports/espressif/boards/m5stack_atoms3/mpconfigboard.mk
Normal file
11
ports/espressif/boards/m5stack_atoms3/mpconfigboard.mk
Normal file
@ -0,0 +1,11 @@
|
||||
USB_VID = 0x303A
|
||||
USB_PID = 0x8120
|
||||
USB_PRODUCT = "M5Stack AtomS3"
|
||||
USB_MANUFACTURER = "M5Stack"
|
||||
|
||||
IDF_TARGET = esp32s3
|
||||
|
||||
CIRCUITPY_ESP_FLASH_MODE = qio
|
||||
CIRCUITPY_ESP_FLASH_FREQ = 80m
|
||||
CIRCUITPY_ESP_FLASH_SIZE = 8MB
|
||||
CIRCUITPY_ESPCAMERA = 0
|
53
ports/espressif/boards/m5stack_atoms3/pins.c
Normal file
53
ports/espressif/boards/m5stack_atoms3/pins.c
Normal file
@ -0,0 +1,53 @@
|
||||
#include "shared-bindings/board/__init__.h"
|
||||
#include "shared-module/displayio/__init__.h"
|
||||
|
||||
CIRCUITPY_BOARD_BUS_SINGLETON(porta_i2c, i2c, 1)
|
||||
|
||||
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
||||
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO1) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO1) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO2) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO2) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO5) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO6) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO7) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO8) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_GPIO39) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IMU_SCL), MP_ROM_PTR(&pin_GPIO39) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_GPIO38) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_IMU_SDA), MP_ROM_PTR(&pin_GPIO38) },
|
||||
|
||||
// lcd spi bus
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO21) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_CLK), MP_ROM_PTR(&pin_GPIO17) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_DC), MP_ROM_PTR(&pin_GPIO33) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO34) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_LCD_BL), MP_ROM_PTR(&pin_GPIO16) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_BTN), MP_ROM_PTR(&pin_GPIO41) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_IR_LED), MP_ROM_PTR(&pin_GPIO4) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_porta_i2c_obj) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}
|
||||
};
|
||||
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
|
15
ports/espressif/boards/m5stack_atoms3/sdkconfig
Normal file
15
ports/espressif/boards/m5stack_atoms3/sdkconfig
Normal file
@ -0,0 +1,15 @@
|
||||
#
|
||||
# Espressif IoT Development Framework Configuration
|
||||
#
|
||||
#
|
||||
# Component config
|
||||
#
|
||||
#
|
||||
# LWIP
|
||||
#
|
||||
CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3"
|
||||
# end of LWIP
|
||||
|
||||
# end of Component config
|
||||
|
||||
# end of Espressif IoT Development Framework Configuration
|
@ -108,7 +108,7 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self,
|
||||
mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_main_clock);
|
||||
}
|
||||
if (bit_clock->number != word_select->number - 1) {
|
||||
mp_raise_ValueError(translate("Bit clock and word select must be sequential pins"));
|
||||
mp_raise_ValueError(translate("Bit clock and word select must be sequential GPIO pins"));
|
||||
}
|
||||
|
||||
const uint16_t *program = i2s_program;
|
||||
|
Loading…
Reference in New Issue
Block a user