Small fixes for smt32 support

This commit is contained in:
dvdb97
2023-07-16 12:02:45 +02:00
parent 2265131b3f
commit 0d02d57cbb
12 changed files with 29 additions and 27 deletions

View File

@@ -9,7 +9,7 @@ namespace sta
class UART : public Interface
{
public:
UART(Mutex * mutex=nullptr);
UART(UARTSettings & settings, Mutex * mutex=nullptr);
/**
* @brief Get %UART interface settings.

View File

@@ -1,11 +1,11 @@
#ifndef STA_CONFIG_HPP
#define STA_CONFIG_HPP
#include <sta/devices/raspi/mcu/common.hpp>
#include <sta/devices/stm32/mcu/STM32F411xE.hpp>
#define STA_DEBUGGING_ENABLED
#define STA_PRINTF_USE_STDLIB
#define STA_ASSERT_FORCE
// #define STA_ASSERT_FORCE
#endif // STA_CONFIG_HPP

View File

@@ -21,11 +21,11 @@
#if defined(STA_STM32_SPI_ENABLED) || defined(DOXYGEN)
#include <sta/spi/device.hpp>
#include <sta/spi/spi.hpp>
#include <sta/bus/spi/device.hpp>
#include <sta/bus/spi/spi.hpp>
#include <sta/stm32/clocks.hpp>
#include <sta/stm32/gpio_pin.hpp>
#include <sta/devices/stm32/clocks.hpp>
#include <sta/devices/stm32/gpio_pin.hpp>
/**
@@ -92,10 +92,7 @@ namespace sta
* @param intf %SPI interface
* @param csPin Device CS pin
*/
STM32SPIDevice(STM32SPI * intf, STM32GpioPin csPin);
private:
STM32GpioPin csPin_; /**< Device CS pin */
STM32SPIDevice(STM32SPI * intf, STM32GpioPin * csPin);
};

View File

@@ -41,7 +41,7 @@ namespace sta
/**
* @param handle STM32 HAL handle
*/
STM32UART(UART_HandleTypeDef * handle, Mutex * mutex);
STM32UART(UART_HandleTypeDef * handle, UARTSettings & settings, Mutex * mutex);
void transfer(uint8_t value) override;
void transfer16(uint16_t value) override;

View File

@@ -28,7 +28,7 @@
#if defined(STA_STM32_CAN_ENABLED) || defined(DOXYGEN)
#include <sta/can/controller.hpp>
#include <sta/bus/can/controller.hpp>
namespace sta

View File

@@ -50,6 +50,8 @@ namespace sta
void setState(GpioPinState state) override;
GpioPinState getState() override;
/**
* @brief Get GPIO port for pin.
*