| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This improves read/write performance with large files by not
re-walking the cluster chain for every operation
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Make FAT api provide reasonable error return values, change the tests
to write and then read a pile of files, checking that the contents are
correct (using md5sum).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Make sure the busy counts don't underflow or overflow.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
The newer(?) chips in telegps didn't like the previous programming
scheme, so go back to fixed time for write, which does an implicit
erase before every write. Also clear the DATA bit, which is only
needed for double word erase/programming.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Otherwise, lots of random code won't know about the radio..
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Allow the bufio code to signal a fatal error if someone misuses the API
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This adds a fairly primitive FAT16 file system implementation
along with support for SD cards.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Use the new radio recv define to skip disabling the receiver when
there isn't a receiver.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
The CC115L is xmit only, so split out the functions and provide
defines to check for xmit or recv separately as needed.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
SD cards require 0xff when fetching data
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Still no data, but at least the carrier comes up on frequency now.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
No configuration of power level yet, just the bare driver.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Doesn't actually do anything yet, but should initialize the chip at least
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Includes support for sending telemetry, RDF and APRS tones
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Just lights up the GPS and USB
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This makes stm-demo run on the discovery board again.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\ |
|
| |
| |
| |
| | |
Signed-off-by: Mike Beattie <mike@ethernal.org>
|
| |
| |
| |
| |
| |
| | |
Move it from SDCC to ARM targets as Jenkins doesn't have an ARM compiler.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
Adapt to changes in OS interfaces
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\ \ |
|
| |\ \ |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Most of the chip can run at 8MHz, but extended register access is
limited to 6.1MHz. Instead of pushing things, just run the SPI bus at
4MHz.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
With the GPIO pins set to 10MHz now, we can run SPI at the maximum
possible speed (8MHz).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The GPIO pin settings affect the output impedence, and hence the
maximum speed for SPI. Cranking these to suitable values allows SPI to
run at full speed.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Keith Packard <keithp@keithp.com>
|