Closed apcountryman closed 1 month ago
Add peripheral instance template.
libraries/microlibrary/ANY/ANY/include/microlibrary/peripheral.h
libraries/microlibrary/ANY/ANY/source/microlibrary/peripheral.cc
::microlibrary::Peripheral::Instance
docs/peripheral.md
typename T
std::uintptr_t INSTANCE_ADDRESS
using Type = T;
static constexpr auto ADDRESS = INSTANCE_ADDRESS:
static auto instance() noexcept -> Type *;
Add peripheral instance template.
libraries/microlibrary/ANY/ANY/include/microlibrary/peripheral.h
/libraries/microlibrary/ANY/ANY/source/microlibrary/peripheral.cc
(update)::microlibrary::Peripheral::Instance
template classdocs/peripheral.md
(update)::microlibrary::Peripheral::Instance
template class should have the following template parameters:typename T
: The type of the peripheral instancestd::uintptr_t INSTANCE_ADDRESS
: The address of the peripheral instance::microlibrary::Peripheral::Instance
template class should have the following member types:using Type = T;
: The type of the peripheral instance::microlibrary::Peripheral::Instance
template class should have the following member constants:static constexpr auto ADDRESS = INSTANCE_ADDRESS:
: The address of the peripheral instance::microlibrary::Peripheral::Instance
template class should support the following operations:static auto instance() noexcept -> Type *;
: Access the peripheral instance