Skip to content

Commit

Permalink
Fiddle around to get tests suite passing...going a little crazy.
Browse files Browse the repository at this point in the history
  • Loading branch information
peplin committed May 31, 2013
1 parent 3f45bb9 commit 09777b9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,4 +1,4 @@
CC = gcc
CC = g++
INCLUDES = -I. -Iatcommander
CFLAGS = $(INCLUDES) -c -w -Wall -Werror -g -ggdb
LDFLAGS =
Expand Down
2 changes: 2 additions & 0 deletions arduino/baudsetter.ino
Expand Up @@ -3,6 +3,8 @@
#include "WProgram.h"
#include <stdarg.h>

extern const AtCommanderPlatform AT_PLATFORM_RN42;

bool configured = false;
AtCommanderConfig config;

Expand Down
4 changes: 2 additions & 2 deletions atcommander/atcommander.c
Expand Up @@ -14,7 +14,7 @@
config->log_function("\r\n"); \
}

const AtCommanderPlatform AT_PLATFORM_RN42 = {
AtCommanderPlatform AT_PLATFORM_RN42 = {
DEFAULT_RESPONSE_DELAY_MS,
rn42_baud_rate_mapper,
{ "$$$", "CMD\r\n" },
Expand All @@ -24,7 +24,7 @@ const AtCommanderPlatform AT_PLATFORM_RN42 = {
{ "R,1\r", NULL },
};

const AtCommanderPlatform AT_PLATFORM_XBEE = {
AtCommanderPlatform AT_PLATFORM_XBEE = {
3000,
xbee_baud_rate_mapper,
{ "+++", "OK" },
Expand Down
2 changes: 1 addition & 1 deletion atcommander/atcommander.h
Expand Up @@ -21,7 +21,7 @@ typedef struct {
} AtCommand;

typedef struct {
const int response_delay_ms;
int response_delay_ms;
int (*baud_rate_mapper)(int baud);
AtCommand enter_command_mode_command;
AtCommand exit_command_mode_command;
Expand Down
3 changes: 3 additions & 0 deletions tests/tests.c
Expand Up @@ -5,6 +5,9 @@
#include <stdlib.h>
#include <stdarg.h>

extern const AtCommanderPlatform AT_PLATFORM_RN42;
extern const AtCommanderPlatform AT_PLATFORM_XBEE;

AtCommanderConfig config;

void debug(const char* format, ...) {
Expand Down

0 comments on commit 09777b9

Please sign in to comment.