Commit 1459a6d5 authored by Alessandro Rubini's avatar Alessandro Rubini

warnings: various things to clean wrc_main.c

This adds all missing prototypes and removes unused variables.
It includes a generic <wrc.h> (which btw includes the printf
prototype, not in uart.h any more) and other needed bits.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 3e4ee323
#ifndef __SOCKITOWM_H__
#define __SOCKITOWM_H__
#include "sockitowm/ownet.h"
#endif /* __SOCKITOWM_H__ */
#ifndef __UART_H
#define __UART_H
int mprintf(char const *format, ...)
__attribute__((format(printf,1,2)));
void uart_init();
void uart_init(void);
void uart_write_byte(int b);
void uart_write_string(char *s);
int uart_read_byte(void);
#endif
#ifndef __WRC_H__
#define __WRC_H__
/*
* This header includes all generic prototypes that were missing
* in earlier implementations. For example, the monitor is only
* one function and doesn't deserve an header of its own.
* Also, this brings in very common and needed headers
*/
int mprintf(char const *format, ...)
__attribute__((format(printf,1,2)));
int wrc_mon_gui(void);
/* The following from ptp-noposix */
extern void wr_servo_reset(void);
#endif /* __WRC_H__ */
......@@ -3,6 +3,7 @@
#include <stdarg.h>
#include <wrc.h>
#include "syscon.h"
#include "uart.h"
#include "endpoint.h"
......@@ -14,6 +15,8 @@
//#include "eeprom.h"
#include "softpll_ng.h"
#include "onewire.h"
#include "pps_gen.h"
#include "sockitowm.h"
#include "shell.h"
#include "lib/ipv4.h"
......@@ -30,9 +33,7 @@ uint32_t cal_phase_transition = 2389;
void wrc_initialize()
{
int ret, i;
uint8_t mac_addr[6], ds18_id[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
char sfp_pn[17];
uint8_t mac_addr[6];
sdb_find_devices();
uart_init();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment