diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-08-23 15:27:21 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-08-23 15:27:21 -0700 |
| commit | 7324b70a7c231a20be971ed81050c8359b87aaab (patch) | |
| tree | 2c301a419a247aa64c8d3fafab6b4b3bfacf7af0 /shared-bindings/displayio/__init__.h | |
| parent | b992ca80e77ccd95397ed0f12063c30f6161e08f (diff) | |
Rework based on Dan's review
Diffstat (limited to 'shared-bindings/displayio/__init__.h')
| -rw-r--r-- | shared-bindings/displayio/__init__.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/shared-bindings/displayio/__init__.h b/shared-bindings/displayio/__init__.h index 427ddb47d..122b1fbcb 100644 --- a/shared-bindings/displayio/__init__.h +++ b/shared-bindings/displayio/__init__.h @@ -27,6 +27,25 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H #define MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H +#include "py/obj.h" + +typedef enum { + DISPLAY_COMMAND, + DISPLAY_DATA +} display_byte_type_t; + + +typedef enum { + CHIP_SELECT_UNTOUCHED, + CHIP_SELECT_TOGGLE_EVERY_BYTE +} display_chip_select_behavior_t; + +typedef bool (*display_bus_bus_reset)(mp_obj_t bus); +typedef bool (*display_bus_bus_free)(mp_obj_t bus); +typedef bool (*display_bus_begin_transaction)(mp_obj_t bus); +typedef void (*display_bus_send)(mp_obj_t bus, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length); +typedef void (*display_bus_end_transaction)(mp_obj_t bus); + void common_hal_displayio_release_displays(void); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO___INIT___H |
