projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5481082
)
Add --cal to man page
author
Keith Packard
<keithp@keithp.com>
Wed, 16 Dec 2009 07:58:29 +0000
(23:58 -0800)
committer
Keith Packard
<keithp@keithp.com>
Wed, 16 Dec 2009 07:58:29 +0000
(23:58 -0800)
ao-tools/ao-load/ao-load.1
patch
|
blob
|
history
ao-tools/ao-rawload/ao-rawload.c
patch
|
blob
|
history
src/Makefile
patch
|
blob
|
history
src/ao_gps_sirf.c
patch
|
blob
|
history
src/ao_gps_skytraq.c
patch
|
blob
|
history
diff --git
a/ao-tools/ao-load/ao-load.1
b/ao-tools/ao-load/ao-load.1
index eb2bc0d8bdd5d3748d0596cc831520a182b88daa..79b76a79bf868a2ba69150b1568cc1c998071d8d 100644
(file)
--- a/
ao-tools/ao-load/ao-load.1
+++ b/
ao-tools/ao-load/ao-load.1
@@
-25,6
+25,7
@@
ao-load \- flash a program to a AltOS device
[\--tty \fItty-device\fP]
[\-D \fIaltos-device\fP]
[\--device \fIaltos-device\fP]
[\--tty \fItty-device\fP]
[\-D \fIaltos-device\fP]
[\--device \fIaltos-device\fP]
+[\--cal \fIradio-calibration\fP]
\fIfile.ihx\fP
\fIdevice serial number\fP
.SH DESCRIPTION
\fIfile.ihx\fP
\fIdevice serial number\fP
.SH DESCRIPTION
@@
-52,6
+53,16
@@
TeleMetrum
Leaving out the product name will cause the tool to select a suitable
product, leaving out the serial number will cause the tool to match
one of the available devices.
Leaving out the product name will cause the tool to select a suitable
product, leaving out the serial number will cause the tool to match
one of the available devices.
+.TP
+\-c radio-calibration | --cal radio-calibration
+This programs the radio calibration value into the image for hardware
+which doesn't have any eeprom storage for this value. The value here
+can be computed given the current radio calibration value, the
+measured frequency and the desired frequency:
+.IP
+ cal' = cal * (desired/measured)
+.IP
+The default calibration value is 1186611.
.SH USAGE
.I ao-load
reads the specified .ihx file into memory, locates the matching .map
.SH USAGE
.I ao-load
reads the specified .ihx file into memory, locates the matching .map
diff --git
a/ao-tools/ao-rawload/ao-rawload.c
b/ao-tools/ao-rawload/ao-rawload.c
index d9ee571829e4ed0eab88dd0cc43ee3f881a3b0f2..0098b6589c8e9294e9bbda642d13bc20b03809af 100644
(file)
--- a/
ao-tools/ao-rawload/ao-rawload.c
+++ b/
ao-tools/ao-rawload/ao-rawload.c
@@
-19,16
+19,18
@@
#include <unistd.h>
#include <getopt.h>
#include "ccdbg.h"
#include <unistd.h>
#include <getopt.h>
#include "ccdbg.h"
+#include "cc.h"
static const struct option options[] = {
{ .name = "tty", .has_arg = 1, .val = 'T' },
{ .name = "device", .has_arg = 1, .val = 'D' },
static const struct option options[] = {
{ .name = "tty", .has_arg = 1, .val = 'T' },
{ .name = "device", .has_arg = 1, .val = 'D' },
+ { .name = "run", .has_arg = 0, .val = 'r' },
{ 0, 0, 0, 0},
};
static void usage(char *program)
{
{ 0, 0, 0, 0},
};
static void usage(char *program)
{
- fprintf(stderr, "usage: %s [--tty <tty-name>] [--device <device-name>] file.ihx\n", program);
+ fprintf(stderr, "usage: %s [--tty <tty-name>] [--device <device-name>]
[--run]
file.ihx\n", program);
exit(1);
}
exit(1);
}
@@
-45,6
+47,7
@@
main (int argc, char **argv)
char *tty = NULL;
char *device = NULL;
int c;
char *tty = NULL;
char *device = NULL;
int c;
+ int run = 0;
while ((c = getopt_long(argc, argv, "T:D:", options, NULL)) != -1) {
switch (c) {
while ((c = getopt_long(argc, argv, "T:D:", options, NULL)) != -1) {
switch (c) {
@@
-54,6
+57,9
@@
main (int argc, char **argv)
case 'D':
device = optarg;
break;
case 'D':
device = optarg;
break;
+ case 'r':
+ run = 1;
+ break;
default:
usage(argv[0]);
break;
default:
usage(argv[0]);
break;
@@
-105,6
+111,10
@@
main (int argc, char **argv)
ccdbg_close(dbg);
exit(1);
}
ccdbg_close(dbg);
exit(1);
}
+ if (run) {
+ ccdbg_set_pc(dbg, image->address);
+ ccdbg_resume(dbg);
+ }
ccdbg_close(dbg);
exit (0);
}
ccdbg_close(dbg);
exit (0);
}
diff --git
a/src/Makefile
b/src/Makefile
index 8c24e6f43f31625315a13fbd3f4173dbd03d6ac9..8074d42d5c132a8e44ee6b99f3c60ccbb71f756e 100644
(file)
--- a/
src/Makefile
+++ b/
src/Makefile
@@
-43,7
+43,7
@@
ALTOS_DRIVER_SRC = \
ao_usb.c
TELE_COMMON_SRC = \
ao_usb.c
TELE_COMMON_SRC = \
- ao_
gps_print
.c \
+ ao_
dbg
.c \
ao_packet.c \
ao_packet_slave.c \
ao_state.c
ao_packet.c \
ao_packet_slave.c \
ao_state.c
@@
-53,6
+53,7
@@
TELE_COMMON_SRC = \
#
TELE_RECEIVER_SRC =\
ao_monitor.c \
#
TELE_RECEIVER_SRC =\
ao_monitor.c \
+ ao_gps_print.c \
ao_packet_master.c \
ao_rssi.c
ao_packet_master.c \
ao_rssi.c
diff --git
a/src/ao_gps_sirf.c
b/src/ao_gps_sirf.c
index eb00224cf97fc99740ef6c9ccec65ea50d0c40ac..64b66c95ce4af7f9fe16df6636e155d4b0035d22 100644
(file)
--- a/
src/ao_gps_sirf.c
+++ b/
src/ao_gps_sirf.c
@@
-430,25
+430,8
@@
ao_gps(void) __reentrant
__xdata struct ao_task ao_gps_task;
__xdata struct ao_task ao_gps_task;
-static void
-gps_dump(void) __reentrant
-{
- ao_mutex_get(&ao_gps_mutex);
- ao_gps_print(&ao_gps_data);
- putchar('\n');
- ao_gps_tracking_print(&ao_gps_tracking_data);
- putchar('\n');
- ao_mutex_put(&ao_gps_mutex);
-}
-
-__code struct ao_cmds ao_gps_cmds[] = {
- { 'g', gps_dump, "g Display current GPS values" },
- { 0, gps_dump, NULL },
-};
-
void
ao_gps_init(void)
{
ao_add_task(&ao_gps_task, ao_gps, "gps");
void
ao_gps_init(void)
{
ao_add_task(&ao_gps_task, ao_gps, "gps");
- ao_cmd_register(&ao_gps_cmds[0]);
}
}
diff --git
a/src/ao_gps_skytraq.c
b/src/ao_gps_skytraq.c
index ef581349ad75fe6ccc3c5c1ac5474abb988f4a42..361c77ce9883a671cd98dd8fa3f5fd6f102927df 100644
(file)
--- a/
src/ao_gps_skytraq.c
+++ b/
src/ao_gps_skytraq.c
@@
-410,25
+410,8
@@
ao_gps(void) __reentrant
__xdata struct ao_task ao_gps_task;
__xdata struct ao_task ao_gps_task;
-static void
-gps_dump(void) __reentrant
-{
- ao_mutex_get(&ao_gps_mutex);
- ao_gps_print(&ao_gps_data);
- putchar('\n');
- ao_gps_tracking_print(&ao_gps_tracking_data);
- putchar('\n');
- ao_mutex_put(&ao_gps_mutex);
-}
-
-__code struct ao_cmds ao_gps_cmds[] = {
- { 'g', gps_dump, "g Display current GPS values" },
- { 0, gps_dump, NULL },
-};
-
void
ao_gps_init(void)
{
ao_add_task(&ao_gps_task, ao_gps, "gps");
void
ao_gps_init(void)
{
ao_add_task(&ao_gps_task, ao_gps, "gps");
- ao_cmd_register(&ao_gps_cmds[0]);
}
}