Merge pull request #2576 from oshwabadge2020/ohs2020-badge-new

Ohs2020 badge updates
This commit is contained in:
Limor "Ladyada" Fried 2020-02-03 11:48:11 -05:00 committed by GitHub
commit 97de075f12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 8 deletions

View File

@ -40,7 +40,7 @@ displayio_fourwire_obj_t board_display_obj;
uint8_t display_init_sequence[] = {
0x01, 0 | DELAY, 150, // SWRESET
0x11, 0 | DELAY, 255, // SLPOUT
0x36, 1, 0x00, // _MADCTL bottom to top refresh in vsync aligned order.
0x36, 1, 0b10100000, // _MADCTL bottom to top refresh in vsync aligned order.
0x3a, 1, 0x55, // COLMOD - 16bit color
0x21, 0 | DELAY, 10, // _INVON
0x13, 0 | DELAY, 10, // _NORON
@ -49,7 +49,7 @@ uint8_t display_init_sequence[] = {
void board_init(void) {
busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
common_hal_busio_spi_construct(spi, &pin_P0_14, &pin_P0_15, mp_const_none);
common_hal_busio_spi_construct(spi, &pin_P0_11, &pin_P0_12, mp_const_none);
common_hal_busio_spi_never_reset(spi);
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
@ -67,9 +67,9 @@ void board_init(void) {
bus,
240, // Width (after rotation)
240, // Height (after rotation)
0, // column start
80, // column start
0, // row start
270, // rotation
0, // rotation
16, // Color depth
false, // Grayscale
false, // Pixels in a byte share a row. Only used for depth < 8
@ -81,7 +81,7 @@ void board_init(void) {
0x37, // set vertical scroll command
display_init_sequence,
sizeof(display_init_sequence),
&pin_P0_02, // backlight pin
NULL, // backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness (ignored)
true, // auto_brightness

View File

@ -32,8 +32,8 @@
#define MICROPY_HW_MCU_NAME "nRF52840"
#if QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 22)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(1, 0)
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(1, 0)
#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 22)
#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 20)
#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(1, 2)
#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(1, 1)

View File

@ -7,4 +7,4 @@ MCU_CHIP = nrf52840
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ"
EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ"

View File

@ -1,4 +1,5 @@
#include "shared-bindings/board/__init__.h"
#include "shared-module/displayio/__init__.h"
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_25) },
@ -11,8 +12,13 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_P0_11) },
{ MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_P0_12) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P1_14) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P1_15) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_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);