many warning cleanups.

Contributed by Clive Stubbings.
This commit is contained in:
Mariano Alvira 2010-03-13 07:30:47 -05:00
parent 7ff7528c85
commit fecb5e7bdb
11 changed files with 27 additions and 27 deletions

View file

@ -3,7 +3,7 @@
#define LED_RED 12
#define LED_GREEN 21
#define LED_BLUE 35
#define LED_BLUE 0 /* FIXME: Was 35 - in high GPIO bank so it doesn't work */
/* XTAL TUNE parameters */
/* see http://devl.org/pipermail/mc1322x/2009-December/000162.html */

View file

@ -1,9 +1,9 @@
#ifndef BOARD_REDBEE_DEV_H
#define BOARD_REDBEE_DEV_H
#define LED_RED (1 << 23)
#define LED_GREEN (1 << 24)
#define LED_BLUE (1 << 25)
#define LED_RED 23
#define LED_GREEN 24
#define LED_BLUE 25
/* XTAL TUNE parameters */
/* see http://devl.org/pipermail/mc1322x/2009-December/000162.html */

View file

@ -70,29 +70,29 @@ void Print_Packets(char *s) {
int i = 0;
printf("packet pool after %s:\n\r",s);
p = free_head;
printf("free_head: 0x%x ",free_head);
printf("free_head: 0x%x ", (uint32_t) free_head);
while(p != 0) {
i++;
p = p->left;
printf("->0x%x",p);
printf("->0x%x", (uint32_t) p);
}
printf("\n\r");
p = tx_head;
printf("tx_head: 0x%x ",tx_head);
printf("tx_head: 0x%x ", (uint32_t) tx_head);
while(p != 0) {
i++;
p = p->left;
printf("->0x%x",p);
printf("->0x%x", (uint32_t) p);
}
printf("\n\r");
p = rx_head;
printf("rx_head: 0x%x ",rx_head);
printf("rx_head: 0x%x ", (uint32_t) rx_head);
while(p != 0) {
i++;
p = p->left;
printf("->0x%x",p);
printf("->0x%x", (uint32_t) p);
}
printf("\n\r");
printf("found %d packets\n\r",i);

View file

@ -8,11 +8,11 @@
void main(void) {
volatile uint32_t i;
*GPIO_PAD_DIR0 = ( 1<< LED );
*GPIO_PAD_DIR0 = LED;
while(1) {
*GPIO_DATA0 = (1 << LED );
*GPIO_DATA0 = LED;
for(i=0; i<DELAY; i++) { continue; }

View file

@ -8,11 +8,11 @@
void main(void) {
volatile uint32_t i;
*GPIO_PAD_DIR0 = ( 1<< LED );
*GPIO_PAD_DIR0 = LED;
while(1) {
*GPIO_DATA0 = (1 << LED );
*GPIO_DATA0 = LED;
for(i=0; i<DELAY; i++) { continue; }

View file

@ -8,11 +8,11 @@
void main(void) {
volatile uint32_t i;
*GPIO_PAD_DIR0 = ( 1<< LED );
*GPIO_PAD_DIR0 = LED;
while(1) {
*GPIO_DATA0 = (1 << LED );
*GPIO_DATA0 = LED;
for(i=0; i<DELAY; i++) { continue; }

View file

@ -1,5 +1,6 @@
#include <mc1322x.h>
#include <board.h>
#include "led.h"
#define DELAY 400000
@ -8,11 +9,11 @@
void main(void) {
volatile uint32_t i;
*GPIO_PAD_DIR0 = ( 1<< LED );
*GPIO_PAD_DIR0 = LED;
while(1) {
*GPIO_DATA0 = (1 << LED );
*GPIO_DATA0 = LED;
for(i=0; i<DELAY; i++) { continue; }

View file

@ -28,7 +28,7 @@ enum PACKET_TYPE {
};
/* get protocol level packet type */
/* this is not 802.15.4 packet type */
ptype_t get_packet_type(packet_t *p) {
ptype_t get_packet_type(packet_t * p __attribute__((unused))) {
return MAX_PACKET_TYPE;
}
@ -56,7 +56,7 @@ void build_session_req(volatile packet_t *p) {
return;
}
void session_req(short_addr_t addr) {
void session_req(short_addr_t addr __attribute__((unused))) {
static volatile int time = 0;
volatile packet_t *p;
@ -70,7 +70,7 @@ void session_req(short_addr_t addr) {
return;
}
session_id_t open_session(short_addr_t addr) { return 0; }
session_id_t open_session(short_addr_t addr __attribute((unused))) { return 0; }
void main(void) {
uint32_t state;
@ -82,7 +82,7 @@ void main(void) {
/* trim the reference osc. to 24MHz */
pack_XTAL_CNTL(CTUNE_4PF, CTUNE, FTUNE, IBIAS);
uart_init(INC,MOD);
uart_init(INC, MOD, SAMP);
vreg_init();
@ -109,7 +109,7 @@ void main(void) {
/* extract what we need and free the packet */
printf("Recv: ");
print_packet(p);
type = get_packet_type(p);
type = get_packet_type((packet_t *) p);
addr = p->addr;
free_packet(p);
/* pick a new address if someone else is using ours */

View file

@ -27,7 +27,7 @@ int main(void)
printf("hex %x = ff\n", 0xff);
printf("hex %02x = 00\n", 0);
printf("signed %d = unsigned %u = hex %x\n", -3, -3, -3);
printf("%d %s(s)%", 0, "message");
printf("%d %s(s)", 0, "message");
printf("\n");
printf("%d %s(s) with %%\n", 0, "message");
// sprintf(buf, "justif: \"%-10s\"\n", "left"); printf("%s", buf);

View file

@ -35,9 +35,9 @@ void dump_regs(uint32_t base, uint32_t len) {
printf("base +0 +4 +8 +c +10 +14 +18 +1c \n\r");
for (i = 0; i < len; i ++) {
if ((i & 7) == 0) {
printf("%02x",4 * i);
printf("%02x",(uint32_t)(4 * i));
}
printf(" %08x",*mem32(base+(4*i)));
printf(" %08x",(uint32_t)*mem32(base+(4*i)));
if ((i & 7) == 7)
printf(NL);
}

View file

@ -5,7 +5,6 @@
#include "config.h"
void main(void) {
volatile char c;
uart1_init(INC,MOD,SAMP);