Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Generate function prototypes when converting sketches #32

Open
@MrPointer

Description

@MrPointer

The Arduino Build-Process Specification specifies:

Prototypes are generated for all function definitions in .ino files that don't already have prototypes. In some rare cases prototype generation may fail for some functions. To work around this, you can provide your own prototypes for these functions.

In their terminology, prototypes are simply function declarations, or signatures.
For example, given the following sketch file:

void setup()
{
    foo(5, 1);
}

void loop() {}

void foo(int pin, int iterations) 
{
    // Do something with arguments
}

The following prototype/declaration will be generated above the setup function in the converted source:

void foo(int pin, int iterations);

This is necessary for a source file to be valid and compile as required - Otherwise the compiler will complain it can't find declarations for the function symbol (foo in our example).

Metadata

Metadata

Assignees

Labels

featureNew featurepriority: minorMinor priority - Probably won't be implemented soon

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions