1 /*
2 * Copyright (c) 2019 Derek Hageman <hageman@inthat.cloud>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7 #ifndef ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_SAM0_EIC_PRIV_H_
8 #define ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_SAM0_EIC_PRIV_H_
9
10 #include <errno.h>
11 #include <zephyr/types.h>
12 #include <soc.h>
13
14 /*
15 * Used in the ASF headers, but not always defined by them (looks like they
16 * sometimes define __L instead).
17 */
18 #ifndef _L
19 #define _L(i) i ## L
20 #endif
21
22 /*
23 * Unfortunately the ASF headers define the EIC mappings somewhat painfully:
24 * the macros have both the port letter and are only defined if that pin
25 * has an EIC channel. So we can't just use a macro expansion here, because
26 * some of them might be undefined for a port and we can't test for another
27 * macro definition inside a macro.
28 */
29 static const uint8_t sam0_eic_channels[PORT_GROUPS][32] = {
30 #if PORT_GROUPS >= 1
31 {
32 #ifdef PIN_PA00A_EIC_EXTINT_NUM
33 PIN_PA00A_EIC_EXTINT_NUM,
34 #else
35 0xFF,
36 #endif
37 #ifdef PIN_PA01A_EIC_EXTINT_NUM
38 PIN_PA01A_EIC_EXTINT_NUM,
39 #else
40 0xFF,
41 #endif
42 #ifdef PIN_PA02A_EIC_EXTINT_NUM
43 PIN_PA02A_EIC_EXTINT_NUM,
44 #else
45 0xFF,
46 #endif
47 #ifdef PIN_PA03A_EIC_EXTINT_NUM
48 PIN_PA03A_EIC_EXTINT_NUM,
49 #else
50 0xFF,
51 #endif
52 #ifdef PIN_PA04A_EIC_EXTINT_NUM
53 PIN_PA04A_EIC_EXTINT_NUM,
54 #else
55 0xFF,
56 #endif
57 #ifdef PIN_PA05A_EIC_EXTINT_NUM
58 PIN_PA05A_EIC_EXTINT_NUM,
59 #else
60 0xFF,
61 #endif
62 #ifdef PIN_PA06A_EIC_EXTINT_NUM
63 PIN_PA06A_EIC_EXTINT_NUM,
64 #else
65 0xFF,
66 #endif
67 #ifdef PIN_PA07A_EIC_EXTINT_NUM
68 PIN_PA07A_EIC_EXTINT_NUM,
69 #else
70 0xFF,
71 #endif
72 #ifdef PIN_PA08A_EIC_EXTINT_NUM
73 PIN_PA08A_EIC_EXTINT_NUM,
74 #else
75 0xFF,
76 #endif
77 #ifdef PIN_PA09A_EIC_EXTINT_NUM
78 PIN_PA09A_EIC_EXTINT_NUM,
79 #else
80 0xFF,
81 #endif
82 #ifdef PIN_PA10A_EIC_EXTINT_NUM
83 PIN_PA10A_EIC_EXTINT_NUM,
84 #else
85 0xFF,
86 #endif
87 #ifdef PIN_PA11A_EIC_EXTINT_NUM
88 PIN_PA11A_EIC_EXTINT_NUM,
89 #else
90 0xFF,
91 #endif
92 #ifdef PIN_PA12A_EIC_EXTINT_NUM
93 PIN_PA12A_EIC_EXTINT_NUM,
94 #else
95 0xFF,
96 #endif
97 #ifdef PIN_PA13A_EIC_EXTINT_NUM
98 PIN_PA13A_EIC_EXTINT_NUM,
99 #else
100 0xFF,
101 #endif
102 #ifdef PIN_PA14A_EIC_EXTINT_NUM
103 PIN_PA14A_EIC_EXTINT_NUM,
104 #else
105 0xFF,
106 #endif
107 #ifdef PIN_PA15A_EIC_EXTINT_NUM
108 PIN_PA15A_EIC_EXTINT_NUM,
109 #else
110 0xFF,
111 #endif
112 #ifdef PIN_PA16A_EIC_EXTINT_NUM
113 PIN_PA16A_EIC_EXTINT_NUM,
114 #else
115 0xFF,
116 #endif
117 #ifdef PIN_PA17A_EIC_EXTINT_NUM
118 PIN_PA17A_EIC_EXTINT_NUM,
119 #else
120 0xFF,
121 #endif
122 #ifdef PIN_PA18A_EIC_EXTINT_NUM
123 PIN_PA18A_EIC_EXTINT_NUM,
124 #else
125 0xFF,
126 #endif
127 #ifdef PIN_PA19A_EIC_EXTINT_NUM
128 PIN_PA19A_EIC_EXTINT_NUM,
129 #else
130 0xFF,
131 #endif
132 #ifdef PIN_PA20A_EIC_EXTINT_NUM
133 PIN_PA20A_EIC_EXTINT_NUM,
134 #else
135 0xFF,
136 #endif
137 #ifdef PIN_PA21A_EIC_EXTINT_NUM
138 PIN_PA21A_EIC_EXTINT_NUM,
139 #else
140 0xFF,
141 #endif
142 #ifdef PIN_PA22A_EIC_EXTINT_NUM
143 PIN_PA22A_EIC_EXTINT_NUM,
144 #else
145 0xFF,
146 #endif
147 #ifdef PIN_PA23A_EIC_EXTINT_NUM
148 PIN_PA23A_EIC_EXTINT_NUM,
149 #else
150 0xFF,
151 #endif
152 #ifdef PIN_PA24A_EIC_EXTINT_NUM
153 PIN_PA24A_EIC_EXTINT_NUM,
154 #else
155 0xFF,
156 #endif
157 #ifdef PIN_PA25A_EIC_EXTINT_NUM
158 PIN_PA25A_EIC_EXTINT_NUM,
159 #else
160 0xFF,
161 #endif
162 #ifdef PIN_PA26A_EIC_EXTINT_NUM
163 PIN_PA26A_EIC_EXTINT_NUM,
164 #else
165 0xFF,
166 #endif
167 #ifdef PIN_PA27A_EIC_EXTINT_NUM
168 PIN_PA27A_EIC_EXTINT_NUM,
169 #else
170 0xFF,
171 #endif
172 #ifdef PIN_PA28A_EIC_EXTINT_NUM
173 PIN_PA28A_EIC_EXTINT_NUM,
174 #else
175 0xFF,
176 #endif
177 #ifdef PIN_PA29A_EIC_EXTINT_NUM
178 PIN_PA29A_EIC_EXTINT_NUM,
179 #else
180 0xFF,
181 #endif
182 #ifdef PIN_PA30A_EIC_EXTINT_NUM
183 PIN_PA30A_EIC_EXTINT_NUM,
184 #else
185 0xFF,
186 #endif
187 #ifdef PIN_PA31A_EIC_EXTINT_NUM
188 PIN_PA31A_EIC_EXTINT_NUM,
189 #else
190 0xFF,
191 #endif
192 },
193 #endif
194
195 #if PORT_GROUPS >= 2
196 {
197 #ifdef PIN_PB00A_EIC_EXTINT_NUM
198 PIN_PB00A_EIC_EXTINT_NUM,
199 #else
200 0xFF,
201 #endif
202 #ifdef PIN_PB01A_EIC_EXTINT_NUM
203 PIN_PB01A_EIC_EXTINT_NUM,
204 #else
205 0xFF,
206 #endif
207 #ifdef PIN_PB02A_EIC_EXTINT_NUM
208 PIN_PB02A_EIC_EXTINT_NUM,
209 #else
210 0xFF,
211 #endif
212 #ifdef PIN_PB03A_EIC_EXTINT_NUM
213 PIN_PB03A_EIC_EXTINT_NUM,
214 #else
215 0xFF,
216 #endif
217 #ifdef PIN_PB04A_EIC_EXTINT_NUM
218 PIN_PB04A_EIC_EXTINT_NUM,
219 #else
220 0xFF,
221 #endif
222 #ifdef PIN_PB05A_EIC_EXTINT_NUM
223 PIN_PB05A_EIC_EXTINT_NUM,
224 #else
225 0xFF,
226 #endif
227 #ifdef PIN_PB06A_EIC_EXTINT_NUM
228 PIN_PB06A_EIC_EXTINT_NUM,
229 #else
230 0xFF,
231 #endif
232 #ifdef PIN_PB07A_EIC_EXTINT_NUM
233 PIN_PB07A_EIC_EXTINT_NUM,
234 #else
235 0xFF,
236 #endif
237 #ifdef PIN_PB08A_EIC_EXTINT_NUM
238 PIN_PB08A_EIC_EXTINT_NUM,
239 #else
240 0xFF,
241 #endif
242 #ifdef PIN_PB09A_EIC_EXTINT_NUM
243 PIN_PB09A_EIC_EXTINT_NUM,
244 #else
245 0xFF,
246 #endif
247 #ifdef PIN_PB10A_EIC_EXTINT_NUM
248 PIN_PB10A_EIC_EXTINT_NUM,
249 #else
250 0xFF,
251 #endif
252 #ifdef PIN_PB11A_EIC_EXTINT_NUM
253 PIN_PB11A_EIC_EXTINT_NUM,
254 #else
255 0xFF,
256 #endif
257 #ifdef PIN_PB12A_EIC_EXTINT_NUM
258 PIN_PB12A_EIC_EXTINT_NUM,
259 #else
260 0xFF,
261 #endif
262 #ifdef PIN_PB13A_EIC_EXTINT_NUM
263 PIN_PB13A_EIC_EXTINT_NUM,
264 #else
265 0xFF,
266 #endif
267 #ifdef PIN_PB14A_EIC_EXTINT_NUM
268 PIN_PB14A_EIC_EXTINT_NUM,
269 #else
270 0xFF,
271 #endif
272 #ifdef PIN_PB15A_EIC_EXTINT_NUM
273 PIN_PB15A_EIC_EXTINT_NUM,
274 #else
275 0xFF,
276 #endif
277 #ifdef PIN_PB16A_EIC_EXTINT_NUM
278 PIN_PB16A_EIC_EXTINT_NUM,
279 #else
280 0xFF,
281 #endif
282 #ifdef PIN_PB17A_EIC_EXTINT_NUM
283 PIN_PB17A_EIC_EXTINT_NUM,
284 #else
285 0xFF,
286 #endif
287 #ifdef PIN_PB18A_EIC_EXTINT_NUM
288 PIN_PB18A_EIC_EXTINT_NUM,
289 #else
290 0xFF,
291 #endif
292 #ifdef PIN_PB19A_EIC_EXTINT_NUM
293 PIN_PB19A_EIC_EXTINT_NUM,
294 #else
295 0xFF,
296 #endif
297 #ifdef PIN_PB20A_EIC_EXTINT_NUM
298 PIN_PB20A_EIC_EXTINT_NUM,
299 #else
300 0xFF,
301 #endif
302 #ifdef PIN_PB21A_EIC_EXTINT_NUM
303 PIN_PB21A_EIC_EXTINT_NUM,
304 #else
305 0xFF,
306 #endif
307 #ifdef PIN_PB22A_EIC_EXTINT_NUM
308 PIN_PB22A_EIC_EXTINT_NUM,
309 #else
310 0xFF,
311 #endif
312 #ifdef PIN_PB23A_EIC_EXTINT_NUM
313 PIN_PB23A_EIC_EXTINT_NUM,
314 #else
315 0xFF,
316 #endif
317 #ifdef PIN_PB24A_EIC_EXTINT_NUM
318 PIN_PB24A_EIC_EXTINT_NUM,
319 #else
320 0xFF,
321 #endif
322 #ifdef PIN_PB25A_EIC_EXTINT_NUM
323 PIN_PB25A_EIC_EXTINT_NUM,
324 #else
325 0xFF,
326 #endif
327 #ifdef PIN_PB26A_EIC_EXTINT_NUM
328 PIN_PB26A_EIC_EXTINT_NUM,
329 #else
330 0xFF,
331 #endif
332 #ifdef PIN_PB27A_EIC_EXTINT_NUM
333 PIN_PB27A_EIC_EXTINT_NUM,
334 #else
335 0xFF,
336 #endif
337 #ifdef PIN_PB28A_EIC_EXTINT_NUM
338 PIN_PB28A_EIC_EXTINT_NUM,
339 #else
340 0xFF,
341 #endif
342 #ifdef PIN_PB29A_EIC_EXTINT_NUM
343 PIN_PB29A_EIC_EXTINT_NUM,
344 #else
345 0xFF,
346 #endif
347 #ifdef PIN_PB30A_EIC_EXTINT_NUM
348 PIN_PB30A_EIC_EXTINT_NUM,
349 #else
350 0xFF,
351 #endif
352 #ifdef PIN_PB31A_EIC_EXTINT_NUM
353 PIN_PB31A_EIC_EXTINT_NUM,
354 #else
355 0xFF,
356 #endif
357 },
358 #endif
359
360 #if PORT_GROUPS >= 3
361 {
362 #ifdef PIN_PC00A_EIC_EXTINT_NUM
363 PIN_PC00A_EIC_EXTINT_NUM,
364 #else
365 0xFF,
366 #endif
367 #ifdef PIN_PC01A_EIC_EXTINT_NUM
368 PIN_PC01A_EIC_EXTINT_NUM,
369 #else
370 0xFF,
371 #endif
372 #ifdef PIN_PC02A_EIC_EXTINT_NUM
373 PIN_PC02A_EIC_EXTINT_NUM,
374 #else
375 0xFF,
376 #endif
377 #ifdef PIN_PC03A_EIC_EXTINT_NUM
378 PIN_PC03A_EIC_EXTINT_NUM,
379 #else
380 0xFF,
381 #endif
382 #ifdef PIN_PC04A_EIC_EXTINT_NUM
383 PIN_PC04A_EIC_EXTINT_NUM,
384 #else
385 0xFF,
386 #endif
387 #ifdef PIN_PC05A_EIC_EXTINT_NUM
388 PIN_PC05A_EIC_EXTINT_NUM,
389 #else
390 0xFF,
391 #endif
392 #ifdef PIN_PC06A_EIC_EXTINT_NUM
393 PIN_PC06A_EIC_EXTINT_NUM,
394 #else
395 0xFF,
396 #endif
397 #ifdef PIN_PC07A_EIC_EXTINT_NUM
398 PIN_PC07A_EIC_EXTINT_NUM,
399 #else
400 0xFF,
401 #endif
402 #ifdef PIN_PC08A_EIC_EXTINT_NUM
403 PIN_PC08A_EIC_EXTINT_NUM,
404 #else
405 0xFF,
406 #endif
407 #ifdef PIN_PC09A_EIC_EXTINT_NUM
408 PIN_PC09A_EIC_EXTINT_NUM,
409 #else
410 0xFF,
411 #endif
412 #ifdef PIN_PC10A_EIC_EXTINT_NUM
413 PIN_PC10A_EIC_EXTINT_NUM,
414 #else
415 0xFF,
416 #endif
417 #ifdef PIN_PC11A_EIC_EXTINT_NUM
418 PIN_PC11A_EIC_EXTINT_NUM,
419 #else
420 0xFF,
421 #endif
422 #ifdef PIN_PC12A_EIC_EXTINT_NUM
423 PIN_PC12A_EIC_EXTINT_NUM,
424 #else
425 0xFF,
426 #endif
427 #ifdef PIN_PC13A_EIC_EXTINT_NUM
428 PIN_PC13A_EIC_EXTINT_NUM,
429 #else
430 0xFF,
431 #endif
432 #ifdef PIN_PC14A_EIC_EXTINT_NUM
433 PIN_PC14A_EIC_EXTINT_NUM,
434 #else
435 0xFF,
436 #endif
437 #ifdef PIN_PC15A_EIC_EXTINT_NUM
438 PIN_PC15A_EIC_EXTINT_NUM,
439 #else
440 0xFF,
441 #endif
442 #ifdef PIN_PC16A_EIC_EXTINT_NUM
443 PIN_PC16A_EIC_EXTINT_NUM,
444 #else
445 0xFF,
446 #endif
447 #ifdef PIN_PC17A_EIC_EXTINT_NUM
448 PIN_PC17A_EIC_EXTINT_NUM,
449 #else
450 0xFF,
451 #endif
452 #ifdef PIN_PC18A_EIC_EXTINT_NUM
453 PIN_PC18A_EIC_EXTINT_NUM,
454 #else
455 0xFF,
456 #endif
457 #ifdef PIN_PC19A_EIC_EXTINT_NUM
458 PIN_PC19A_EIC_EXTINT_NUM,
459 #else
460 0xFF,
461 #endif
462 #ifdef PIN_PC20A_EIC_EXTINT_NUM
463 PIN_PC20A_EIC_EXTINT_NUM,
464 #else
465 0xFF,
466 #endif
467 #ifdef PIN_PC21A_EIC_EXTINT_NUM
468 PIN_PC21A_EIC_EXTINT_NUM,
469 #else
470 0xFF,
471 #endif
472 #ifdef PIN_PC22A_EIC_EXTINT_NUM
473 PIN_PC22A_EIC_EXTINT_NUM,
474 #else
475 0xFF,
476 #endif
477 #ifdef PIN_PC23A_EIC_EXTINT_NUM
478 PIN_PC23A_EIC_EXTINT_NUM,
479 #else
480 0xFF,
481 #endif
482 #ifdef PIN_PC24A_EIC_EXTINT_NUM
483 PIN_PC24A_EIC_EXTINT_NUM,
484 #else
485 0xFF,
486 #endif
487 #ifdef PIN_PC25A_EIC_EXTINT_NUM
488 PIN_PC25A_EIC_EXTINT_NUM,
489 #else
490 0xFF,
491 #endif
492 #ifdef PIN_PC26A_EIC_EXTINT_NUM
493 PIN_PC26A_EIC_EXTINT_NUM,
494 #else
495 0xFF,
496 #endif
497 #ifdef PIN_PC27A_EIC_EXTINT_NUM
498 PIN_PC27A_EIC_EXTINT_NUM,
499 #else
500 0xFF,
501 #endif
502 #ifdef PIN_PC28A_EIC_EXTINT_NUM
503 PIN_PC28A_EIC_EXTINT_NUM,
504 #else
505 0xFF,
506 #endif
507 #ifdef PIN_PC29A_EIC_EXTINT_NUM
508 PIN_PC29A_EIC_EXTINT_NUM,
509 #else
510 0xFF,
511 #endif
512 #ifdef PIN_PC30A_EIC_EXTINT_NUM
513 PIN_PC30A_EIC_EXTINT_NUM,
514 #else
515 0xFF,
516 #endif
517 #ifdef PIN_PC31A_EIC_EXTINT_NUM
518 PIN_PC31A_EIC_EXTINT_NUM,
519 #else
520 0xFF,
521 #endif
522 },
523 #endif
524
525 #if PORT_GROUPS >= 4
526 {
527 #ifdef PIN_PD00A_EIC_EXTINT_NUM
528 PIN_PD00A_EIC_EXTINT_NUM,
529 #else
530 0xFF,
531 #endif
532 #ifdef PIN_PD01A_EIC_EXTINT_NUM
533 PIN_PD01A_EIC_EXTINT_NUM,
534 #else
535 0xFF,
536 #endif
537 #ifdef PIN_PD02A_EIC_EXTINT_NUM
538 PIN_PD02A_EIC_EXTINT_NUM,
539 #else
540 0xFF,
541 #endif
542 #ifdef PIN_PD03A_EIC_EXTINT_NUM
543 PIN_PD03A_EIC_EXTINT_NUM,
544 #else
545 0xFF,
546 #endif
547 #ifdef PIN_PD04A_EIC_EXTINT_NUM
548 PIN_PD04A_EIC_EXTINT_NUM,
549 #else
550 0xFF,
551 #endif
552 #ifdef PIN_PD05A_EIC_EXTINT_NUM
553 PIN_PD05A_EIC_EXTINT_NUM,
554 #else
555 0xFF,
556 #endif
557 #ifdef PIN_PD06A_EIC_EXTINT_NUM
558 PIN_PD06A_EIC_EXTINT_NUM,
559 #else
560 0xFF,
561 #endif
562 #ifdef PIN_PD07A_EIC_EXTINT_NUM
563 PIN_PD07A_EIC_EXTINT_NUM,
564 #else
565 0xFF,
566 #endif
567 #ifdef PIN_PD08A_EIC_EXTINT_NUM
568 PIN_PD08A_EIC_EXTINT_NUM,
569 #else
570 0xFF,
571 #endif
572 #ifdef PIN_PD09A_EIC_EXTINT_NUM
573 PIN_PD09A_EIC_EXTINT_NUM,
574 #else
575 0xFF,
576 #endif
577 #ifdef PIN_PD10A_EIC_EXTINT_NUM
578 PIN_PD10A_EIC_EXTINT_NUM,
579 #else
580 0xFF,
581 #endif
582 #ifdef PIN_PD11A_EIC_EXTINT_NUM
583 PIN_PD11A_EIC_EXTINT_NUM,
584 #else
585 0xFF,
586 #endif
587 #ifdef PIN_PD12A_EIC_EXTINT_NUM
588 PIN_PD12A_EIC_EXTINT_NUM,
589 #else
590 0xFF,
591 #endif
592 #ifdef PIN_PD13A_EIC_EXTINT_NUM
593 PIN_PD13A_EIC_EXTINT_NUM,
594 #else
595 0xFF,
596 #endif
597 #ifdef PIN_PD14A_EIC_EXTINT_NUM
598 PIN_PD14A_EIC_EXTINT_NUM,
599 #else
600 0xFF,
601 #endif
602 #ifdef PIN_PD15A_EIC_EXTINT_NUM
603 PIN_PD15A_EIC_EXTINT_NUM,
604 #else
605 0xFF,
606 #endif
607 #ifdef PIN_PD16A_EIC_EXTINT_NUM
608 PIN_PD16A_EIC_EXTINT_NUM,
609 #else
610 0xFF,
611 #endif
612 #ifdef PIN_PD17A_EIC_EXTINT_NUM
613 PIN_PD17A_EIC_EXTINT_NUM,
614 #else
615 0xFF,
616 #endif
617 #ifdef PIN_PD18A_EIC_EXTINT_NUM
618 PIN_PD18A_EIC_EXTINT_NUM,
619 #else
620 0xFF,
621 #endif
622 #ifdef PIN_PD19A_EIC_EXTINT_NUM
623 PIN_PD19A_EIC_EXTINT_NUM,
624 #else
625 0xFF,
626 #endif
627 #ifdef PIN_PD20A_EIC_EXTINT_NUM
628 PIN_PD20A_EIC_EXTINT_NUM,
629 #else
630 0xFF,
631 #endif
632 #ifdef PIN_PD21A_EIC_EXTINT_NUM
633 PIN_PD21A_EIC_EXTINT_NUM,
634 #else
635 0xFF,
636 #endif
637 #ifdef PIN_PD22A_EIC_EXTINT_NUM
638 PIN_PD22A_EIC_EXTINT_NUM,
639 #else
640 0xFF,
641 #endif
642 #ifdef PIN_PD23A_EIC_EXTINT_NUM
643 PIN_PD23A_EIC_EXTINT_NUM,
644 #else
645 0xFF,
646 #endif
647 #ifdef PIN_PD24A_EIC_EXTINT_NUM
648 PIN_PD24A_EIC_EXTINT_NUM,
649 #else
650 0xFF,
651 #endif
652 #ifdef PIN_PD25A_EIC_EXTINT_NUM
653 PIN_PD25A_EIC_EXTINT_NUM,
654 #else
655 0xFF,
656 #endif
657 #ifdef PIN_PD26A_EIC_EXTINT_NUM
658 PIN_PD26A_EIC_EXTINT_NUM,
659 #else
660 0xFF,
661 #endif
662 #ifdef PIN_PD27A_EIC_EXTINT_NUM
663 PIN_PD27A_EIC_EXTINT_NUM,
664 #else
665 0xFF,
666 #endif
667 #ifdef PIN_PD28A_EIC_EXTINT_NUM
668 PIN_PD28A_EIC_EXTINT_NUM,
669 #else
670 0xFF,
671 #endif
672 #ifdef PIN_PD29A_EIC_EXTINT_NUM
673 PIN_PD29A_EIC_EXTINT_NUM,
674 #else
675 0xFF,
676 #endif
677 #ifdef PIN_PD30A_EIC_EXTINT_NUM
678 PIN_PD30A_EIC_EXTINT_NUM,
679 #else
680 0xFF,
681 #endif
682 #ifdef PIN_PD31A_EIC_EXTINT_NUM
683 PIN_PD31A_EIC_EXTINT_NUM,
684 #else
685 0xFF,
686 #endif
687 },
688 #endif
689 };
690
sam0_eic_map_to_line(int port,int pin)691 static inline int sam0_eic_map_to_line(int port, int pin)
692 {
693 uint8_t ch = sam0_eic_channels[port][pin];
694
695 if (ch == 0xFF) {
696 return -ENOTSUP;
697 }
698 return ch;
699 }
700
701 #endif /* ZEPHYR_DRIVERS_INTERRUPT_CONTROLLER_INTC_SAM0_EIC_PRIV_H_ */
702