Skip to content

Commit

Permalink
🔀️ Merge branch 'ladislas/feature/ci-upgrade-clang-format' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Jul 18, 2024
2 parents e09774b + 2251b14 commit f0da19a
Show file tree
Hide file tree
Showing 17 changed files with 86 additions and 93 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/ci-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,14 @@ on: push
jobs:
clang_format:
name: clang-format
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Install clang-format 17
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"
sudo apt update -y
sudo apt install -y --no-install-recommends clang-format-17
clang-format-17 --version
- name: Run clang-format
run: |
python3 tools/run-clang-format.py --clang-format-executable=clang-format-17 -r --extension=h,hpp,c,cpp --color=always --style=file ./app ./drivers ./libs ./spikes ./tests
python3 tools/run-clang-format.py --clang-format-executable=clang-format-18 -r --extension=h,hpp,c,cpp --color=always --style=file ./app ./drivers ./libs ./spikes ./tests
8 changes: 4 additions & 4 deletions drivers/CoreFlashMemory/source/CoreFlashIS25LP016D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ void CoreFlashIS25LP016D::reset()
_flash_manager.reset();
}

auto CoreFlashIS25LP016D::read(uint32_t address, std::span<uint8_t> rx_buffer, std::size_t rx_buffer_size)
-> std::size_t
auto CoreFlashIS25LP016D::read(uint32_t address, std::span<uint8_t> rx_buffer,
std::size_t rx_buffer_size) -> std::size_t
{
if (address + rx_buffer.size() > flash::is25lp016d::size) {
return 0;
Expand All @@ -37,8 +37,8 @@ auto CoreFlashIS25LP016D::read(uint32_t address, std::span<uint8_t> rx_buffer, s
return bytes_read;
}

auto CoreFlashIS25LP016D::write(uint32_t address, const std::span<uint8_t> tx_buffer, std::size_t tx_buffer_size)
-> std::size_t
auto CoreFlashIS25LP016D::write(uint32_t address, const std::span<uint8_t> tx_buffer,
std::size_t tx_buffer_size) -> std::size_t
{
if (address + tx_buffer.size() > getSize()) {
return 0;
Expand Down
8 changes: 4 additions & 4 deletions drivers/CoreHTS/include/CoreHTS.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ class CoreHTS : public interface::TemperatureSensor, public interface::HumidityS
auto write(uint8_t register_command, uint8_t *data, uint16_t size) -> int;

stmdev_ctx_t _register_io_function;
static auto ptr_io_write(void *handle, uint8_t register_address, uint8_t *p_buffer, uint16_t number_bytes_to_write)
-> int32_t;
static auto ptr_io_read(void *handle, uint8_t register_address, uint8_t *p_buffer, uint16_t number_bytes_to_read)
-> int32_t;
static auto ptr_io_write(void *handle, uint8_t register_address, uint8_t *p_buffer,
uint16_t number_bytes_to_write) -> int32_t;
static auto ptr_io_read(void *handle, uint8_t register_address, uint8_t *p_buffer,
uint16_t number_bytes_to_read) -> int32_t;

interface::I2C &_i2c;
const uint8_t _I2C_ADDRESS = HTS221_I2C_ADDRESS;
Expand Down
8 changes: 4 additions & 4 deletions drivers/CoreHTS/source/CoreHTS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,14 @@ auto CoreHTS::write(uint8_t register_address, uint8_t *pBuffer, uint16_t number_
return 0;
}

auto CoreHTS::ptr_io_write(void *handle, uint8_t register_address, uint8_t *p_buffer, uint16_t number_bytes_to_write)
-> int32_t
auto CoreHTS::ptr_io_write(void *handle, uint8_t register_address, uint8_t *p_buffer,
uint16_t number_bytes_to_write) -> int32_t
{
return (int32_t)((CoreHTS *)handle)->write(register_address, p_buffer, number_bytes_to_write);
}

auto CoreHTS::ptr_io_read(void *handle, uint8_t register_address, uint8_t *p_buffer, uint16_t number_bytes_to_read)
-> int32_t
auto CoreHTS::ptr_io_read(void *handle, uint8_t register_address, uint8_t *p_buffer,
uint16_t number_bytes_to_read) -> int32_t
{
return (int32_t)((CoreHTS *)handle)->read(register_address, p_buffer, number_bytes_to_read);
}
8 changes: 4 additions & 4 deletions drivers/CoreQSPI/include/CoreQSPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class CoreQSPI : public interface::QSPI
void setDataTransmissionFormat() final;
void setFrequency(int hz = ONE_MHZ) final;

auto read(uint8_t command, uint32_t address, std::span<uint8_t> rx_buffer, std::size_t rx_buffer_size)
-> std::size_t final;
auto write(uint8_t command, uint32_t address, std::span<uint8_t> tx_buffer, std::size_t tx_buffer_size)
-> std::size_t final;
auto read(uint8_t command, uint32_t address, std::span<uint8_t> rx_buffer,
std::size_t rx_buffer_size) -> std::size_t final;
auto write(uint8_t command, uint32_t address, std::span<uint8_t> tx_buffer,
std::size_t tx_buffer_size) -> std::size_t final;

auto sendCommand(uint8_t command, uint32_t address, std::span<uint8_t> tx_buffer, std::size_t tx_buffer_size,
std::span<uint8_t> rx_buffer, std::size_t rx_buffer_size) -> std::tuple<size_t, std::size_t> final;
Expand Down
8 changes: 4 additions & 4 deletions drivers/CoreQSPI/source/CoreQSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ void CoreQSPI::setFrequency(int hz)
_qspi.set_frequency(hz);
}

auto CoreQSPI::read(uint8_t command, uint32_t address, std::span<uint8_t> rx_buffer, std::size_t rx_buffer_size)
-> std::size_t
auto CoreQSPI::read(uint8_t command, uint32_t address, std::span<uint8_t> rx_buffer,
std::size_t rx_buffer_size) -> std::size_t
{
// ? Use local variable as Mbed's QSPI driver returns the number of bytes read as an in/out parameter
auto size = rx_buffer_size;
Expand All @@ -38,8 +38,8 @@ auto CoreQSPI::read(uint8_t command, uint32_t address, std::span<uint8_t> rx_buf
return size;
}

auto CoreQSPI::write(uint8_t command, uint32_t address, std::span<uint8_t> tx_buffer, std::size_t tx_buffer_size)
-> std::size_t
auto CoreQSPI::write(uint8_t command, uint32_t address, std::span<uint8_t> tx_buffer,
std::size_t tx_buffer_size) -> std::size_t
{
// ? Use local variable as Mbed's QSPI driver returns the number of bytes written as an in/out parameter
auto size = tx_buffer_size;
Expand Down
24 changes: 12 additions & 12 deletions drivers/CoreSTM32Hal/include/CoreSTM32Hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class CoreSTM32Hal : public interface::STM32Hal
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) final;

auto HAL_SDRAM_Init(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_TimingTypeDef *Timing) -> HAL_StatusTypeDef final;
auto HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
-> HAL_StatusTypeDef final;
auto HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command,
uint32_t Timeout) -> HAL_StatusTypeDef final;
auto HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram, uint32_t RefreshRate) -> HAL_StatusTypeDef final;

auto HAL_DMA_Init(DMA_HandleTypeDef *hdma) -> HAL_StatusTypeDef final;
Expand All @@ -77,11 +77,11 @@ class CoreSTM32Hal : public interface::STM32Hal
auto HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi, uint32_t ChannelID, uint32_t Mode, uint32_t NbParams,
uint32_t Param1, uint8_t *ParametersTable) -> HAL_StatusTypeDef final;

auto HAL_LTDC_StructInitFromVideoConfig(LTDC_HandleTypeDef *hltdc, DSI_VidCfgTypeDef *VidCfg)
-> HAL_StatusTypeDef final;
auto HAL_LTDC_StructInitFromVideoConfig(LTDC_HandleTypeDef *hltdc,
DSI_VidCfgTypeDef *VidCfg) -> HAL_StatusTypeDef final;
auto HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc) -> HAL_StatusTypeDef final;
auto HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx)
-> HAL_StatusTypeDef final;
auto HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg,
uint32_t LayerIdx) -> HAL_StatusTypeDef final;

