mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-25 15:20:31 -04:00
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:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -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__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue