Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix some warnings.

  • Loading branch information...
commit 2c84b743972ec3999e74fbaedc28916d80568e79 1 parent 63f5536
@Sec42 Sec42 authored
View
4 firmware/basic/basic.h
@@ -171,12 +171,12 @@ uint16_t crc16(uint8_t * buf, int len);
// menu.c
struct MENU_DEF {
- char *text;
+ const char *text;
void (*callback)(void);
};
struct MENU {
- char *title;
+ const char *title;
struct MENU_DEF entries[];
};
View
2  firmware/l0dable/1boot.c
@@ -117,7 +117,7 @@ static bool screen_overview() {
while (key != BTN_ENTER) {
lcdClear();
lcdPrintln("Privacy:");
- lcdPrintln(levels[GLOBAL(privacy)]);
+ lcdPrintln(levels[(int)GLOBAL(privacy)]);
lcdPrintln("");
lcdPrintln("Nickname:");
lcdPrintln(GLOBAL(nickname));
View
4 firmware/l0dable/jeopardy.c
@@ -90,6 +90,8 @@ void setLeft();
void setRight();
struct packet a;
+void setJeopardy();
+
void ram(void)
{
int priv = GLOBAL(privacy);
@@ -103,7 +105,7 @@ void ram(void)
nrf_config_set(&config);
nrf_set_strength(3);
- int rnd;
+// int rnd;
volatile uint16_t i;
while( 1 ){
View
2  firmware/l0dable/jump.c
@@ -221,7 +221,7 @@ static void draw_platforms() {
}
static void draw_player() {
- bool* sprite;
+ const bool* sprite;
if(game.player_y_vel > 0) {
sprite = PLAYER_SPRITE_DOWN;
}
View
3  firmware/l0dable/nick_work.c
@@ -71,11 +71,12 @@ int melody_timeout;
static void init_lilakit(void);
static void tick_lilakit(void);
+void melody_play(void);
static void mainloop();
void handler(void);
void ram(void) {
- timer32Callback0 = handler;
+ timer32Callback0 = (uint32_t) handler;
/* Enable the clock for CT32B0 */
SCB_SYSAHBCLKCTRL |= (SCB_SYSAHBCLKCTRL_CT32B0);
View
2  firmware/l0dable/people.c
@@ -29,7 +29,7 @@ void ram(void) {
if( nrf_rcv_pkt_time(64,sizeof(buf),buf) == 16 ){
buf[14] = 0;
if( buf[1] == 0x23 || buf[1] == 0x24){
- lcdPrintln(buf+6);
+ lcdPrintln((char*)(buf+6));
//lcdPrintln("foo");
}
lcdRefresh();
View
5 firmware/l0dable/pongo.c
@@ -113,6 +113,9 @@ void init();
** Code Section
*********************************************/
+void init();
+void ram();
+
void game(void)
{
init();
@@ -139,7 +142,7 @@ void game(void)
}
}
-init()
+void init()
{
// init ball
ball1.size = PONG_BALL_SIZE;
View
12 firmware/l0dable/r_player.c
@@ -34,11 +34,11 @@ struct packet{
uint8_t x;
uint8_t y;
uint8_t flags;
- uint8_t text[16];
+ char text[16];
}__attribute__((packed)) text;
struct nick{
uint8_t flags;
- uint8_t nick[18];
+ char nick[18];
}__attribute__((packed)) nick;
struct nickrequest{
uint8_t reserved[19];
@@ -55,7 +55,7 @@ struct packet{
uint8_t gameFlags;
uint8_t interval;
uint8_t jitter;
- uint8_t gameTitle[8];
+ char gameTitle[8];
}__attribute__((packed)) announce;
struct join{
uint16_t gameId;
@@ -93,7 +93,7 @@ uint16_t gameId;
uint8_t interval;
uint8_t jitter;
uint8_t flags;
-uint8_t *gameTitle;
+char *gameTitle;
void sendButton(uint8_t button);
void sendJoin(uint32_t game);
@@ -321,7 +321,7 @@ void processNickRequest( struct nickrequest *nq)
p.id= id;
p.ctr= ++ctr;
p.c.nick.flags = 0;
- uint8_t *nick = GLOBAL(nickname);
+ char *nick = GLOBAL(nickname);
strcpy(p.c.nick.nick, nick);
nrf_snd_pkt_crc(sizeof(p),(uint8_t*)&p);
}
@@ -374,7 +374,7 @@ void processText(struct text *t)
if( t->flags & FLAGS_CLS )
lcdClear() ;
lcdSetCrsr(t->x, t->y);
- t->text[16] = 0;
+ t->text[16] = 0; // XXX:Actually ok, beause the CRC is there. But evil!
lcdPrint(t->text);
lcdRefresh();
}
View
2  firmware/l0dable/scope.c
@@ -116,7 +116,7 @@ void ram(void) {
case BTN_RIGHT: if (kok) { xs++; xs&=63; kok=0; } break;
case BTN_UP: if (kok) { ch++; ch&=7; kok=0; } break;
case BTN_DOWN: if (kok) { ch--; ch&=7; kok=0; } break;
- case BTN_ENTER: return 0;
+ case BTN_ENTER: return;
default: kok=1;
}
}
View
5 firmware/main.c
@@ -4,7 +4,10 @@
#include "core/pmu/pmu.h"
#include "basic/basic.h"
+#include "basic/config.h"
#include "lcd/render.h"
+#include "lcd/print.h"
+#include "usb/usbmsc.h"
#include "filesystem/ff.h"
@@ -34,7 +37,7 @@
void wrapper(void);
-int main(void) {
+void main(void) {
// Configure cpu and mandatory peripherals
cpuInit(); // Configure the CPU
// we do it later
Please sign in to comment.
Something went wrong with that request. Please try again.