auto HAL_JPEG_Init(JPEG_HandleTypeDef *hjpeg) -> HAL_StatusTypeDef final;
auto HAL_JPEG_GetInfo(JPEG_HandleTypeDef *hjpeg, JPEG_ConfTypeDef *pInfo) -> HAL_StatusTypeDef final;
Expand All @@ -93,12 +93,12 @@ class CoreSTM32Hal : public interface::STM32Hal
void HAL_JPEG_ConfigOutputBuffer(JPEG_HandleTypeDef *hjpeg, uint8_t *pNewOutputBuffer,
uint32_t OutDataLength) final;

auto HAL_JPEG_RegisterInfoReadyCallback(JPEG_HandleTypeDef *hjpeg, pJPEG_InfoReadyCallbackTypeDef pCallback)
-> HAL_StatusTypeDef final;
auto HAL_JPEG_RegisterGetDataCallback(JPEG_HandleTypeDef *hjpeg, pJPEG_GetDataCallbackTypeDef pCallback)
-> HAL_StatusTypeDef final;
auto HAL_JPEG_RegisterDataReadyCallback(JPEG_HandleTypeDef *hjpeg, pJPEG_DataReadyCallbackTypeDef pCallback)
-> HAL_StatusTypeDef final;
auto HAL_JPEG_RegisterInfoReadyCallback(JPEG_HandleTypeDef *hjpeg,
pJPEG_InfoReadyCallbackTypeDef pCallback) -> HAL_StatusTypeDef final;
auto HAL_JPEG_RegisterGetDataCallback(JPEG_HandleTypeDef *hjpeg,
pJPEG_GetDataCallbackTypeDef pCallback) -> HAL_StatusTypeDef final;
auto HAL_JPEG_RegisterDataReadyCallback(JPEG_HandleTypeDef *hjpeg,
pJPEG_DataReadyCallbackTypeDef pCallback) -> HAL_StatusTypeDef final;
auto HAL_JPEG_RegisterCallback(JPEG_HandleTypeDef *hjpeg, HAL_JPEG_CallbackIDTypeDef callbackID,
pJPEG_CallbackTypeDef pCallback) -> HAL_StatusTypeDef final;

