Updated prototypes and include as required and found by compile with extra checking.
This commit is contained in:
@@ -17,6 +17,7 @@ OBJDUMP = avr-objdump
|
|||||||
SIZE = avr-size
|
SIZE = avr-size
|
||||||
AVRDUDE = avrdude
|
AVRDUDE = avrdude
|
||||||
LINT = splint
|
LINT = splint
|
||||||
|
LINT_MCU = __AVR_ATmega644p__
|
||||||
|
|
||||||
SIZE_OPTIONS = -t
|
SIZE_OPTIONS = -t
|
||||||
#SIZE_OPTIONS = -C --mcu=${MCU}
|
#SIZE_OPTIONS = -C --mcu=${MCU}
|
||||||
@@ -188,6 +189,7 @@ CFLAGS += -fshort-enums
|
|||||||
# warnings
|
# warnings
|
||||||
CFLAGS += -Wall
|
CFLAGS += -Wall
|
||||||
CFLAGS += -Wstrict-prototypes
|
CFLAGS += -Wstrict-prototypes
|
||||||
|
CFLAGS += -Wmissing-prototypes
|
||||||
# put it all together
|
# put it all together
|
||||||
CFLAGS += -gdwarf-2 $(BFLAGS) $(OPTIMIZATION)
|
CFLAGS += -gdwarf-2 $(BFLAGS) $(OPTIMIZATION)
|
||||||
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
|
CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d
|
||||||
@@ -319,7 +321,7 @@ size: ${TARGET_ELF}
|
|||||||
@${SIZE} ${SIZE_OPTIONS} ${TARGET_ELF}
|
@${SIZE} ${SIZE_OPTIONS} ${TARGET_ELF}
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
$(LINT) $(BFLAGS) $(CSRC)
|
$(LINT) -exportlocal -D$(LINT_MCU) $(BFLAGS) $(CSRC)
|
||||||
|
|
||||||
install: $(TARGET_ELF)
|
install: $(TARGET_ELF)
|
||||||
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_INSTALL)
|
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_INSTALL)
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
|
/* me */
|
||||||
|
#include "adc.h"
|
||||||
|
|
||||||
/* prescale select bits */
|
/* prescale select bits */
|
||||||
#if (F_CPU >> 1) < 1000000
|
#if (F_CPU >> 1) < 1000000
|
||||||
|
|||||||
@@ -45,6 +45,8 @@
|
|||||||
#include "av.h"
|
#include "av.h"
|
||||||
#include "bi.h"
|
#include "bi.h"
|
||||||
#include "bo.h"
|
#include "bo.h"
|
||||||
|
/* me */
|
||||||
|
#include "bacnet.h"
|
||||||
|
|
||||||
/* MAC Address of MS/TP */
|
/* MAC Address of MS/TP */
|
||||||
static uint8_t MSTP_MAC_Address;
|
static uint8_t MSTP_MAC_Address;
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ bool Binary_Output_Present_Value_Set(
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Binary_Output_Polarity_Set(
|
static void Binary_Output_Polarity_Set(
|
||||||
uint32_t instance,
|
uint32_t instance,
|
||||||
BACNET_POLARITY polarity)
|
BACNET_POLARITY polarity)
|
||||||
{
|
{
|
||||||
@@ -231,7 +231,7 @@ void Binary_Output_Polarity_Set(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Binary_Output_Out_Of_Service_Set(
|
static void Binary_Output_Out_Of_Service_Set(
|
||||||
uint32_t instance,
|
uint32_t instance,
|
||||||
bool flag)
|
bool flag)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1348,6 +1348,7 @@ void dlmstp_get_broadcast_address(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TEST_MSTP_STATE_TEXT
|
||||||
char *dlmstp_receive_state_text(
|
char *dlmstp_receive_state_text(
|
||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
@@ -1366,7 +1367,9 @@ char *dlmstp_receive_state_text(
|
|||||||
|
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef TEST_MSTP_STATE_TEXT
|
||||||
char *dlmstp_master_state_text(
|
char *dlmstp_master_state_text(
|
||||||
void)
|
void)
|
||||||
{
|
{
|
||||||
@@ -1395,3 +1398,4 @@ char *dlmstp_master_state_text(
|
|||||||
|
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
@@ -23,6 +23,8 @@
|
|||||||
*
|
*
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
|
/* me */
|
||||||
|
#include "init.h"
|
||||||
|
|
||||||
void init(
|
void init(
|
||||||
void)
|
void)
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
/* me */
|
||||||
|
#include "input.h"
|
||||||
|
|
||||||
static uint8_t Address_Switch;
|
static uint8_t Address_Switch;
|
||||||
static uint8_t Buttons;
|
static uint8_t Buttons;
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
#include "nvdata.h"
|
#include "nvdata.h"
|
||||||
|
/* me */
|
||||||
|
#include "rs485.h"
|
||||||
|
|
||||||
/* baud rate */
|
/* baud rate */
|
||||||
static uint32_t Baud_Rate = 9600;
|
static uint32_t Baud_Rate = 9600;
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
|
/* me */
|
||||||
#include "seeprom.h"
|
#include "seeprom.h"
|
||||||
|
|
||||||
/* the SEEPROM chip select bits A2, A1, and A0 are grounded */
|
/* the SEEPROM chip select bits A2, A1, and A0 are grounded */
|
||||||
@@ -276,7 +277,7 @@ int seeprom_bytes_read(
|
|||||||
* RETURN: number of bytes written, or -1 on error
|
* RETURN: number of bytes written, or -1 on error
|
||||||
* NOTES: only writes from offset to end of page.
|
* NOTES: only writes from offset to end of page.
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
int seeprom_bytes_write_page(
|
static int seeprom_bytes_write_page(
|
||||||
uint16_t eeaddr, /* SEEPROM starting memory address */
|
uint16_t eeaddr, /* SEEPROM starting memory address */
|
||||||
uint8_t * buf, /* data to send */
|
uint8_t * buf, /* data to send */
|
||||||
int len)
|
int len)
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
*
|
*
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
|
/* me */
|
||||||
|
#include "stack.h"
|
||||||
|
|
||||||
/* stack checking */
|
/* stack checking */
|
||||||
extern uint8_t _end;
|
extern uint8_t _end;
|
||||||
|
|||||||
@@ -30,6 +30,8 @@
|
|||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
#include "bo.h"
|
#include "bo.h"
|
||||||
|
/* me */
|
||||||
|
#include "test.h"
|
||||||
|
|
||||||
/* timer for test task */
|
/* timer for test task */
|
||||||
static struct itimer Test_Timer;
|
static struct itimer Test_Timer;
|
||||||
|
|||||||
Reference in New Issue
Block a user