diff --git a/.github/workflows/0.0.1.yml b/.github/workflows/0.0.1.yml new file mode 100644 index 0000000..169e163 --- /dev/null +++ b/.github/workflows/0.0.1.yml @@ -0,0 +1,11 @@ +name: 🚀 Release 0.0.1 + +on: + workflow_dispatch: + +jobs: + deploy: + uses: ./.github/workflows/deploy-version.yml + with: + version: 0.0.1 + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/deploy-version.yml b/.github/workflows/deploy-version.yml new file mode 100644 index 0000000..651ade4 --- /dev/null +++ b/.github/workflows/deploy-version.yml @@ -0,0 +1,20 @@ +name: 🚀 Deploy Version + +on: + workflow_call: + inputs: + version: + type: string + required: true + +jobs: + cortex-m4f: + uses: libhal/ci/.github/workflows/deploy.yml@5.x.y + with: + arch: cortex-m4f + version: ${{ inputs.version }} + os: baremetal + compiler: gcc + compiler_version: 12.3 + compiler_package: arm-gnu-toolchain + secrets: inherit diff --git a/include/libhal-stm32f4/constants.hpp b/include/libhal-stm32f4/constants.hpp index 7cbce57..b62ff12 100644 --- a/include/libhal-stm32f4/constants.hpp +++ b/include/libhal-stm32f4/constants.hpp @@ -36,7 +36,7 @@ static constexpr std::uint32_t apb2_bus = bus_id_offset * 4; static constexpr std::uint32_t beyond = bus_id_offset * 5; /// List of each peripheral and their power on id number for this platform -enum class peripheral : std::uint8_t +enum class peripheral : std::uint32_t { gpio_a = ahb1_bus + 0, gpio_b = ahb1_bus + 1, diff --git a/src/output_pin.cpp b/src/output_pin.cpp index 52176e1..73fc5a1 100644 --- a/src/output_pin.cpp +++ b/src/output_pin.cpp @@ -26,7 +26,7 @@ output_pin::output_pin(hal::stm32f4::peripheral p_port, , m_pin(p_pin) { power(p_port).on(); - driver_configure(p_settings); + output_pin::driver_configure(p_settings); } void output_pin::driver_configure(const settings& p_settings) diff --git a/src/power.cpp b/src/power.cpp index e39db21..fbe1efd 100644 --- a/src/power.cpp +++ b/src/power.cpp @@ -22,7 +22,7 @@ namespace hal::stm32f4 { namespace { -volatile uint32_t* enable(int p_bus_index) +volatile uint32_t* enable(uint32_t p_bus_index) { switch (p_bus_index) { case 0: @@ -49,7 +49,7 @@ power::power(peripheral p_peripheral) auto bus_number = peripheral_value / bus_id_offset; m_bit_position = static_cast(peripheral_value % bus_id_offset); - m_enable_register = enable(bus_number); + m_enable_register = enable(static_cast(bus_number)); } void power::on()