Expand Down
12 changes: 6 additions & 6 deletions drivers/CoreSTM32Hal/source/CoreSTM32Hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ auto CoreSTM32Hal::HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi, uint32_t ChannelID
return ::HAL_DSI_LongWrite(hdsi, ChannelID, Mode, NbParams, Param1, ParametersTable);
}

auto CoreSTM32Hal::HAL_LTDC_StructInitFromVideoConfig(LTDC_HandleTypeDef *hltdc, DSI_VidCfgTypeDef *VidCfg)
-> HAL_StatusTypeDef
auto CoreSTM32Hal::HAL_LTDC_StructInitFromVideoConfig(LTDC_HandleTypeDef *hltdc,
DSI_VidCfgTypeDef *VidCfg) -> HAL_StatusTypeDef
{
return ::HAL_LTDC_StructInitFromVideoConfig(hltdc, VidCfg);
}
Expand All @@ -237,8 +237,8 @@ auto CoreSTM32Hal::HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc) -> HAL_StatusTypeDef
return ::HAL_LTDC_Init(hltdc);
}

auto CoreSTM32Hal::HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx)
-> HAL_StatusTypeDef
auto CoreSTM32Hal::HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg,
uint32_t LayerIdx) -> HAL_StatusTypeDef
{
return ::HAL_LTDC_ConfigLayer(hltdc, pLayerCfg, LayerIdx);
}
Expand Down Expand Up @@ -283,8 +283,8 @@ auto CoreSTM32Hal::HAL_JPEG_RegisterInfoReadyCallback(JPEG_HandleTypeDef *hjpeg,
return ::HAL_JPEG_RegisterInfoReadyCallback(hjpeg, pCallback);
}

