Skip to content

Commit ae540b0

Browse files
committed
fixed linting
1 parent 16f5d2f commit ae540b0

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

include/libhal-arm-mcu/lpc40/dac.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,7 @@ class dac : public hal::dac
2929
{
3030
public:
3131

32-
//TODO figure out constructors
33-
//not sure if this is a default constructor. Only one pin(i think) can do D/A in this chip
34-
// P[0]26 which i assume is port 0 pin 26
35-
3632
dac();
37-
3833
virtual ~dac() = default;
3934

4035
private:

src/lpc40/dac.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ dac::dac()
3232
void dac::driver_write(float p_percentage)
3333
{
3434
const auto bits_to_modify = static_cast<std::uint32_t>(p_percentage * 1023); // getting the 10 most significant bits to set the value
35-
// then i need to bit_modify this value on the dac_pin's converter register's
36-
// value bits.
37-
3835
hal::bit_modify(dac_reg->conversion_register.whole).insert<dac_converter_register::value>(bits_to_modify);
39-
4036
}
4137
} // namespace hal::lpc40

src/lpc40/dac_reg.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ struct dac_registers
1414
volatile std::uint32_t count_value;
1515
};
1616
namespace dac_converter_register {
17-
///
17+
// Holds the value that we want in the register
1818
static constexpr auto value = hal::bit_mask::from<6,15>();
1919

2020
static constexpr auto bias = hal::bit_mask::from<16>();
2121
}
2222
constexpr std::uintptr_t dac_address = 0x4008'C000;
2323
inline auto* dac_reg = reinterpret_cast<dac_registers*>(dac_address);
2424

25-
} // namespace hal::lpc40// Copyright 2024 Khalil Estell
26-
25+
} // namespace hal::lpc
2726

2827

0 commit comments

Comments
 (0)