Statistics
| Branch: | Tag: | Revision:

amiro-os / modules / STM32F407G-DISC1 / module.c @ e977b199

History | View | Annotate | Download (4.576 KB)

1 07ff44a7 Thomas Schöpping
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3 96621a83 Thomas Schöpping
Copyright (C) 2016..2020  Thomas Schöpping et al.
4 07ff44a7 Thomas Schöpping

5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
/**
20
 * @file
21 a0301104 Thomas Schöpping
 * @brief   Structures and constant for the STM32F4Discovery module.
22 07ff44a7 Thomas Schöpping
 *
23 a0301104 Thomas Schöpping
 * @addtogroup STM32F4Discovery_module
24 07ff44a7 Thomas Schöpping
 * @{
25
 */
26
27 c53ef0b1 Thomas Schöpping
#include <amiroos.h>
28 07ff44a7 Thomas Schöpping
29
/*===========================================================================*/
30
/**
31
 * @name Module specific functions
32
 * @{
33
 */
34
/*===========================================================================*/
35
36
/** @} */
37
38
/*===========================================================================*/
39
/**
40
 * @name ChibiOS/HAL configuration
41
 * @{
42
 */
43
/*===========================================================================*/
44
45
SerialConfig moduleHalProgIfConfig = {
46
  /* bit rate */ 115200,
47
  /* CR1      */ 0,
48
  /* CR1      */ 0,
49
  /* CR1      */ 0,
50
};
51
52
/** @} */
53
54
/*===========================================================================*/
55
/**
56
 * @name GPIO definitions
57
 * @{
58
 */
59
/*===========================================================================*/
60
61
/**
62
 * @brief   Red LED output signal GPIO.
63
 */
64
static apalGpio_t _gpioLedRed = {
65 3106e8cc Thomas Schöpping
  /* line */ LINE_LED5,
66 07ff44a7 Thomas Schöpping
};
67
ROMCONST apalControlGpio_t moduleGpioLedRed = {
68
  /* GPIO */ &_gpioLedRed,
69
  /* meta */ {
70
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
71
    /* active state   */ APAL_GPIO_ACTIVE_HIGH,
72
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
73
  },
74
};
75
76
/**
77
 * @brief   Green LED output signal GPIO.
78
 */
79
static apalGpio_t _gpioLedGreen = {
80 3106e8cc Thomas Schöpping
  /* line */ LINE_LED4,
81 07ff44a7 Thomas Schöpping
};
82
ROMCONST apalControlGpio_t moduleGpioLedGreen = {
83
  /* GPIO */ &_gpioLedGreen,
84
  /* meta */ {
85
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
86
    /* active state   */ APAL_GPIO_ACTIVE_HIGH,
87
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
88
  },
89
};
90
91
/**
92
 * @brief   Blue LED output signal GPIO.
93
 */
94
static apalGpio_t _gpioLedBlue = {
95 3106e8cc Thomas Schöpping
  /* line */ LINE_LED6,
96 07ff44a7 Thomas Schöpping
};
97
ROMCONST apalControlGpio_t moduleGpioLedBlue = {
98
  /* GPIO */ &_gpioLedBlue,
99
  /* meta */ {
100
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
101
    /* active state   */ APAL_GPIO_ACTIVE_HIGH,
102
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
103
  },
104
};
105
106
/**
107
 * @brief   Orange LED output signal GPIO.
108
 */
109
static apalGpio_t _gpioLedOrange = {
110 3106e8cc Thomas Schöpping
  /* line */ LINE_LED3,
111 07ff44a7 Thomas Schöpping
};
112
ROMCONST apalControlGpio_t moduleGpioLedOrange = {
113
  /* GPIO */ &_gpioLedOrange,
114
  /* meta */ {
115
    /* direction      */ APAL_GPIO_DIRECTION_OUTPUT,
116
    /* active state   */ APAL_GPIO_ACTIVE_HIGH,
117
    /* interrupt edge */ APAL_GPIO_EDGE_NONE,
118
  },
119
};
120
121
/**
122
 * @brief   User button input signal GPIO.
123
 */
124
static apalGpio_t _gpioUserButton = {
125 3106e8cc Thomas Schöpping
  /* line */ LINE_BUTTON,
126 07ff44a7 Thomas Schöpping
};
127
ROMCONST apalControlGpio_t moduleGpioUserButton = {
128
  /* GPIO */ &_gpioUserButton,
129
  /* meta */ {
130
    /* direction      */ APAL_GPIO_DIRECTION_INPUT,
131
    /* active state   */ APAL_GPIO_ACTIVE_HIGH,
132
    /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
133
  },
134
};
135
136
/** @} */
137
138
/*===========================================================================*/
139
/**
140
 * @name AMiRo-OS core configurations
141
 * @{
142
 */
143
/*===========================================================================*/
144
145 cda14729 Thomas Schöpping
#if (AMIROOS_CFG_SHELL_ENABLE == true) || defined(__DOXYGEN__)
146 07ff44a7 Thomas Schöpping
ROMCONST char* moduleShellPrompt = "STM32F407Discovery";
147 cda14729 Thomas Schöpping
#endif /* (AMIROOS_CFG_SHELL_ENABLE == true) */
148 07ff44a7 Thomas Schöpping
149
/** @} */
150
151
/*===========================================================================*/
152
/**
153
 * @name Startup Shutdown Synchronization Protocol (SSSP)
154
 * @{
155
 */
156
/*===========================================================================*/
157
158
/** @} */
159
160
/*===========================================================================*/
161
/**
162
 * @name Low-level drivers
163
 * @{
164
 */
165
/*===========================================================================*/
166
167
/** @} */
168
169
/*===========================================================================*/
170
/**
171 4c72a54c Thomas Schöpping
 * @name Tests
172 07ff44a7 Thomas Schöpping
 * @{
173
 */
174
/*===========================================================================*/
175
#if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__)
176
177 7de0cc90 Thomas Schöpping
#endif /* (AMIROOS_CFG_TESTS_ENABLE == true) */
178 07ff44a7 Thomas Schöpping
179
/** @} */
180
/** @} */