forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.c
More file actions
42 lines (34 loc) · 1.41 KB
/
__init__.c
File metadata and controls
42 lines (34 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2018 Rose Hooper
//
// SPDX-License-Identifier: MIT
#include "py/obj.h"
#include "py/mphal.h"
#include "py/runtime.h"
#include "py/objproperty.h"
#include "shared-bindings/_pixelmap/__init__.h"
#include "shared-bindings/_pixelmap/PixelMap.h"
//| """A fast pixel mapping library
//|
//| The `_pixelmap` module provides the :py:class:`PixelMap` class to accelerate
//| RGB(W) strip/matrix manipulation, such as DotStar and Neopixel."""
//|
//| # The types accepted when getting a pixel value
//| PixelReturnType = Union[
//| Tuple[int, int, int], Tuple[int, int, int, int], Tuple[int, int, int, float]
//| ]
//| PixelReturnSequence = Tuple[PixelReturnType]
//| # The types returned when getting a pixel value
//| PixelType = Union[int, PixelReturnType]
//| PixelSequence = Union[Tuple[PixelType], List[PixelType]]
static const mp_rom_map_elem_t pixelmap_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR__pixelmap) },
{ MP_ROM_QSTR(MP_QSTR_PixelMap), MP_ROM_PTR(&pixelmap_pixelmap_type) },
};
static MP_DEFINE_CONST_DICT(pixelmap_module_globals, pixelmap_module_globals_table);
const mp_obj_module_t pixelmap_module = {
.base = { &mp_type_module },
.globals = (mp_obj_dict_t *)&pixelmap_module_globals,
};
MP_REGISTER_MODULE(MP_QSTR__pixelmap, pixelmap_module);