Formatted code (#1007)

* Updated style

* Updated files

* fixed new line

* Updated spacing

* File fix WIP

* Updated to clang 13

* updated comment style

* Removed old comment code
This commit is contained in:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -34,10 +34,10 @@
*/
#if defined(LPC43XX_M4)
struct Timestamp {
uint32_t tv_date { 0 };
uint32_t tv_time { 0 };
uint32_t tv_date{0};
uint32_t tv_time{0};
static Timestamp now();
static Timestamp now();
};
#endif
@ -47,45 +47,42 @@ struct Timestamp {
using Timestamp = lpc43xx::rtc::RTC;
#endif
template<typename T>
template <typename T>
struct buffer_t {
T* const p;
const size_t count;
const uint32_t sampling_rate;
const Timestamp timestamp;
T* const p;
const size_t count;
const uint32_t sampling_rate;
const Timestamp timestamp;
constexpr buffer_t(
) : p { nullptr },
count { 0 },
sampling_rate { 0 },
timestamp { }
{
}
constexpr buffer_t()
: p{nullptr},
count{0},
sampling_rate{0},
timestamp{} {
}
constexpr buffer_t(
const buffer_t<T>& other
) : p { other.p },
count { other.count },
sampling_rate { other.sampling_rate },
timestamp { other.timestamp }
{
}
constexpr buffer_t(
const buffer_t<T>& other)
: p{other.p},
count{other.count},
sampling_rate{other.sampling_rate},
timestamp{other.timestamp} {
}
constexpr buffer_t(
T* const p,
const size_t count,
const uint32_t sampling_rate = 0,
const Timestamp timestamp = { }
) : p { p },
count { count },
sampling_rate { sampling_rate },
timestamp { timestamp }
{
}
constexpr buffer_t(
T* const p,
const size_t count,
const uint32_t sampling_rate = 0,
const Timestamp timestamp = {})
: p{p},
count{count},
sampling_rate{sampling_rate},
timestamp{timestamp} {
}
operator bool() const {
return (p != nullptr);
}
operator bool() const {
return (p != nullptr);
}
};
#endif/*__BUFFER_H__*/
#endif /*__BUFFER_H__*/