Hola compañeros,
Lo digo sinceramente CCS me encanta por su facilidad, pero a veces me lleva a la desesperación por tonterias como esta...Resulta que he creado unos ficheros llamados Prueba.h y Prueba.c como se ven a continuación.
Prueba.h
#ifndef _PRUEBA_H
#define _PRUEBA_H
#define PRUEBA 0x00
#ifndef PIN
#define LED PIN_A0
#endif
void init(void);
#endif
Prueba.c
#include <Prueba.h>
unsigned int uiVar;
void init(void)
{
outputhigh(LED);
uiVar=0;
}Más tarde incluyo en el main.c el Prueba.h y llamo a la función init()
main.c
#include <18F44K20.h>
#fuses HS, NOPROTECT, NOLVP
#use delay(clock=12M)
#use rs232(baud=115200, xmit=PIN_C6, rcv=PIN_C7)
#include <Prueba.h>
void main(void) {
printf("Welcome");
delay_ms(1000);
init();
while (TRUE)
{
}
}
Dándome como error el "Function used but not defined: ... init SCR=619" en la línea init()... ¿Qué estoy haciendo mal?...Estoy compilando a través de MPLab...Alguna solución...llevo 1 hora intentando ver donde está el error pero no lo encuentro...
Gracias compañeros
