helmi_mjd
Member level 2
Hi!
I have simple c program but i could find the problem. The compiler give me error:
'PORTBbits' undeclared (first use in this function)
Where is my mistake?
1. File: main.c
#include<p30f4013.h>
#include "HardwareProfile.h"
void subroutine1(void);
void subroutine2(void);
int main()
{
LED1 = 0;
}
void subroutine1(void)
{
LED1 = 1;
}
2. File: subroutine.c
#include "HardwareProfile.h"
void subroutine2(void)
{
LED2 = 0;
}
3. File: HardwareProfile.h
#define LED1 PORTBbits.RB1
#define LED2 PORTBbits.RB10
I have simple c program but i could find the problem. The compiler give me error:
'PORTBbits' undeclared (first use in this function)
Where is my mistake?
1. File: main.c
#include<p30f4013.h>
#include "HardwareProfile.h"
void subroutine1(void);
void subroutine2(void);
int main()
{
LED1 = 0;
}
void subroutine1(void)
{
LED1 = 1;
}
2. File: subroutine.c
#include "HardwareProfile.h"
void subroutine2(void)
{
LED2 = 0;
}
3. File: HardwareProfile.h
#define LED1 PORTBbits.RB1
#define LED2 PORTBbits.RB10