8000 Merge pull request #2642 from arturo182/imx_displayio · adafruit/circuitpython@a5b7a12 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a5b7a12

Browse files
authored
Merge pull request #2642 from arturo182/imx_displayio
mimxrt10xx: Enable displayio
2 parents 4552aff + feac879 commit a5b7a12

File tree

5 files changed

+109
-3
lines changed

5 files changed

+109
-3
lines changed

ports/mimxrt10xx/background.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
#include "supervisor/linker.h"
3838
#include "supervisor/shared/stack.h"
3939

40-
// TODO
4140
#ifdef CIRCUITPY_DISPLAYIO
42-
//#include "shared-module/displayio/__init__.h"
41+
#include "shared-module/displayio/__init__.h"
4342
#endif
4443

4544
volatile uint64_t last_finished_tick = 0;
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2020 Artur Pacholec
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
#include "shared-bindings/displayio/ParallelBus.h"
28+
29+
#include <stdint.h>
30+
31+
#include "common-hal/microcontroller/Pin.h"
32+
#include "py/runtime.h"
33+
#include "shared-bindings/digitalio/DigitalInOut.h"
34+
#include "shared-bindings/microcontroller/__init__.h"
35+
36+
#include "tick.h"
37+
38+
void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self,
39+
const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select,
40+
const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) {
41+
42+
mp_raise_NotImplementedError(translate("ParallelBus not yet supported"));
43+
}
44+
45+
void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) {
46+
47+
}
48+
49+
bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) {
50+
return false;
51+
}
52+
53+
bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) {
54+
return false;
55+
}
56+
57+
bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
58+
59+
return false;
60+
}
61+
62+
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) {
63+
64+
}
65+
66+
void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) {
67+
68+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* This file is part of the MicroPython project, http://micropython.org/
3+
*
4+
* The MIT License (MIT)
5+
*
6+
* Copyright (c) 2020 Artur Pacholec
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in
16+
* all copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24+
* THE SOFTWARE.
25+
*/
26+
27+
#ifndef MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELBUS_H
28+
#define MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELBUS_H
29+
30+
#include "common-hal/digitalio/DigitalInOut.h"
31+
32+
typedef struct {
33+
mp_obj_base_t base;
34+
} displayio_parallelbus_obj_t;
35+
36+
#endif // MICROPY_INCLUDED_MIMXRT10XX_COMMON_HAL_DISPLAYIO_PARALLELBUS_H

ports/mimxrt10xx/common-hal/microcontroller/Pin.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,7 @@ bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t* pin) {
224224
void common_hal_reset_pin(const mcu_pin_obj_t* pin) {
225225
// reset_pin_number(pin->number);
226226
}
227+
228+
void common_hal_never_reset_pin(const mcu_pin_obj_t* pin) {
229+
// never_reset_pin_number(pin->port, pin->number);
230+
}

ports/mimxrt10xx/mpconfigport.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ USB_MSC_MAX_PACKET_SIZE = 512
2020

2121
INTERNAL_FLASH_FILESYSTEM = 1
2222

23-
CIRCUITPY_DISPLAYIO = 0
2423
CIRCUITPY_AUDIOIO = 0
2524
CIRCUITPY_AUDIOBUSIO = 0
2625
CIRCUITPY_FREQUENCYIO = 0

0 commit comments

Comments
 (0)
0