Skip to content

Commit e6b4565

Browse files
committed
Add module and empty parallelbus
1 parent 012b3bd commit e6b4565

File tree

3 files changed

+107
-0
lines changed

3 files changed

+107
-0
lines changed
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) 2019 Lucian Copeland for Adafruit Industries
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) 2019 Lucian Copeland for Adafruit Industries
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_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELBUS_H
28+
#define MICROPY_INCLUDED_STM32F4_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_STM32F4_COMMON_HAL_DISPLAYIO_PARALLELBUS_H

ports/stm32f4/mpconfigport.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ ifndef CIRCUITPY_NEOPIXEL_WRITE
6565
CIRCUITPY_NEOPIXEL_WRITE = 1
6666
endif
6767

68+
ifndef
69+
CIRCUITPY_DISPLAYIO = 1
70+
endif
6871

6972
#ifeq ($(MCU_SUB_VARIANT), stm32f412zx)
7073
#endif

0 commit comments

Comments
 (0)