Merge pull request #2576 from oshwabadge2020/ohs2020-badge-new
Ohs2020 badge updates
This commit is contained in:
commit
97de075f12
|
@ -40,7 +40,7 @@ displayio_fourwire_obj_t board_display_obj;
|
||||||
uint8_t display_init_sequence[] = {
|
uint8_t display_init_sequence[] = {
|
||||||
0x01, 0 | DELAY, 150, // SWRESET
|
0x01, 0 | DELAY, 150, // SWRESET
|
||||||
0x11, 0 | DELAY, 255, // SLPOUT
|
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
|
0x3a, 1, 0x55, // COLMOD - 16bit color
|
||||||
0x21, 0 | DELAY, 10, // _INVON
|
0x21, 0 | DELAY, 10, // _INVON
|
||||||
0x13, 0 | DELAY, 10, // _NORON
|
0x13, 0 | DELAY, 10, // _NORON
|
||||||
|
@ -49,7 +49,7 @@ uint8_t display_init_sequence[] = {
|
||||||
|
|
||||||
void board_init(void) {
|
void board_init(void) {
|
||||||
busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
|
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);
|
common_hal_busio_spi_never_reset(spi);
|
||||||
|
|
||||||
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
|
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
|
||||||
|
@ -67,9 +67,9 @@ void board_init(void) {
|
||||||
bus,
|
bus,
|
||||||
240, // Width (after rotation)
|
240, // Width (after rotation)
|
||||||
240, // Height (after rotation)
|
240, // Height (after rotation)
|
||||||
0, // column start
|
80, // column start
|
||||||
0, // row start
|
0, // row start
|
||||||
270, // rotation
|
0, // rotation
|
||||||
16, // Color depth
|
16, // Color depth
|
||||||
false, // Grayscale
|
false, // Grayscale
|
||||||
false, // Pixels in a byte share a row. Only used for depth < 8
|
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
|
0x37, // set vertical scroll command
|
||||||
display_init_sequence,
|
display_init_sequence,
|
||||||
sizeof(display_init_sequence),
|
sizeof(display_init_sequence),
|
||||||
&pin_P0_02, // backlight pin
|
NULL, // backlight pin
|
||||||
NO_BRIGHTNESS_COMMAND,
|
NO_BRIGHTNESS_COMMAND,
|
||||||
1.0f, // brightness (ignored)
|
1.0f, // brightness (ignored)
|
||||||
true, // auto_brightness
|
true, // auto_brightness
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#define MICROPY_HW_MCU_NAME "nRF52840"
|
#define MICROPY_HW_MCU_NAME "nRF52840"
|
||||||
|
|
||||||
#if QSPI_FLASH_FILESYSTEM
|
#if QSPI_FLASH_FILESYSTEM
|
||||||
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 22)
|
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(1, 0)
|
||||||
#define MICROPY_QSPI_DATA1 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_DATA2 NRF_GPIO_PIN_MAP(0, 20)
|
||||||
#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(1, 2)
|
#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(1, 2)
|
||||||
#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(1, 1)
|
#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(1, 1)
|
||||||
|
|
|
@ -7,4 +7,4 @@ MCU_CHIP = nrf52840
|
||||||
|
|
||||||
QSPI_FLASH_FILESYSTEM = 1
|
QSPI_FLASH_FILESYSTEM = 1
|
||||||
EXTERNAL_FLASH_DEVICE_COUNT = 1
|
EXTERNAL_FLASH_DEVICE_COUNT = 1
|
||||||
EXTERNAL_FLASH_DEVICES = "W25Q32JV_IQ"
|
EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#include "shared-bindings/board/__init__.h"
|
#include "shared-bindings/board/__init__.h"
|
||||||
|
#include "shared-module/displayio/__init__.h"
|
||||||
|
|
||||||
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
||||||
{ MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_P0_25) },
|
{ 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_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_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_I2C), MP_ROM_PTR(&board_i2c_obj) },
|
||||||
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_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);
|
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
|
||||||
|
|
Loading…
Reference in New Issue