Witam, mam taki problem jeśli definiuje funkcje GetKey pliku KPD.c nie mam do niej dostępu mimo jej deklaracji KPD.h oraz dołączeniu pliku KPD.c. Do innych funkcji w tym pliku mam dostęp np. KPD_GetKey. Próbowałem definiować jako extern ale nic nie pomogło. Problem rozwiązuje zdefiniowanie jej w pliku main.c jednakże, chciałbym ją mieć w pliku KPD.c. Kompilator nie wyrzuca żadnych warningów.
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <avr/eeprom.h>
#include <avr/pgmspace.h>
#include "KPD.h"
#include "UART.h"
#include "HD44780.h"
unsigned char GetKey ( void )
{
unsigned char c,Key;
do
{
Key = KPD_GetKey();
if ( Key != 0xFF )
{
c = Key;
break;
}
else {}
} while(1);
return c;
}
void main( void )
{
........
}
