| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Set SPI_1_POWER_MANAGE and/or SPI_2_POWER_MANAGE to have the spi
blocks powered down when not in use.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This powers down the UART logic on request.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
We only need the power interface when placing the chip in the lowest
power state, so don't power up the power interface clock at startup,
instead wait until later.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
We have to erase the log before the flight starts, so this seems like
the latest possible moment.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This is the lowest power state we can reach, and consumes about 15µA
or less.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This provides nano-second resolution times by reading the systick
value (which runs at 250ns ticks on stm).
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Make sure AO_TICK_TYPE is used "everywhere", instead of uint16_t or other.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
| |
In my zeal to eliminate warnings, I added declarations of all ISR
functions to a shared header file. However, I managed to include the
'weak' declaration, which meant that the intended ISR functions were
as weak as the 'default' ISR functions. This left all interrupts
non-functional, which doesn't make for a happy program.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
This cleans up the build process for all architectures, providing a
common place to specify vpath, cflags and build rules for various
common files.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
And fix up the related messages.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Adds:
-Wpointer-arith
-Wstrict-prototypes
-Wmissing-prototypes
-Wmissing-declarations
-Wnested-externs
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Support -Wcast-align and -Wpointer-arith while still allowing
architectures to pick whether they want an 8-bit or 32-bit stack.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Support -Wstrict-prototypes
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Including interrupt vectors to catch mis-spellings.
Working toward supporting -Wmissing-prototypes
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Working towards supporting -Wmissing-prototypes
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This spellingn error would have caused all DMA to these channels to fail.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This fills a data ring entry with all of the current sensor values
other than the ADC. It is used in all of the adc completion functions.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Remove address parameter (doesn't work with gcc), create shared
ao_romconfig in kernel.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This driver uses the generic GPIO functions and allows per-LED port
and pin configuration. It supports up to 32 LEDs.
Rename SoC-specific LED drivers.
Remove enabled parameter to ao_led_init
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This was used with the 8051 bit-addressing mode to provide
single-instruction access to GPIO pins.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Don't use a global variable to hold the result.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Stop using pdclib
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
stdio kinda wants to own this name
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Should make it more obvious at compile time that you've done something wrong.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| |
| | |
At least make it compile. In this configuration, it's dumping out IN3
endpoint register values.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
| |
| |
| |
| |
| | |
This adds the code necessary to drive another IN endpoint.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|/
|
|
|
|
|
| |
This tells the hardware we're done writing data to the second input
buffer and allows it to be switched from NAK to VALID.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
When DFU finishes loading firmware and jumps to the application, it
leaves the mapping of addresses starting at 0x0 set to System flash,
which prevents the boot loader from receiving interrupts and requires
a power cycle during flash & cal.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Trailing whitespace.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Were #ifdef, which meant that #define AO_BOOT_PIN 0 didn't work right.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This way it can be incorporated into multiple operating systems more easily.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This improves the USB performance of ChaosKey so that it doesn't NAK
during data transfers at all.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This also allows us to stop shadowing USB rx buffers in system ram
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This shouldn't have much of an effect, but shows how double buffering
works.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Use the 16-bit USB memory directly, avoiding the buffer space and the copy
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
These counters are only useful for helping debug the USB driver.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The textram section must be aligned to 8 bytes to keep the linker
happy. However, if that section contains no data, the declaration will
set the __data_start__ value to that alignment, but the data section
itself would start on a 4-byte alignment, potentially 4 bytes lower
than the value indicated by __data_start__. This completely scrambles
initialized memory as the startup code will copy the data segment to
__data_start__, 4 bytes off of the actual data segment start.
Fix this by forcing the data segment to also be aligned to 8 bytes.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Redefines some stdio bits so that we can build with either pdclib or
newlib + avr stdio.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
If you try this after the UART is running, it won't work.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
Compute whether any sw/hw flow control is in use.
Compute whether hw flow control is in use as a separate value.
These make the code a bit easier to follow.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This allows other systems to see what baud rate the host has requested.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
And allow application space to be limited to less than available flash.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
It's 8MHz, not 16MHz
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This allows the system clock to vary at runtime, instead of requiring
a fixed value.
Signed-off-by: Keith Packard <keithp@keithp.com>
|