Coder Social home page Coder Social logo

Comments (3)

jfpoilpret avatar jfpoilpret commented on September 20, 2024

Hello @susnicek, would you have a concrete example that shows this incompatibility?
Normally, you should be able to develop a program that mixes both, with only one constraint as follows:

You should not include FastArduino headers and AVR libs headers in the same source code file.

But you should be able to have, in the same program:

  • one cpp file including AVR headers
  • another cpp file including FastArduino headers

In this case, compilation and linking should work fine.

If you need to include both headers in the same file, then it will not be possible.
The main reason for that is the avr/io.h header: it is heavily based on macros and dedicated to pure C programs but not optimized for C++; it was a nightmare to use it directly inside a C++ library like FastArduino, where lots of checks can be performed at compile-time.

Cheers,
Jean-Francois

from fast-arduino-lib.

susnicek avatar susnicek commented on September 20, 2024

Hi,
it exactly as you say, a mixed code (inclusion of AVR and FastArduino headers) in one file did not work for me.

Best regards, S.

from fast-arduino-lib.

jfpoilpret avatar jfpoilpret commented on September 20, 2024

As mentioned before, this is not something FastArduino can possibly circumvent, otherwise that would mean removing the possibility to have compile-time errors on usage of unexisting features (ports, IO, timers...)

from fast-arduino-lib.

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.