amiro-os / modules / NUCLEO-F767ZI / module.c @ 21e5be0b
History | View | Annotate | Download (4.253 KB)
| 1 | 21e5be0b | Thomas Schöpping | /*
|
|---|---|---|---|
| 2 | AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
|
||
| 3 | Copyright (C) 2016..2019 Thomas Schöpping et al.
|
||
| 4 | |||
| 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 | * @brief Structures and constant for the NUCLEO-F767ZI module.
|
||
| 22 | *
|
||
| 23 | * @addtogroup NUCLEO-F767ZI_module
|
||
| 24 | * @{
|
||
| 25 | */
|
||
| 26 | |||
| 27 | #include <amiroos.h> |
||
| 28 | |||
| 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 LED1 output signal GPIO.
|
||
| 63 | */
|
||
| 64 | static apalGpio_t _gpioLed1 = {
|
||
| 65 | /* line */ LINE_LED1,
|
||
| 66 | }; |
||
| 67 | ROMCONST apalControlGpio_t moduleGpioLed1 = {
|
||
| 68 | /* GPIO */ &_gpioLed1,
|
||
| 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 LED2 output signal GPIO.
|
||
| 78 | */
|
||
| 79 | static apalGpio_t _gpioLed2 = {
|
||
| 80 | /* line */ LINE_LED2,
|
||
| 81 | }; |
||
| 82 | ROMCONST apalControlGpio_t moduleGpioLed2 = {
|
||
| 83 | /* GPIO */ &_gpioLed2,
|
||
| 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 LED3 output signal GPIO.
|
||
| 93 | */
|
||
| 94 | static apalGpio_t _gpioLed3 = {
|
||
| 95 | /* line */ LINE_LED3,
|
||
| 96 | }; |
||
| 97 | ROMCONST apalControlGpio_t moduleGpioLed3 = {
|
||
| 98 | /* GPIO */ &_gpioLed3,
|
||
| 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 User button input signal GPIO.
|
||
| 108 | */
|
||
| 109 | static apalGpio_t _gpioUserButton = {
|
||
| 110 | /* line */ LINE_BUTTON,
|
||
| 111 | }; |
||
| 112 | ROMCONST apalControlGpio_t moduleGpioUserButton = {
|
||
| 113 | /* GPIO */ &_gpioUserButton,
|
||
| 114 | /* meta */ {
|
||
| 115 | /* direction */ APAL_GPIO_DIRECTION_INPUT,
|
||
| 116 | /* active state */ APAL_GPIO_ACTIVE_HIGH,
|
||
| 117 | /* interrupt edge */ APAL_GPIO_EDGE_BOTH,
|
||
| 118 | }, |
||
| 119 | }; |
||
| 120 | |||
| 121 | /** @} */
|
||
| 122 | |||
| 123 | /*===========================================================================*/
|
||
| 124 | /**
|
||
| 125 | * @name AMiRo-OS core configurations
|
||
| 126 | * @{
|
||
| 127 | */
|
||
| 128 | /*===========================================================================*/
|
||
| 129 | |||
| 130 | #if (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__) |
||
| 131 | ROMCONST char* moduleShellPrompt = "NUCLEO-F767ZI"; |
||
| 132 | #endif /* (AMIROOS_CFG_SHELL_ENABLE == true) || (AMIROOS_CFG_TESTS_ENABLE == true) */ |
||
| 133 | |||
| 134 | /** @} */
|
||
| 135 | |||
| 136 | /*===========================================================================*/
|
||
| 137 | /**
|
||
| 138 | * @name Startup Shutdown Synchronization Protocol (SSSP)
|
||
| 139 | * @{
|
||
| 140 | */
|
||
| 141 | /*===========================================================================*/
|
||
| 142 | |||
| 143 | /** @} */
|
||
| 144 | |||
| 145 | /*===========================================================================*/
|
||
| 146 | /**
|
||
| 147 | * @name Low-level drivers
|
||
| 148 | * @{
|
||
| 149 | */
|
||
| 150 | /*===========================================================================*/
|
||
| 151 | |||
| 152 | /** @} */
|
||
| 153 | |||
| 154 | /*===========================================================================*/
|
||
| 155 | /**
|
||
| 156 | * @name Unit tests (UT)
|
||
| 157 | * @{
|
||
| 158 | */
|
||
| 159 | /*===========================================================================*/
|
||
| 160 | #if (AMIROOS_CFG_TESTS_ENABLE == true) || defined(__DOXYGEN__) |
||
| 161 | |||
| 162 | #endif /* (AMIROOS_CFG_TESTS_ENABLE == true) */ |
||
| 163 | |||
| 164 | /** @} */
|
||
| 165 | /** @} */ |