Skip to content

Commit

Permalink
🐛 Fix demos/platforms/stm32f103c8.cpp (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
kammce authored Nov 30, 2024
1 parent 01e42fe commit 3e8eef3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion demos/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


class demos(ConanFile):
python_requires = "libhal-bootstrap/[^4.0.0]"
python_requires = "libhal-bootstrap/[^4.0.3]"
python_requires_extend = "libhal-bootstrap.demo"

def requirements(self):
Expand Down
19 changes: 10 additions & 9 deletions demos/platforms/stm32f103c8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@

#include <libhal/units.hpp>

#include <libhal-armcortex/dwt_counter.hpp>
#include <libhal-armcortex/startup.hpp>
#include <libhal-armcortex/system_control.hpp>

#include <libhal-arm-mcu/dwt_counter.hpp>
#include <libhal-arm-mcu/startup.hpp>
#include <libhal-arm-mcu/stm32f1/clock.hpp>
#include <libhal-arm-mcu/stm32f1/constants.hpp>
#include <libhal-arm-mcu/stm32f1/input_pin.hpp>
#include <libhal-arm-mcu/stm32f1/output_pin.hpp>
#include <libhal-arm-mcu/stm32f1/spi.hpp>
#include <libhal-arm-mcu/stm32f1/uart.hpp>
#include <libhal-soft/bit_bang_spi.hpp>
#include <libhal-arm-mcu/system_control.hpp>
#include <libhal-util/bit_bang_spi.hpp>
#include <libhal-util/steady_clock.hpp>

#include <resource_list.hpp>
Expand Down Expand Up @@ -72,11 +71,13 @@ void initialize_platform(resource_list& p_resources)
static hal::stm32f1::output_pin sck('A', 5);
static hal::stm32f1::output_pin copi('A', 6);
static hal::stm32f1::input_pin cipo('A', 7);
static hal::soft::bit_bang_spi::pins bit_bang_spi_pins{ .sck = &sck,
.copi = &copi,
.cipo = &cipo };
static hal::bit_bang_spi::pins bit_bang_spi_pins{
.sck = &sck,
.copi = &copi,
.cipo = &cipo,
};

static hal::soft::bit_bang_spi bit_bang_spi(
static hal::bit_bang_spi bit_bang_spi(
bit_bang_spi_pins, steady_clock, spi_settings);
spi = &bit_bang_spi;
} else {
Expand Down

0 comments on commit 3e8eef3

Please sign in to comment.