/*
* This is a template for all of the tinyx5 devices, hopefully
*/
-static struct mcu_t {
+const static struct mcu_t {
avr_t core;
avr_eeprom_t eeprom;
avr_watchdog_t watchdog;
.txen = AVR_IO_REGBIT(UCSRB, TXEN),
.rxen = AVR_IO_REGBIT(UCSRB, RXEN),
+ .ucsz = AVR_IO_REGBITS(UCSRC, UCSZ0, 0x3), // 2 bits
+ .ucsz2 = AVR_IO_REGBIT(UCSRB, UCSZ2), // 1 bits
.r_ucsra = UCSRA,
.r_ucsrb = UCSRB,
static avr_t * make()
{
- return &mcu.core;
+ return avr_core_allocate(&mcu.core, sizeof(struct mcu_t));
}
avr_kind_t tiny2313 = {