libyggdrasil  v1.0.0
interfaces.h
Go to the documentation of this file.
1  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * _____.___. .___ .__.__ *
3  * \__ | | ____ ____ __| _/___________ _____|__| | *
4  * / | |/ ___\ / ___\ / __ |\_ __ \__ \ / ___/ | | *
5  * \____ / /_/ > /_/ > /_/ | | | \// __ \_\___ \| | |__ *
6  * / ______\___ /\___ /\____ | |__| (____ /____ >__|____/ *
7  * \/ /_____//_____/ \/ \/ \/ *
8  * - Asgard - *
9  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
10  * This software can be used by students and other personal of the *
11  * Bern University of Applied Sciences under the terms of the MIT *
12  * license. *
13  * For other persons this software is under the terms of the GNU *
14  * General Public License version 2. *
15  * *
16  * Copyright © 2021, Bern University of Applied Sciences. *
17  * All rights reserved. *
18  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
26 #pragma once
27 
28 #include <c/asgard/core/cortex.h>
29 
30 #include <c/asgard/driver/gpio.h>
31 #include <c/asgard/driver/i2c.h>
33 
34 #if defined(YGGDRASIL_PERIPHERAL_DEFS)
35 
40  const static gpio_t LD1 = { 144 };
41  const static gpio_t LDA = LD1;
42  const static gpio_t LedBlue = LD1;
43  const static gpio_t LD2 = { 145 };
44  const static gpio_t LDB = LD2;
45  const static gpio_t LedRed = LD2;
46  const static gpio_t LD3 = { 146 };
47  const static gpio_t LDC = LD3;
48  const static gpio_t LedYellow = LD3;
49  const static gpio_t LD4 = { 147 };
50  const static gpio_t LDD = LD4;
51  const static gpio_t LedGreen = LD4;
52 
53  const static gpio_t EncoderButton = { 65, LOW_ACTIVE };
54 
55  const static gpio_t LeftJoyStickButton = { 73, LOW_ACTIVE };
56  const static gpio_t ButtonJoystickA = LeftJoyStickButton;
57  const static gpio_t RightJoyStickButton = { 71, LOW_ACTIVE };
58  const static gpio_t ButtonJoystickB = RightJoyStickButton;
59 
60  const static gpio_t ButtonA = { 148, LOW_ACTIVE };
61  const static gpio_t ButtonB = { 149, LOW_ACTIVE };
62  const static gpio_t ButtonC = { 150, LOW_ACTIVE };
63  const static gpio_t ButtonD = { 151, LOW_ACTIVE };
64 
65  const static gpio_t DriverA = { 19 };
66  const static gpio_t LD5 = DriverA;
67  const static gpio_t LDE = DriverA;
68  const static gpio_t DriverB = { 20 };
69  const static gpio_t LD6 = DriverB;
70  const static gpio_t LDF = DriverB;
71  const static gpio_t DriverC = { 30 };
72  const static gpio_t LD7 = DriverC;
73  const static gpio_t LDG = DriverC;
74  const static gpio_t DriverD = { 31 };
75  const static gpio_t LD8 = DriverD;
76  const static gpio_t LDH = DriverD;
77 
83  const static gpio_t SevenSegment_A = { 160 };
84  const static gpio_t SevenSegment_B = { 161 };
85  const static gpio_t SevenSegment_C = { 162 };
86  const static gpio_t SevenSegment_D = { 163 };
87  const static gpio_t SevenSegment_E = { 164 };
88  const static gpio_t SevenSegment_F = { 165 };
89  const static gpio_t SevenSegment_G = { 166 };
90  const static gpio_t SevenSegment_DP = { 167 };
91 
92  const static gpio_t SevenSegment_Select0 = { 140 };
93  const static gpio_t SevenSegment_Select1 = { 141 };
94  const static gpio_t SevenSegment_Select2 = { 142 };
95  const static gpio_t SevenSegment_Select3 = { 143 };
96 
102  const static gpio_t SPIACE = { 128, LOW_ACTIVE };
103  const static gpio_t SK9822_EN = { 74 };
104  const static gpio_t SPIBCE = { 85, LOW_ACTIVE };
105  const static gpio_t SPICCE = { 117, LOW_ACTIVE };
106 
112  const static gpio_t TC78Mode = { 83 };
113  const static gpio_t TC78Err = { 105 };
114  const static gpio_t TC78Stby = { 138 };
115 
121  const static i2c_t I2CA = { 1 };
122  const static i2c_t I2CB = { 3 };
123  const static i2c_t I2CC = { 4 };
124  const static i2c_t I2CD = { 0 };
125 
128  #endif
i2c.h
I2C abstraction implementation for Asgard.
display.h
Display abstraction implementation for Asgard.
gpio.h
GPIO Pin abstraction implementation for Asgard.
cortex.h
Core control functions for Asgard.
i2c_t
I2C handle type.
Definition: i2c.h:31
gpio_t
GPIO handle type.
Definition: gpio.h:34
LOW_ACTIVE
#define LOW_ACTIVE
Definition: gpio.h:28