-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pio - use memory branch of ASMParser (temp) UserModLive: addExternal pinMode, digitalWrite, delay
- Loading branch information
1 parent
c3141e7
commit 473287d
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
external void show(); | ||
external void pinMode(uint8_t pin, uint8_t mode); | ||
external void digitalWrite(uint8_t pin, uint8_t val); | ||
external void delay(uint32_t ms); | ||
//external void pinsM->allocatePin(unsigned8 pinNr, const char * owner, const char * details); //classes supported? | ||
|
||
//how to deal with external defines? | ||
define OUTPUT 0x03 | ||
define LOW 0x0 | ||
define HIGH 0x1 | ||
|
||
uint8_t blinkPin; //tbd: assigment here | ||
|
||
void setup() | ||
{ | ||
blinkPin = 5; //tbd make blinkPin an ui control | ||
|
||
//pinsM->allocatePin(2, "Blink", "On board led"); //class methods and strings supported? | ||
pinMode(blinkPin, OUTPUT); //tbd: part of allocatePin? | ||
} | ||
|
||
void loop() { | ||
digitalWrite(blinkPin, HIGH); // turn the LED on (HIGH is the voltage level) | ||
delay(1000); // wait for a second | ||
digitalWrite(blinkPin, LOW); // turn the LED off by making the voltage LOW | ||
delay(1000); // wait for a second | ||
} | ||
|
||
void main() | ||
{ | ||
setup(); | ||
while (0==0) | ||
{ | ||
loop(); | ||
show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters