| Commit message (Collapse) | Author | Age |
... | |
| |
| |
| |
| |
| |
| | |
The necessary data structures aren't defined in this case.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
No need to loop if there's only one
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
The STM flash loader wants to be taskless too, share this very simple
implementation of sleep/wakeup.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
Handl EP0 actions from interrupt handler. This allows USB to be used
in a taskless environment, like the STM flash loader
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\|
| |
| |
| |
| | |
Conflicts:
ao-tools/ao-stmload/ao-stmload.c
|
| |
| |
| |
| |
| |
| | |
Lost in the great megametrum rename
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| | |
Signed-off-by: Mike Beattie <mike@ethernal.org>
|
| | |
|
| |
| |
| |
| |
| |
| | |
Dunno if this matters, but it might as well be set reasonably
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
We shouldn't need these
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
This allows the command line and logging operations to occur safely in parallel
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This seems to make bringing the card from idle to ready mode more
reliable. If you spam the card with requests, it will eventually
whinge and shut down communications.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This moves the crc_errors into the new structure and adds a receiver
battery voltage value there as well. Now the receiver status can be
monitored separately from the flight status. That also means that code
receiving state updates should be prepared to accept missing listener
or flight state values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| | |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| | |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Trying to get the radio to stop modulating the carrier when
calibrating the radio, we'll try RDF mode which says no preamble or
sync data. This might shift the frequency though?
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
It was accidentally using the same ID as megadongle...
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
This makes failure when no card is present much quicker.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
The SD card really doesn't like the RFI generated by our enormous
radio, so just lock the radio out while working with the card.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
These aren't needed at this point, but who knows?
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sometimes I/O operations may fail; give the card a chance and retry
the operation in case it works the next time.
Replace the loop counts with loops that check the clock so that
they'll have consistent timeouts even if the CPU or SPI speed changes.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
Might prove useful if the CPU is ever doing anything?
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
This caught a bunch of FAT cluster chain allocation bugs.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
Need to be able to see the contents of a log file, even if the logger
is running.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
There were some rounding errors mis-computing the number of clusters
needed, and the logic to figure out how to re-connect a chain was broken.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
This allows the FAT DBG hooks to be enabled even if some other module
turned DBG off.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
SPI flash parts don't need flushing, but the SD card does. Make sure
the SD card contents are sane after every logging interval has passed
by flushing all dirty blocks to the device.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
open will return failure unless the file already exists.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
This way, we can distinguish between 'something bad happened' and
'you're at the end of the directory'.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
Sometimes the SD card takes 'a while' to go into idle mode at first
power up. Just hang around waiting for a long time.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
Pad extension with spaces
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
Otherwise, we use stale data and 'bad things' happen.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| | |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unlike the AVR and CC1111 USB drivers, the STM usb driver queues IN
bytes in a local buffer instead of in the driver; this means that the
driver is queuing bytes while the previous IN packet is queued for the
host, which allows for overlapping execution.
It also means that when the local buffer is full, we must check to see
if the host has picked up the previous IN packet before trying to
queue another IN packet for transmission. This is done by always
waiting for the IN buffer to be ready before sending data.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a pile of debugging hooks to the USB driver to try and
isolate various lockup-related issues. It's all disabled by default,
of course.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
getchar relies on interrupts being blocked across the pollchar calls
and into the sleep call or it may go to sleep with data pending.
This prefixes all pollchar functions with _ to indicate that they are
to be called with interrupts blocked and eliminates all interrupt
manipulation calls from within the pollchar functions.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
This just dumps info in trace mode about read and write commands
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
This makes the mount report precise error information and then prints
that with the 'M' command.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
now that it appears to work, leave these disabled by default
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
Now that the FAT code seems to be operational, go back and add
SD writing.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This turns on telemetry, APRS, RDF and data logging for telegps.
Data is logged as soon as GPS has a date to create the right
filename, using files of the form YYYYMMDD.LOG which just barely fits
in a FAT filename.
Telemetry/RDF/APRS are all separately controllable.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
ao_fat_sync() flushes the bufio data to disk along with any fsinfo
changes. ao_fat_full() returns whether the file system is full.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
This moves the locking up above the global state variable uses so that
multiple radio users (as if we had any) won't collide.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
two sync bytes for packet mode, disable sync for rdf/aprs mode.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This involved figuring out which GPIO signal would reliably indicate
that the transmitter was finished; I ended up using the PA_PD bit for
this.
This also converts all of the radio users to the long packet support
as the CC115L has only a 64-byte fifo, not large enough to hold either
an RDF tone or a regular AltOS telemetry packet.
This also renames the public API for sending APRS packets from
ao_radio_send_lots to ao_radio_send_aprs, which is at least more
accurate. The workings of that API haven't changed, just the name.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These expose the raw cc115l and rfpa0133 register settings so that we
can calibrate them against measured power outputs.
I've tested them to verify that they change how much power the board
consumes, so they're clearly doing something...
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Generalizes the FAT code to deal with either 16-bit or 32-bit
versions. The testing code now runs over a variety of disk images to
check for compatibility on all of them.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This improves sequential file performance by taking advantage of any
previous cached cluster/offset pair and starting from there when the
cluster changes rather than starting from scratch at the begining again.
Signed-off-by: Keith Packard <keithp@keithp.com>
|