summaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-08-23 15:27:21 -0700
committerScott Shawcroft <scott@tannewt.org>2019-08-23 15:27:21 -0700
commit7324b70a7c231a20be971ed81050c8359b87aaab (patch)
tree2c301a419a247aa64c8d3fafab6b4b3bfacf7af0 /ports
parentb992ca80e77ccd95397ed0f12063c30f6161e08f (diff)
Rework based on Dan's review
Diffstat (limited to 'ports')
-rw-r--r--ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/common-hal/displayio/ParallelBus.c4
-rw-r--r--ports/nrf/common-hal/displayio/ParallelBus.c5
3 files changed, 5 insertions, 6 deletions
diff --git a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h
index 484f3d7b2..fc77520f5 100644
--- a/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h
+++ b/ports/atmel-samd/boards/monster_m4sk/mpconfigboard.h
@@ -27,5 +27,3 @@
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
-
-#define CIRCUITPY_FS_NAME "MONSTERM4SK"
diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c
index e2ce9952b..2479e3b40 100644
--- a/ports/atmel-samd/common-hal/displayio/ParallelBus.c
+++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c
@@ -131,9 +131,9 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
return true;
}
-void common_hal_displayio_parallelbus_send(mp_obj_t obj, bool command, bool toggle_every_byte, uint8_t *data, uint32_t data_length) {
+void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj);
- common_hal_digitalio_digitalinout_set_value(&self->command, !command);
+ common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA);
uint32_t* clear_write = (uint32_t*) &self->write_group->OUTCLR.reg;
uint32_t* set_write = (uint32_t*) &self->write_group->OUTSET.reg;
uint32_t mask = self->write_mask;
diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/displayio/ParallelBus.c
index a8c2b9f73..be4b28a6e 100644
--- a/ports/nrf/common-hal/displayio/ParallelBus.c
+++ b/ports/nrf/common-hal/displayio/ParallelBus.c
@@ -142,9 +142,10 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
return true;
}
-void common_hal_displayio_parallelbus_send(mp_obj_t obj, bool command, bool toggle_every_byte, uint8_t *data, uint32_t data_length) {
+// This ignores chip_select behaviour because data is clocked in by the write line toggling.
+void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj);
- common_hal_digitalio_digitalinout_set_value(&self->command, !command);
+ common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA);
uint32_t* clear_write = (uint32_t*) &self->write_group->OUTCLR;
uint32_t* set_write = (uint32_t*) &self->write_group->OUTSET;
uint32_t mask = self->write_mask;