Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
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
Assignees
Labels
featureNew feature priority: minorMinor priority - Probably won't be implemented soon
Milestone
@MrPointer

Description

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

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    AltStyle によって変換されたページ (->オリジナル) /