Calliope/calliope_mini/__init__.py

changeset 10
f34fe5abe069
equal deleted inserted replaced
9:843f5ea906d7 10:f34fe5abe069
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2020 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module containing stubs for API generation of the 'calliope_mini' module.
8 """
9
10 def panic(code):
11 pass
12
13 def reset():
14 pass
15
16 def sleep(ms):
17 pass
18
19 def running_time():
20 pass
21
22 def temperature():
23 pass
24
25 ######################################################################
26
27 class MicroBitButton():
28 def is_pressed(self):
29 pass
30
31 def was_pressed(self):
32 pass
33
34 def get_presses(self):
35 pass
36
37 button_a = MicroBitButton()
38 button_b = MicroBitButton()
39
40 ######################################################################
41
42 class MicroBitDigitalPin():
43 PULL_UP = 0
44 PULL_DOWN = 1
45 NO_PULL = 2
46
47 def read_digital(self):
48 pass
49
50 def write_digital(self, value):
51 pass
52
53 def write_analog(self, value):
54 pass
55
56 def set_analog_period(self, period):
57 pass
58
59 def set_analog_period_microseconds(self, period):
60 pass
61
62 def get_analog_period_microseconds(self):
63 pass
64
65 def set_pull(self, mode):
66 pass
67
68 def get_pull(self):
69 pass
70
71 def get_mode(self):
72 pass
73
74 class MicroBitAnalogDigitalPin():
75 PULL_UP = 0
76 PULL_DOWN = 1
77 NO_PULL = 2
78
79 def read_digital(self):
80 pass
81
82 def write_digital(self, value):
83 pass
84
85 def write_analog(self, value):
86 pass
87
88 def read_analog(self):
89 pass
90
91 def set_analog_period(self, period):
92 pass
93
94 def set_analog_period_microseconds(self, period):
95 pass
96
97 def set_pull(self, mode):
98 pass
99
100 def get_pull(self):
101 pass
102
103 def get_mode(self):
104 pass
105
106 class MicroBitTouchPin():
107 PULL_UP = 0
108 PULL_DOWN = 1
109 NO_PULL = 2
110
111 def read_digital(self):
112 pass
113
114 def write_digital(self, value):
115 pass
116
117 def write_analog(self, value):
118 pass
119
120 def read_analog(self):
121 pass
122
123 def set_analog_period(self, period):
124 pass
125
126 def set_analog_period_microseconds(self, period):
127 pass
128
129 def is_touched(self):
130 pass
131
132 def set_pull(self, mode):
133 pass
134
135 def get_pull(self):
136 pass
137
138 def get_mode(self):
139 pass
140
141 pin0 = MicroBitTouchPin() # Pad 0
142 pin1 = MicroBitTouchPin() # Pad 1
143 pin2 = MicroBitTouchPin() # Pad 2
144 pin3 = MicroBitAnalogDigitalPin() # Column 1
145 pin4 = MicroBitAnalogDigitalPin() # Column 2
146 pin5 = MicroBitDigitalPin() # Button A
147 pin6 = MicroBitDigitalPin() # Row 2
148 pin7 = MicroBitDigitalPin() # Row 1
149 pin8 = MicroBitDigitalPin() #
150 pin9 = MicroBitDigitalPin() # Row 3
151 pin10 = MicroBitAnalogDigitalPin() # Column 3
152 pin11 = MicroBitDigitalPin() # Button B
153 pin12 = MicroBitDigitalPin() #
154 pin13 = MicroBitDigitalPin() # SPI MOSI
155 pin14 = MicroBitDigitalPin() # SPI MISO
156 pin15 = MicroBitDigitalPin() # SPI SCK
157 pin16 = MicroBitDigitalPin() #
158 pin19 = MicroBitDigitalPin() # I2C SCL
159 pin20 = MicroBitDigitalPin() # I2C SDA
160 pin21 = MicroBitDigitalPin()
161 pin22 = MicroBitDigitalPin()
162 pin23 = MicroBitDigitalPin()
163 pin24 = MicroBitDigitalPin()
164 pin25 = MicroBitDigitalPin()
165 pin26 = MicroBitDigitalPin()
166 pin27 = MicroBitDigitalPin()
167 pin28 = MicroBitDigitalPin()
168 pin29 = MicroBitDigitalPin()
169 pin30 = MicroBitDigitalPin()
170
171 p0 = MicroBitTouchPin() # Pad 0
172 p1 = MicroBitTouchPin() # Pad 1
173 p2 = MicroBitTouchPin() # Pad 2
174 p3 = MicroBitDigitalPin() # Pin 22
175
176 c0 = MicroBitTouchPin() # Pad 0
177 c1 = MicroBitTouchPin() # Pad 1
178 c2 = MicroBitTouchPin() # Pad 2
179 c3 = MicroBitDigitalPin() # Pin 22
180 c4 = MicroBitAnalogDigitalPin() # Column 2
181 c5 = MicroBitDigitalPin() # Button A
182 c6 = MicroBitDigitalPin() # Row 2
183 c7 = MicroBitDigitalPin() # Row 1
184 c8 = MicroBitDigitalPin() #
185 c9 = MicroBitDigitalPin() # Row 3
186 c10 = MicroBitAnalogDigitalPin() # Column 3
187 c11 = MicroBitDigitalPin() # Button B
188 c12 = MicroBitDigitalPin() #
189 c16 = MicroBitDigitalPin()
190 c17 = MicroBitDigitalPin()
191 c18 = MicroBitDigitalPin()
192 c19 = MicroBitDigitalPin()
193 c21 = MicroBitAnalogDigitalPin() # Column 1
194
195 ######################################################################
196
197 class Image():
198 HEART = Image()
199 HEART_SMALL = Image()
200 HAPPY = Image()
201 SMILE = Image()
202 SAD = Image()
203 CONFUSED = Image()
204 ANGRY = Image()
205 ASLEEP = Image()
206 SURPRISED = Image()
207 SILLY = Image()
208 FABULOUS = Image()
209 MEH = Image()
210 YES = Image()
211 NO = Image()
212 CLOCK12 = Image()
213 CLOCK11 = Image()
214 CLOCK10 = Image()
215 CLOCK9 = Image()
216 CLOCK8 = Image()
217 CLOCK7 = Image()
218 CLOCK6 = Image()
219 CLOCK5 = Image()
220 CLOCK4 = Image()
221 CLOCK3 = Image()
222 CLOCK2 = Image()
223 CLOCK1 = Image()
224 ARROW_N = Image()
225 ARROW_NE = Image()
226 ARROW_E = Image()
227 ARROW_SE = Image()
228 ARROW_S = Image()
229 ARROW_SW = Image()
230 ARROW_W = Image()
231 ARROW_NW = Image()
232 TRIANGLE = Image()
233 TRIANGLE_LEFT = Image()
234 CHESSBOARD = Image()
235 DIAMOND = Image()
236 DIAMOND_SMALL = Image()
237 SQUARE = Image()
238 SQUARE_SMALL = Image()
239 RABBIT = Image()
240 COW = Image()
241 MUSIC_CROTCHET = Image()
242 MUSIC_QUAVER = Image()
243 MUSIC_QUAVERS = Image()
244 PITCHFORK = Image()
245 XMAS = Image()
246 PACMAN = Image()
247 TARGET = Image()
248 TSHIRT = Image()
249 ROLLERSKATE = Image()
250 DUCK = Image()
251 HOUSE = Image()
252 TORTOISE = Image()
253 BUTTERFLY = Image()
254 STICKFIGURE = Image()
255 GHOST = Image()
256 SWORD = Image()
257 GIRAFFE = Image()
258 SKULL = Image()
259 UMBRELLA = Image()
260 SNAKE = Image()
261
262 def __init__(self, stringOrWidth=None, height=None, buffer=None):
263 pass
264
265 def width(self):
266 pass
267
268 def height(self):
269 pass
270
271 def set_pixel(self, x, y, value):
272 pass
273
274 def get_pixel(self, x, y):
275 pass
276
277 def shift_left(self, n):
278 pass
279
280 def shift_right(self, n):
281 pass
282
283 def shift_up(self, n):
284 pass
285
286 def shift_down(self, n):
287 pass
288
289 def crop(self, x, y, width, height):
290 pass
291
292 def copy(self):
293 pass
294
295 def invert(self):
296 pass
297
298 def fill(self, value):
299 pass
300
301 def blit(self, src, x, y, width, height, xdest=0, ydest=0):
302 pass

eric ide

mercurial