Hice una pequeña función para un blink LED
#define PILOTO PIN_C2 // Piloto
void blink_led(int1 time_up,int time_down );
//******* Blink LED *********************
void blink_led(int1 time_up,int time_down )
{
output_high(PILOTO); delay_ms(time_up);
output_low(PILOTO); delay_ms(time_down);
}
Funciona bien, pero quiero hacerla mas general, es decir para el pin que yo quiera... así:
void blink_led(PIN , int1 time_up,int time_down )
{
output_high(PIN); delay_ms(time_up);
output_low(PIN); delay_ms(time_down);
}
¿deque forma se puede asignar el bit a PIN?