Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Microchip megaAVR 0-series peripheral instance template #976

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions docs/peripheral.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,6 @@ The `::picolibrary::Microchip::megaAVR0::Peripheral::WDT` class is defined in th
header/source file pair.

## Peripheral Instances
The `::picolibrary::Microchip::megaAVR0::Peripheral::Instance` template class is used to
define Microchip megaAVR 0-series peripheral instances.
The `::picolibrary::Microchip::megaAVR0::Peripheral::Instance` template class is defined
in the
[`include/picolibrary/microchip/megaavr0/peripheral/instance.h`](https://github.com/apcountryman/picolibrary-microchip-megaavr0/blob/main/include/picolibrary/microchip/megaavr0/peripheral/instance.h)/[`source/picolibrary/microchip/megaavr0/peripheral/instance.cc`](https://github.com/apcountryman/picolibrary-microchip-megaavr0/blob/main/source/picolibrary/microchip/megaavr0/peripheral/instance.cc)
header/source file pair.
- To access a peripheral instance, use the
`::picolibrary::Microchip::megaAVR0::Peripheral::Instance::instance()` static member
function.

Microchip megaAVR 0-series peripheral instances are defined in the
[`include/picolibrary/microchip/megaavr0/peripheral.h`](https://github.com/apcountryman/picolibrary-microchip-megaavr0/blob/main/include/picolibrary/microchip/megaavr0/peripheral.h)/[`source/picolibrary/microchip/megaavr0/peripheral.cc`](https://github.com/apcountryman/picolibrary-microchip-megaavr0/blob/main/source/picolibrary/microchip/megaavr0/peripheral.cc)
header/source file pair.
Expand Down
86 changes: 43 additions & 43 deletions include/picolibrary/microchip/megaavr0/peripheral.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "picolibrary/microchip/megaavr0/peripheral/crcscan.h"
#include "picolibrary/microchip/megaavr0/peripheral/evsys.h"
#include "picolibrary/microchip/megaavr0/peripheral/fuse.h"
#include "picolibrary/microchip/megaavr0/peripheral/instance.h"
#include "picolibrary/microchip/megaavr0/peripheral/nvmctrl.h"
#include "picolibrary/microchip/megaavr0/peripheral/port.h"
#include "picolibrary/microchip/megaavr0/peripheral/portmux.h"
Expand All @@ -50,6 +49,7 @@
#include "picolibrary/microchip/megaavr0/peripheral/vport.h"
#include "picolibrary/microchip/megaavr0/peripheral/vref.h"
#include "picolibrary/microchip/megaavr0/peripheral/wdt.h"
#include "picolibrary/peripheral.h"

/**
* \brief Microchip megaAVR 0-series peripheral facilities.
Expand All @@ -59,230 +59,230 @@ namespace picolibrary::Microchip::megaAVR0::Peripheral {
/**
* \brief VPORTA.
*/
using VPORTA = Instance<VPORT, 0x0000>;
using VPORTA = ::picolibrary::Peripheral::Instance<VPORT, 0x0000>;

#if defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) \
|| defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )
/**
* \brief VPORTB.
*/
using VPORTB = Instance<VPORT, 0x0004>;
using VPORTB = ::picolibrary::Peripheral::Instance<VPORT, 0x0004>;
#endif // defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) || defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )

/**
* \brief VPORTC.
*/
using VPORTC = Instance<VPORT, 0x0008>;
using VPORTC = ::picolibrary::Peripheral::Instance<VPORT, 0x0008>;

/**
* \brief VPORTD.
*/
using VPORTD = Instance<VPORT, 0x000C>;
using VPORTD = ::picolibrary::Peripheral::Instance<VPORT, 0x000C>;

#if defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) \
|| defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )
/**
* \brief VPORTE.
*/
using VPORTE = Instance<VPORT, 0x0010>;
using VPORTE = ::picolibrary::Peripheral::Instance<VPORT, 0x0010>;
#endif // defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) || defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )

/**
* \brief VPORTF.
*/
using VPORTF = Instance<VPORT, 0x0014>;
using VPORTF = ::picolibrary::Peripheral::Instance<VPORT, 0x0014>;

/**
* \brief RSTCTRL0.
*/
using RSTCTRL0 = Instance<RSTCTRL, 0x0040>;
using RSTCTRL0 = ::picolibrary::Peripheral::Instance<RSTCTRL, 0x0040>;

/**
* \brief SLPCTRL0.
*/
using SLPCTRL0 = Instance<SLPCTRL, 0x0050>;
using SLPCTRL0 = ::picolibrary::Peripheral::Instance<SLPCTRL, 0x0050>;

/**
* \brief CLKCTRL0.
*/
using CLKCTRL0 = Instance<CLKCTRL, 0x0060>;
using CLKCTRL0 = ::picolibrary::Peripheral::Instance<CLKCTRL, 0x0060>;

/**
* \brief BOD0.
*/
using BOD0 = Instance<BOD, 0x0080>;
using BOD0 = ::picolibrary::Peripheral::Instance<BOD, 0x0080>;

/**
* \brief VREF0.
*/
using VREF0 = Instance<VREF, 0x00A0>;
using VREF0 = ::picolibrary::Peripheral::Instance<VREF, 0x00A0>;

/**
* \brief WDT0.
*/
using WDT0 = Instance<WDT, 0x0100>;
using WDT0 = ::picolibrary::Peripheral::Instance<WDT, 0x0100>;

/**
* \brief CPUINT0.
*/
using CPUINT0 = Instance<CPUINT, 0x0110>;
using CPUINT0 = ::picolibrary::Peripheral::Instance<CPUINT, 0x0110>;

/**
* \brief CRCSCAN0.
*/
using CRCSCAN0 = Instance<CRCSCAN, 0x0120>;
using CRCSCAN0 = ::picolibrary::Peripheral::Instance<CRCSCAN, 0x0120>;

/**
* \brief RTC0.
*/
using RTC0 = Instance<RTC, 0x0140>;
using RTC0 = ::picolibrary::Peripheral::Instance<RTC, 0x0140>;

/**
* \brief EVSYS0.
*/
using EVSYS0 = Instance<EVSYS, 0x0180>;
using EVSYS0 = ::picolibrary::Peripheral::Instance<EVSYS, 0x0180>;

/**
* \brief CCL0.
*/
using CCL0 = Instance<CCL, 0x01C0>;
using CCL0 = ::picolibrary::Peripheral::Instance<CCL, 0x01C0>;

/**
* \brief PORTA.
*/
using PORTA = Instance<PORT, 0x0400>;
using PORTA = ::picolibrary::Peripheral::Instance<PORT, 0x0400>;

#if defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) \
|| defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )
/**
* \brief PORTB.
*/
using PORTB = Instance<PORT, 0x0420>;
using PORTB = ::picolibrary::Peripheral::Instance<PORT, 0x0420>;
#endif // defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) || defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )

/**
* \brief PORTC.
*/
using PORTC = Instance<PORT, 0x0440>;
using PORTC = ::picolibrary::Peripheral::Instance<PORT, 0x0440>;

/**
* \brief PORTD.
*/
using PORTD = Instance<PORT, 0x0460>;
using PORTD = ::picolibrary::Peripheral::Instance<PORT, 0x0460>;

#if defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) \
|| defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )
/**
* \brief PORTE.
*/
using PORTE = Instance<PORT, 0x0480>;
using PORTE = ::picolibrary::Peripheral::Instance<PORT, 0x0480>;
#endif // defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) || defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )

/**
* \brief PORTF.
*/
using PORTF = Instance<PORT, 0x04A0>;
using PORTF = ::picolibrary::Peripheral::Instance<PORT, 0x04A0>;

/**
* \brief PORTMUX0.
*/
using PORTMUX0 = Instance<PORTMUX, 0x05E0>;
using PORTMUX0 = ::picolibrary::Peripheral::Instance<PORTMUX, 0x05E0>;

/**
* \brief ADC0.
*/
using ADC0 = Instance<ADC, 0x0600>;
using ADC0 = ::picolibrary::Peripheral::Instance<ADC, 0x0600>;

/**
* \brief AC0.
*/
using AC0 = Instance<AC, 0x0680>;
using AC0 = ::picolibrary::Peripheral::Instance<AC, 0x0680>;

/**
* \brief USART0.
*/
using USART0 = Instance<USART, 0x800>;
using USART0 = ::picolibrary::Peripheral::Instance<USART, 0x800>;

/**
* \brief USART1.
*/
using USART1 = Instance<USART, 0x820>;
using USART1 = ::picolibrary::Peripheral::Instance<USART, 0x820>;

/**
* \brief USART2.
*/
using USART2 = Instance<USART, 0x840>;
using USART2 = ::picolibrary::Peripheral::Instance<USART, 0x840>;

#if defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) \
|| defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )
/**
* \brief USART3.
*/
using USART3 = Instance<USART, 0x860>;
using USART3 = ::picolibrary::Peripheral::Instance<USART, 0x860>;
#endif // defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) || defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )

/**
* \brief TWI0.
*/
using TWI0 = Instance<TWI, 0x08A0>;
using TWI0 = ::picolibrary::Peripheral::Instance<TWI, 0x08A0>;

/**
* \brief SPI0.
*/
using SPI0 = Instance<SPI, 0x08C0>;
using SPI0 = ::picolibrary::Peripheral::Instance<SPI, 0x08C0>;

/**
* \brief TCA0.
*/
using TCA0 = Instance<TCA, 0x0A00>;
using TCA0 = ::picolibrary::Peripheral::Instance<TCA, 0x0A00>;

/**
* \brief TCB0.
*/
using TCB0 = Instance<TCB, 0x0A80>;
using TCB0 = ::picolibrary::Peripheral::Instance<TCB, 0x0A80>;

/**
* \brief TCB1.
*/
using TCB1 = Instance<TCB, 0x0A90>;
using TCB1 = ::picolibrary::Peripheral::Instance<TCB, 0x0A90>;

/**
* \brief TCB2.
*/
using TCB2 = Instance<TCB, 0x0AA0>;
using TCB2 = ::picolibrary::Peripheral::Instance<TCB, 0x0AA0>;

#if defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) \
|| defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )
/**
* \brief TCB3.
*/
using TCB3 = Instance<TCB, 0x0AB0>;
using TCB3 = ::picolibrary::Peripheral::Instance<TCB, 0x0AB0>;
#endif // defined( __AVR_ATmega809__ ) || defined( __AVR_ATmega1609__ ) || defined( __AVR_ATmega3209__ ) || defined( __AVR_ATmega4809__ )

/**
* \brief SYSCFG0.
*/
using SYSCFG0 = Instance<SYSCFG, 0x0F00>;
using SYSCFG0 = ::picolibrary::Peripheral::Instance<SYSCFG, 0x0F00>;

/**
* \brief NVMCTRL0.
*/
using NVMCTRL0 = Instance<NVMCTRL, 0x1000>;
using NVMCTRL0 = ::picolibrary::Peripheral::Instance<NVMCTRL, 0x1000>;

/**
* \brief SIGROW0.
*/
using SIGROW0 = Instance<SIGROW, 0x1100>;
using SIGROW0 = ::picolibrary::Peripheral::Instance<SIGROW, 0x1100>;

/**
* \brief FUSE0.
*/
using FUSE0 = Instance<FUSE, 0x1280>;
using FUSE0 = ::picolibrary::Peripheral::Instance<FUSE, 0x1280>;

/**
* \brief USERROW0.
*/
using USERROW0 = Instance<USERROW, 0x1300>;
using USERROW0 = ::picolibrary::Peripheral::Instance<USERROW, 0x1300>;

} // namespace picolibrary::Microchip::megaAVR0::Peripheral

Expand Down
74 changes: 0 additions & 74 deletions include/picolibrary/microchip/megaavr0/peripheral/instance.h

This file was deleted.

1 change: 0 additions & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ set(
"picolibrary/microchip/megaavr0/peripheral/crcscan.cc"
"picolibrary/microchip/megaavr0/peripheral/evsys.cc"
"picolibrary/microchip/megaavr0/peripheral/fuse.cc"
"picolibrary/microchip/megaavr0/peripheral/instance.cc"
"picolibrary/microchip/megaavr0/peripheral/nvmctrl.cc"
"picolibrary/microchip/megaavr0/peripheral/port.cc"
"picolibrary/microchip/megaavr0/peripheral/portmux.cc"
Expand Down
Loading