Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
💚 Add Version CI (#7)
Browse files Browse the repository at this point in the history
* 💚 Add deploy for 0.0.1
  • Loading branch information
FluffyFTW authored Mar 7, 2024
1 parent 0455099 commit f7f9d9c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/0.0.1.yml
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions .github/workflows/deploy-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 🚀 Deploy Version

on:
workflow_call:
inputs:
version:
type: string
required: true

jobs:
cortex-m4f:
uses: libhal/ci/.github/workflows/[email protected]
with:
arch: cortex-m4f
version: ${{ inputs.version }}
os: baremetal
compiler: gcc
compiler_version: 12.3
compiler_package: arm-gnu-toolchain
secrets: inherit
2 changes: 1 addition & 1 deletion include/libhal-stm32f4/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/output_pin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -49,7 +49,7 @@ power::power(peripheral p_peripheral)
auto bus_number = peripheral_value / bus_id_offset;

m_bit_position = static_cast<std::uint8_t>(peripheral_value % bus_id_offset);
m_enable_register = enable(bus_number);
m_enable_register = enable(static_cast<uint32_t>(bus_number));
}

void power::on()
Expand Down

0 comments on commit f7f9d9c

Please sign in to comment.