auto CoreSTM32Hal::HAL_JPEG_RegisterGetDataCallback(JPEG_HandleTypeDef *hjpeg, pJPEG_GetDataCallbackTypeDef pCallback)
-> HAL_StatusTypeDef
auto CoreSTM32Hal::HAL_JPEG_RegisterGetDataCallback(JPEG_HandleTypeDef *hjpeg,
pJPEG_GetDataCallbackTypeDef pCallback) -> HAL_StatusTypeDef
{
return ::HAL_JPEG_RegisterGetDataCallback(hjpeg, pCallback);
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/CoreVideo/source/CoreDMA2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ void CoreDMA2D::initialize()
void CoreDMA2D::transferData(uintptr_t input, uintptr_t output, uint32_t width, uint32_t height)
{
auto isNotReady = [this] { return _hdma2d.State != HAL_DMA2D_STATE_READY; };
while (isNotReady())
;
while (isNotReady());

// TODO(@yann): Check if init and config are needed everytime
auto is_initialized = [&] { return _hal.HAL_DMA2D_Init(&_hdma2d) == HAL_OK; };
Expand Down
4 changes: 2 additions & 2 deletions drivers/CoreWifi/include/CoreWifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class CoreWifi : public WiFiInterface
const nsapi_security_t security = NSAPI_SECURITY_WPA_WPA2;
};

auto set_credentials(const char *ssid, const char *password, nsapi_security_t security = NSAPI_SECURITY_NONE)
-> int final;
auto set_credentials(const char *ssid, const char *password,
nsapi_security_t security = NSAPI_SECURITY_NONE) -> int final;
auto set_channel(uint8_t channel) -> nsapi_error_t final;

auto scan(WiFiAccessPoint *res, nsapi_size_t count) -> nsapi_size_or_error_t final;
Expand Down
4 changes: 2 additions & 2 deletions drivers/CoreWifi/source/CoreWifi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ auto CoreWifi::connect(const Network &network) -> bool
return true;
}

auto CoreWifi::connect(const char *ssid, const char *password, nsapi_security_t security, uint8_t channel)
-> nsapi_error_t
auto CoreWifi::connect(const char *ssid, const char *password, nsapi_security_t security,
uint8_t channel) -> nsapi_error_t
{
return _module.connect(ssid, password, security, channel);
}
Expand Down
12 changes: 6 additions & 6 deletions include/interface/drivers/QSPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class QSPI
virtual void setDataTransmissionFormat() = 0;
virtual void setFrequency(int hz = 1'000'000) = 0;

virtual auto read(uint8_t command, uint32_t address, std::span<uint8_t> rx_buffer, std::size_t rx_buffer_size)
-> std::size_t = 0;
virtual auto write(uint8_t command, uint32_t address, std::span<uint8_t> tx_buffer, std::size_t tx_buffer_size)
-> std::size_t = 0;
virtual auto read(uint8_t command, uint32_t address, std::span<uint8_t> rx_buffer,
std::size_t rx_buffer_size) -> std::size_t = 0;
virtual auto write(uint8_t command, uint32_t address, std::span<uint8_t> tx_buffer,
std::size_t tx_buffer_size) -> std::size_t = 0;

virtual auto sendCommand(uint8_t command, uint32_t address, std::span<uint8_t> tx_buffer,
std::size_t tx_buffer_size, std::span<uint8_t> rx_buffer, std::size_t rx_buffer_size)
-> std::tuple<size_t, std::size_t> = 0;
std::size_t tx_buffer_size, std::span<uint8_t> rx_buffer,
std::size_t rx_buffer_size) -> std::tuple<size_t, std::size_t> = 0;
};

} // namespace leka::interface
56 changes: 28 additions & 28 deletions include/interface/drivers/STM32Hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ class STM32Hal
virtual void HAL_NVIC_EnableIRQ(IRQn_Type IRQn) = 0;

virtual auto HAL_SDRAM_Init(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_TimingTypeDef *Timing) -> HAL_StatusTypeDef = 0;
virtual auto HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
-> HAL_StatusTypeDef = 0;
virtual auto HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram, uint32_t RefreshRate)
-> HAL_StatusTypeDef = 0;
virtual auto HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command,
uint32_t Timeout) -> HAL_StatusTypeDef = 0;
virtual auto HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram,
uint32_t RefreshRate) -> HAL_StatusTypeDef = 0;

