Update board inits for new api.
This commit is contained in:
parent
4013bcde9e
commit
2dddccb99e
|
@ -74,12 +74,12 @@ void board_init(void) {
|
|||
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
|
||||
bus->base.type = &displayio_fourwire_type;
|
||||
busio_spi_obj_t *spi = common_hal_board_create_spi();
|
||||
common_hal_busio_spi_configure(spi, 12000000, 0, 0, 8);
|
||||
common_hal_displayio_fourwire_construct(bus,
|
||||
spi,
|
||||
&pin_PA28, // Command or data
|
||||
&pin_PA01, // Chip select
|
||||
&pin_PA27); // Reset
|
||||
&pin_PA27, // Reset
|
||||
12000000);
|
||||
|
||||
displayio_display_obj_t* display = &displays[0].display;
|
||||
display->base.type = &displayio_display_type;
|
||||
|
|
|
@ -73,7 +73,6 @@ void board_init(void) {
|
|||
busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
|
||||
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL);
|
||||
common_hal_busio_spi_never_reset(spi);
|
||||
common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8);
|
||||
|
||||
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
|
||||
bus->base.type = &displayio_fourwire_type;
|
||||
|
@ -81,7 +80,8 @@ void board_init(void) {
|
|||
spi,
|
||||
&pin_PB05, // TFT_DC Command or data
|
||||
&pin_PB07, // TFT_CS Chip select
|
||||
&pin_PA00); // TFT_RST Reset
|
||||
&pin_PA00, // TFT_RST Reset
|
||||
60000000);
|
||||
|
||||
displayio_display_obj_t* display = &displays[0].display;
|
||||
display->base.type = &displayio_display_type;
|
||||
|
|
|
@ -51,7 +51,6 @@ void board_init(void) {
|
|||
busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
|
||||
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL);
|
||||
common_hal_busio_spi_never_reset(spi);
|
||||
common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8);
|
||||
|
||||
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
|
||||
bus->base.type = &displayio_fourwire_type;
|
||||
|
@ -59,7 +58,8 @@ void board_init(void) {
|
|||
spi,
|
||||
&pin_PB05, // TFT_DC Command or data
|
||||
&pin_PB06, // TFT_CS Chip select
|
||||
&pin_PB07); // TFT_RST Reset
|
||||
&pin_PB07, // TFT_RST Reset
|
||||
60000000);
|
||||
|
||||
displayio_display_obj_t* display = &displays[0].display;
|
||||
display->base.type = &displayio_display_type;
|
||||
|
|
|
@ -73,7 +73,6 @@ void board_init(void) {
|
|||
busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
|
||||
common_hal_busio_spi_construct(spi, &pin_PB13, &pin_PB15, NULL);
|
||||
common_hal_busio_spi_never_reset(spi);
|
||||
common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8);
|
||||
|
||||
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
|
||||
bus->base.type = &displayio_fourwire_type;
|
||||
|
@ -81,7 +80,8 @@ void board_init(void) {
|
|||
spi,
|
||||
&pin_PB05, // TFT_DC Command or data
|
||||
&pin_PB12, // TFT_CS Chip select
|
||||
&pin_PA00); // TFT_RST Reset
|
||||
&pin_PA00, // TFT_RST Reset
|
||||
60000000);
|
||||
|
||||
displayio_display_obj_t* display = &displays[0].display;
|
||||
display->base.type = &displayio_display_type;
|
||||
|
|
|
@ -74,12 +74,12 @@ void board_init(void) {
|
|||
displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
|
||||
bus->base.type = &displayio_fourwire_type;
|
||||
busio_spi_obj_t *spi = common_hal_board_create_spi();
|
||||
common_hal_busio_spi_configure(spi, 24000000, 0, 0, 8);
|
||||
common_hal_displayio_fourwire_construct(bus,
|
||||
spi,
|
||||
&pin_PA09, // Command or data
|
||||
&pin_PA08, // Chip select
|
||||
NULL); // Reset
|
||||
NULL, // Reset
|
||||
24000000);
|
||||
|
||||
displayio_display_obj_t* display = &displays[0].display;
|
||||
display->base.type = &displayio_display_type;
|
||||
|
|
Loading…
Reference in New Issue