add new function to wiring_digital.c

Hello!
I am trying to add new function "MydigitalWrite" to wiring_digital.c () (\arduino-0017\hardware\cores\arduino)

When I try to compile:
In function 'void loop()':
error: 'MydigitalWrite' was not declared in this scope

How to win this problem?

Hello!

I am trying to add new function "MydigitalWrite" to wiring_digital.c () (\arduino-0017\hardware\cores\arduino)

When I try to compile:
In function 'void loop()':
error: 'MydigitalWrite' was not declared in this scope

How to win this problem?

There should be no reason to modify the core function in the wiring library.

Just write your new function directly following the loop() function in your sketch:

void MydigitalWrite( int argument1, int argument2, etc.)
{
//your new code
// more code
}

Then you can use your new function anywhere in the setup or loop function of your sketch.

Lefty

there is one reason
standart digitalwrite spends a lot of time to switch on or switch of massive of pins
i think i can do it, if i modify standart digitalWrite

Why do you want to modify digitalWrite? To make it faster?

No. i want create new to switch on or off massive of pins
i cant use like this

for(int i=0;i<10;i++)
{
digitalWrite(i,HIGH);
}

because it spend a lot of time

i only need add new function to \arduino-0017\hardware\cores\arduinowiring_digital.c

No. i want create new to switch on or off massive of pins

Have you considered direct port access?

Yes but i found nothing
How i can do it? there is special function?

i want to do it like this

out = portOutputRegister(port);
if (val == LOW) *out &= ~bit;
      else *out |= bit;

that is why i need to add new function

Yes but i found nothing

http://www.google.com/search?q=arduino+port

How i can do it? there is special function?

thank you