Code Monkey home page Code Monkey logo

Comments (2)

MCUdude avatar MCUdude commented on June 11, 2024 1

I you look at the iom328pb.h file that the avr-gc compiler uses, you can see what's defined and what's not.
My file is located at (boards manager install on Windows):
C:\Users\Hans\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\avr\include\avr\iom328pb.h

I've also added some compatibility macros here, but it seems like the iom328pb.h file has changed since then.

// Make sure the ATmega328PB is backwards compatible with the 328 and 328P
#if defined(__AVR_ATmega328PB__)
// SPI
#define SPCR SPCR0
#define SPSR SPSR0
#define SPDR SPDR0
#define SPI_STC_vect SPI0_STC_vect
#define SPI_STC_vect_num SPI0_STC_vect_num
// I2C
#define TWBR TWBR0
#define TWSR TWSR0
#define TWAR TWAR0
#define TWDR TWDR0
#define TWCR TWCR0
#define TWAMR TWAMR0
#define TWI_vect TWI0_vect
#define TWI_vect_num TWI0_vect_num
// UART
#define USART_RX_vect USART0_RX_vect
#define USART_RX_vect_num USART0_RX_vect_num
#define USART_UDRE_vect USART0_UDRE_vect
#define USART_UDRE_vect_num USART0_UDRE_vect_num
#define USART_TX_vect USART0_TX_vect
#define USART_TX_vect_num USART0_TX_vect_num
#endif // 328PB defs

from minicore.

fxframes avatar fxframes commented on June 11, 2024

Thanks!

from minicore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.