-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'stm32u5-basic-support'
- Loading branch information
Showing
45 changed files
with
326,130 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
489 changes: 489 additions & 0 deletions
489
configurations/ST_NUCLEO-U575ZI-Q/build/distortosConfiguration.cmake
Large diffs are not rendered by default.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
source/board/ST_NUCLEO-U575ZI-Q/ST_NUCLEO-U575ZI-Q-buttons.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* \file | ||
* \brief Definition of buttons for ST,NUCLEO-U575ZI-Q | ||
* | ||
* \author Copyright (C) 2014-2020 Kamil Szczygiel https://distortec.com https://freddiechopin.info | ||
* | ||
* \par License | ||
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not | ||
* distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* \warning | ||
* Automatically generated file - do not edit! | ||
*/ | ||
|
||
#include "distortos/board/buttons.hpp" | ||
|
||
#if defined(DISTORTOS_BOARD_BUTTONS_ENABLE) && DISTORTOS_BOARD_BUTTONS_COUNT != 0 | ||
|
||
#include "distortos/chip/InputPin.hpp" | ||
|
||
namespace distortos | ||
{ | ||
|
||
namespace board | ||
{ | ||
|
||
/*---------------------------------------------------------------------------------------------------------------------+ | ||
| global objects | ||
+---------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
const chip::InputPin buttons[buttonsCount] | ||
{ | ||
#ifdef DISTORTOS_BOARD_BUTTONS_B1_ENABLE | ||
chip::InputPin{chip::Pin::pc13, chip::PinPull::none, false}, | ||
#endif // def DISTORTOS_BOARD_BUTTONS_B1_ENABLE | ||
}; | ||
|
||
} // namespace board | ||
|
||
} // namespace distortos | ||
|
||
#endif // defined(DISTORTOS_BOARD_BUTTONS_ENABLE) && DISTORTOS_BOARD_BUTTONS_COUNT != 0 |
48 changes: 48 additions & 0 deletions
48
source/board/ST_NUCLEO-U575ZI-Q/ST_NUCLEO-U575ZI-Q-leds.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* \file | ||
* \brief Definition of leds for ST,NUCLEO-U575ZI-Q | ||
* | ||
* \author Copyright (C) 2014-2020 Kamil Szczygiel https://distortec.com https://freddiechopin.info | ||
* | ||
* \par License | ||
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not | ||
* distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* \warning | ||
* Automatically generated file - do not edit! | ||
*/ | ||
|
||
#include "distortos/board/leds.hpp" | ||
|
||
#if defined(DISTORTOS_BOARD_LEDS_ENABLE) && DISTORTOS_BOARD_LEDS_COUNT != 0 | ||
|
||
#include "distortos/chip/OutputPin.hpp" | ||
|
||
namespace distortos | ||
{ | ||
|
||
namespace board | ||
{ | ||
|
||
/*---------------------------------------------------------------------------------------------------------------------+ | ||
| global objects | ||
+---------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
chip::OutputPin leds[ledsCount] | ||
{ | ||
#ifdef DISTORTOS_BOARD_LEDS_LD1_ENABLE | ||
chip::OutputPin{chip::Pin::pc7, false, chip::PinOutputSpeed::low, chip::PinPull::none, false, false}, | ||
#endif // def DISTORTOS_BOARD_LEDS_LD1_ENABLE | ||
#ifdef DISTORTOS_BOARD_LEDS_LD2_ENABLE | ||
chip::OutputPin{chip::Pin::pb7, false, chip::PinOutputSpeed::low, chip::PinPull::none, false, false}, | ||
#endif // def DISTORTOS_BOARD_LEDS_LD2_ENABLE | ||
#ifdef DISTORTOS_BOARD_LEDS_LD3_ENABLE | ||
chip::OutputPin{chip::Pin::pg2, false, chip::PinOutputSpeed::low, chip::PinPull::none, false, false}, | ||
#endif // def DISTORTOS_BOARD_LEDS_LD3_ENABLE | ||
}; | ||
|
||
} // namespace board | ||
|
||
} // namespace distortos | ||
|
||
#endif // defined(DISTORTOS_BOARD_LEDS_ENABLE) && DISTORTOS_BOARD_LEDS_COUNT != 0 |
180 changes: 180 additions & 0 deletions
180
source/board/ST_NUCLEO-U575ZI-Q/ST_NUCLEO-U575ZI-Q-uarts.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,180 @@ | ||
/** | ||
* \file | ||
* \brief Definitions of low-level UART drivers for USARTv2 in ST,NUCLEO-U575ZI-Q (ST,STM32U575ZI chip) | ||
* | ||
* \author Copyright (C) 2016-2020 Kamil Szczygiel https://distortec.com https://freddiechopin.info | ||
* | ||
* \par License | ||
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not | ||
* distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* \warning | ||
* Automatically generated file - do not edit! | ||
*/ | ||
|
||
#include "distortos/chip/uarts.hpp" | ||
|
||
#include "distortos/chip/ChipUartLowLevel.hpp" | ||
#include "distortos/chip/PinInitializer.hpp" | ||
|
||
#include "distortos/BIND_LOW_LEVEL_INITIALIZER.h" | ||
|
||
namespace distortos | ||
{ | ||
|
||
namespace chip | ||
{ | ||
|
||
#ifdef DISTORTOS_CHIP_LPUART1_ENABLE | ||
|
||
/*---------------------------------------------------------------------------------------------------------------------+ | ||
| LPUART1 | ||
+---------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
ChipUartLowLevel lpuart1 {ChipUartLowLevel::lpuart1Parameters}; | ||
|
||
/** | ||
* \brief LPUART1 interrupt handler | ||
*/ | ||
|
||
extern "C" void LPUART1_IRQHandler() | ||
{ | ||
lpuart1.interruptHandler(); | ||
} | ||
|
||
#endif // def DISTORTOS_CHIP_LPUART1_ENABLE | ||
|
||
#ifdef DISTORTOS_CHIP_USART1_ENABLE | ||
|
||
/*---------------------------------------------------------------------------------------------------------------------+ | ||
| USART1 | ||
+---------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
namespace | ||
{ | ||
|
||
/// pin initializers for USART1 | ||
const PinInitializer usart1PinInitializers[] | ||
{ | ||
// USART1 RX | ||
makeAlternateFunctionPinInitializer(Pin::pa10, | ||
PinAlternateFunction::af7, | ||
false, | ||
PinOutputSpeed::veryHigh, | ||
PinPull::up), | ||
// USART1 TX | ||
makeAlternateFunctionPinInitializer(Pin::pa9, | ||
PinAlternateFunction::af7, | ||
false, | ||
PinOutputSpeed::veryHigh, | ||
PinPull::none), | ||
}; | ||
|
||
/** | ||
* \brief Low-level chip initializer for USART1 | ||
* | ||
* This function is called before constructors for global and static objects via BIND_LOW_LEVEL_INITIALIZER(). | ||
*/ | ||
|
||
void usart1LowLevelInitializer() | ||
{ | ||
for (auto& pinInitializer : usart1PinInitializers) | ||
pinInitializer(); | ||
} | ||
|
||
BIND_LOW_LEVEL_INITIALIZER(50, usart1LowLevelInitializer); | ||
|
||
} // namespace | ||
|
||
ChipUartLowLevel usart1 {ChipUartLowLevel::usart1Parameters}; | ||
|
||
/** | ||
* \brief USART1 interrupt handler | ||
*/ | ||
|
||
extern "C" void USART1_IRQHandler() | ||
{ | ||
usart1.interruptHandler(); | ||
} | ||
|
||
#endif // def DISTORTOS_CHIP_USART1_ENABLE | ||
|
||
#ifdef DISTORTOS_CHIP_USART2_ENABLE | ||
|
||
/*---------------------------------------------------------------------------------------------------------------------+ | ||
| USART2 | ||
+---------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
ChipUartLowLevel usart2 {ChipUartLowLevel::usart2Parameters}; | ||
|
||
/** | ||
* \brief USART2 interrupt handler | ||
*/ | ||
|
||
extern "C" void USART2_IRQHandler() | ||
{ | ||
usart2.interruptHandler(); | ||
} | ||
|
||
#endif // def DISTORTOS_CHIP_USART2_ENABLE | ||
|
||
#ifdef DISTORTOS_CHIP_USART3_ENABLE | ||
|
||
/*---------------------------------------------------------------------------------------------------------------------+ | ||
| USART3 | ||
+---------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
ChipUartLowLevel usart3 {ChipUartLowLevel::usart3Parameters}; | ||
|
||
/** | ||
* \brief USART3 interrupt handler | ||
*/ | ||
|
||
extern "C" void USART3_IRQHandler() | ||
{ | ||
usart3.interruptHandler(); | ||
} | ||
|
||
#endif // def DISTORTOS_CHIP_USART3_ENABLE | ||
|
||
#ifdef DISTORTOS_CHIP_UART4_ENABLE | ||
|
||
/*---------------------------------------------------------------------------------------------------------------------+ | ||
| UART4 | ||
+---------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
ChipUartLowLevel uart4 {ChipUartLowLevel::uart4Parameters}; | ||
|
||
/** | ||
* \brief UART4 interrupt handler | ||
*/ | ||
|
||
extern "C" void UART4_IRQHandler() | ||
{ | ||
uart4.interruptHandler(); | ||
} | ||
|
||
#endif // def DISTORTOS_CHIP_UART4_ENABLE | ||
|
||
#ifdef DISTORTOS_CHIP_UART5_ENABLE | ||
|
||
/*---------------------------------------------------------------------------------------------------------------------+ | ||
| UART5 | ||
+---------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
ChipUartLowLevel uart5 {ChipUartLowLevel::uart5Parameters}; | ||
|
||
/** | ||
* \brief UART5 interrupt handler | ||
*/ | ||
|
||
extern "C" void UART5_IRQHandler() | ||
{ | ||
uart5.interruptHandler(); | ||
} | ||
|
||
#endif // def DISTORTOS_CHIP_UART5_ENABLE | ||
|
||
} // namespace chip | ||
|
||
} // namespace distortos |
Oops, something went wrong.