virtual auto HAL_DMA_Init(DMA_HandleTypeDef *hdma) -> HAL_StatusTypeDef = 0;
virtual auto HAL_DMA_DeInit(DMA_HandleTypeDef *hdma) -> HAL_StatusTypeDef = 0;

virtual auto HAL_DMA2D_Init(DMA2D_HandleTypeDef *hdma2d) -> HAL_StatusTypeDef = 0;
virtual auto HAL_DMA2D_ConfigLayer(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx) -> HAL_StatusTypeDef = 0;
virtual auto HAL_DMA2D_Init(DMA2D_HandleTypeDef *hdma2d) -> HAL_StatusTypeDef = 0;
virtual auto HAL_DMA2D_ConfigLayer(DMA2D_HandleTypeDef *hdma2d, uint32_t LayerIdx) -> HAL_StatusTypeDef = 0;
virtual auto HAL_DMA2D_Start(DMA2D_HandleTypeDef *hdma2d, uint32_t pdata, uint32_t DstAddress, uint32_t Width,
uint32_t Height) -> HAL_StatusTypeDef = 0;
virtual auto HAL_DMA2D_Start_IT(DMA2D_HandleTypeDef *hdma2d, uint32_t, uint32_t, uint32_t, uint32_t)
-> HAL_StatusTypeDef = 0;
uint32_t Height) -> HAL_StatusTypeDef = 0;
virtual auto HAL_DMA2D_Start_IT(DMA2D_HandleTypeDef *hdma2d, uint32_t, uint32_t, uint32_t,
uint32_t) -> HAL_StatusTypeDef = 0;
virtual auto HAL_DMA2D_PollForTransfer(DMA2D_HandleTypeDef *hdma2d, uint32_t Timeout) -> HAL_StatusTypeDef = 0;

virtual auto HAL_DSI_Init(DSI_HandleTypeDef *hdsi, DSI_PLLInitTypeDef *PLLInit) -> HAL_StatusTypeDef = 0;
Expand All @@ -77,32 +77,32 @@ class STM32Hal
virtual auto HAL_DSI_LongWrite(DSI_HandleTypeDef *hdsi, uint32_t ChannelID, uint32_t Mode, uint32_t NbParams,
uint32_t Param1, uint8_t *ParametersTable) -> HAL_StatusTypeDef = 0;

virtual auto HAL_LTDC_StructInitFromVideoConfig(LTDC_HandleTypeDef *hltdc, DSI_VidCfgTypeDef *VidCfg)
-> HAL_StatusTypeDef = 0;
virtual auto HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc) -> HAL_StatusTypeDef = 0;
virtual auto HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg, uint32_t LayerIdx)
-> HAL_StatusTypeDef = 0;
virtual auto HAL_LTDC_StructInitFromVideoConfig(LTDC_HandleTypeDef *hltdc,
DSI_VidCfgTypeDef *VidCfg) -> HAL_StatusTypeDef = 0;
virtual auto HAL_LTDC_Init(LTDC_HandleTypeDef *hltdc) -> HAL_StatusTypeDef = 0;
virtual auto HAL_LTDC_ConfigLayer(LTDC_HandleTypeDef *hltdc, LTDC_LayerCfgTypeDef *pLayerCfg,
uint32_t LayerIdx) -> HAL_StatusTypeDef = 0;

virtual auto HAL_JPEG_Init(JPEG_HandleTypeDef *hjpeg) -> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_GetInfo(JPEG_HandleTypeDef *hjpeg, JPEG_ConfTypeDef *pInfo) -> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_Decode(JPEG_HandleTypeDef *hjpeg, uint8_t *pDataIn, uint32_t InDataLength,
uint8_t *pDataOutMCU, uint32_t OutDataLength, uint32_t Timeout)
-> HAL_StatusTypeDef = 0;
uint8_t *pDataOutMCU, uint32_t OutDataLength,
uint32_t Timeout) -> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_Decode_DMA(JPEG_HandleTypeDef *hjpeg, uint8_t *pDataIn, uint32_t InDataLength,
uint8_t *pDataOutMCU, uint32_t OutDataLength) -> HAL_StatusTypeDef = 0;
uint8_t *pDataOutMCU, uint32_t OutDataLength) -> HAL_StatusTypeDef = 0;
virtual void HAL_JPEG_ConfigInputBuffer(JPEG_HandleTypeDef *hjpeg, uint8_t *pNewInputBuffer,
uint32_t InDataLength) = 0;
uint32_t InDataLength) = 0;
virtual void HAL_JPEG_ConfigOutputBuffer(JPEG_HandleTypeDef *hjpeg, uint8_t *pNewOutputBuffer,
uint32_t OutDataLength) = 0;

