Skip to content

Commit

Permalink
Finish HAL/STM32 cpp wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and chrisjenda committed Apr 5, 2021
1 parent c0ab55e commit cf43a3d
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions Marlin/src/HAL/STM32/MarlinSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "MarlinSPI.h"

Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/STM32/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "../../inc/MarlinConfig.h"
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "../../inc/MarlinConfig.h"

#if ENABLED(SDIO_SUPPORT) && !defined(STM32GENERIC)
#if ENABLED(SDIO_SUPPORT)

#include <stdint.h>
#include <stdbool.h>
Expand Down Expand Up @@ -319,3 +320,4 @@

#endif // !USBD_USE_CDC_COMPOSITE
#endif // SDIO_SUPPORT
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
5 changes: 2 additions & 3 deletions Marlin/src/HAL/STM32/eeprom_sdcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

/**
* Implementation of EEPROM settings in SD Card
*/

#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "../../inc/MarlinConfig.h"

#if ENABLED(SDCARD_EEPROM_EMULATION)
Expand Down Expand Up @@ -89,4 +88,4 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, const size_t size, uin
}

#endif // SDCARD_EEPROM_EMULATION
#endif // STM32 && !STM32GENERIC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
2 changes: 2 additions & 0 deletions Marlin/src/HAL/STM32/fast_pwm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "../../inc/MarlinConfigPre.h"

Expand Down Expand Up @@ -55,3 +56,4 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255
}

#endif // NEEDS_HARDWARE_PWM
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
2 changes: 2 additions & 0 deletions Marlin/src/HAL/STM32/tft/tft_fsmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "../../../inc/MarlinConfig.h"

Expand Down Expand Up @@ -178,3 +179,4 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou
}

#endif // HAS_FSMC_TFT
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
2 changes: 2 additions & 0 deletions Marlin/src/HAL/STM32/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "../../../inc/MarlinConfig.h"

Expand Down Expand Up @@ -210,3 +211,4 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
}

#endif // HAS_SPI_TFT
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
2 changes: 2 additions & 0 deletions Marlin/src/HAL/STM32/tft/xpt2046.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "../../../inc/MarlinConfig.h"

Expand Down Expand Up @@ -183,3 +184,4 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) {
}

#endif // HAS_TFT_XPT2046
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
3 changes: 1 addition & 2 deletions Marlin/src/HAL/STM32/usb_serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)

#include "../../inc/MarlinConfigPre.h"
Expand Down Expand Up @@ -51,5 +50,5 @@ void USB_Hook_init() {
USBD_CDC_fops.Receive = USBD_CDC_Receive_hook;
}

#endif // EMERGENCY_PARSER
#endif // EMERGENCY_PARSER && USBD_USE_CDC
#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC
1 change: 0 additions & 1 deletion Marlin/src/HAL/STM32/watchdog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ void HAL_watchdog_refresh() {
}

#endif // USE_WATCHDOG

#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC

0 comments on commit cf43a3d

Please sign in to comment.