Hello,
I created a simple program with a header file and an external C file for handling low-level functions. I am getting this warning for both of these files,
"HARDWARE.H(30): warning: #1-D: last line of file ends without a newline"
I noticed it was doing the same for the main.c program, so I added a blank space and it went away. This was not the case for the external files. I included the header file in my main.c program.
hardware.h
// Port A Definitions #define SPI_PORT GPIOA #define CS_TEMP GPIO_Pin_4 #define CS_DAC GPIO_Pin_9 #define BRAKE_PORT GPIOA #define BRAKE GPIO_Pin_11 // Port B Definitions #define MAIN_PORT GPIOB #define RESET_MOTOR GPIO_Pin_0 #define COAST GPIO_Pin_1 #define DIRO GPIO_Pin_2 #define PWM GPIO_Pin_6 #define ESF GPIO_Pin_10 #define DIR GPIO_Pin_11 #define FAULT1 GPIO_Pin_12 #define FAULT2 GPIO_Pin_13 #define MODE GPIO_Pin_14
// Functions int get_temperature(void);
hardware.c
#include "hardware.h"
int get_temperature(void) { int dummy; dummy = 16; return dummy; }
I am just trying to get the basic functionality working before I continue. Your help would be appreciated!
Stephen