virtual auto HAL_JPEG_RegisterInfoReadyCallback(JPEG_HandleTypeDef *hjpeg, pJPEG_InfoReadyCallbackTypeDef)
-> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_RegisterGetDataCallback(JPEG_HandleTypeDef *hjpeg, pJPEG_GetDataCallbackTypeDef)
-> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_RegisterDataReadyCallback(JPEG_HandleTypeDef *hjpeg, pJPEG_DataReadyCallbackTypeDef)
-> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_RegisterCallback(JPEG_HandleTypeDef *hjpeg, HAL_JPEG_CallbackIDTypeDef, pJPEG_CallbackTypeDef)
-> HAL_StatusTypeDef = 0;
uint32_t OutDataLength) = 0;

virtual auto HAL_JPEG_RegisterInfoReadyCallback(JPEG_HandleTypeDef *hjpeg,
pJPEG_InfoReadyCallbackTypeDef) -> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_RegisterGetDataCallback(JPEG_HandleTypeDef *hjpeg,
pJPEG_GetDataCallbackTypeDef) -> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_RegisterDataReadyCallback(JPEG_HandleTypeDef *hjpeg,
pJPEG_DataReadyCallbackTypeDef) -> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_RegisterCallback(JPEG_HandleTypeDef *hjpeg, HAL_JPEG_CallbackIDTypeDef,
pJPEG_CallbackTypeDef) -> HAL_StatusTypeDef = 0;

virtual auto HAL_JPEG_Pause(JPEG_HandleTypeDef *hjpeg, uint32_t XferSelection) -> HAL_StatusTypeDef = 0;
virtual auto HAL_JPEG_Resume(JPEG_HandleTypeDef *hjpeg, uint32_t XferSelection) -> HAL_StatusTypeDef = 0;
Expand Down
4 changes: 2 additions & 2 deletions libs/Utils/include/MathUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
namespace leka::utils::math {

template <typename OutputType, typename IntputType>
constexpr auto map(IntputType x, IntputType in_min, IntputType in_max, OutputType out_min, OutputType out_max)
-> OutputType
constexpr auto map(IntputType x, IntputType in_min, IntputType in_max, OutputType out_min,
OutputType out_max) -> OutputType
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
Expand Down
2 changes: 1 addition & 1 deletion spikes/lk_reinforcer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace motor {
auto speed = CorePwm {MOTOR_RIGHT_PWM};

} // namespace right
} // namespace internal
} // namespace internal

auto left = CoreMotor {internal::left::dir_1, internal::left::dir_2, internal::left::speed};
auto right = CoreMotor {internal::right::dir_1, internal::right::dir_2, internal::right::speed};
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/headers/mbed/mbed_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Automatically generated configuration file.
// DO NOT EDIT, content will be overwritten.

// clang-format off

#ifndef __MBED_CONFIG_DATA__
#define __MBED_CONFIG_DATA__

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/stubs/stubs/mbed/source/QSPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ auto QSPI::read(qspi_inst_t instruction, int alt, int address, char *rx_buffer,
return QSPI_STATUS_OK;
}

auto QSPI::write(qspi_inst_t instruction, int alt, int address, const char *tx_buffer, std::size_t *tx_length)
-> qspi_status_t
auto QSPI::write(qspi_inst_t instruction, int alt, int address, const char *tx_buffer,
std::size_t *tx_length) -> qspi_status_t
{
leka::spy_QSPI_command = instruction;
leka::spy_QSPI_address = address;
Expand Down

0 comments on commit f0da19a

Please sign in to comment.