Skip to content

Conversation

@jalelgaming
Copy link

I tried to do something....I will be waiting for your feedback.

I tried to do something....I will be waiting for your feedback.
#ifdef __MK20DX256__ // Teensy Compile
#else //on windows
void delay(int milliseconds){};
void delay(unsigned long milliseconds){};
Copy link
Member

@blhough blhough Aug 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the functions actually need to be static as well, my bad. This is to prevent any linker problems during compiling

static void delay(unsigned long milliseconds){};

all of them need to be static

@blhough
Copy link
Member

blhough commented Aug 1, 2016

looking pretty good so far

to make things a little cleaner you can get rid of the duplicate #ifdef's

so this:

#ifdef __MK20DX256__ // Teensy Compile
#else //on windows
    static void delay(unsigned long milliseconds){};
#endif

#ifdef __MK20DX256__ // Teensy Compile
#else //on windows
    static void digitalWrite(int pin, bool high){};
#endif

could become

#ifdef __MK20DX256__ // Teensy Compile
#else //on windows
    static void delay(unsigned long milliseconds){};
    static void digitalWrite(int pin, bool high){};
#endif

@blhough
Copy link
Member

blhough commented Aug 1, 2016

Are you using an IDE like Visual Studio or xcode?
Being able to compile is necessary to test the code

@jalelgaming
Copy link
Author

jalelgaming commented Aug 2, 2016

I am using an editor. I will move on and complete it on an IDE. The problem is that I do not have some header files.

@blhough
Copy link
Member

blhough commented Aug 2, 2016

What header files are you missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants