| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Support multiple serial ports more cleanly
Split out parts of ao.h into separate feature header files
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The STM32L151 has several SPI busses, and we want to use more than
one, so add a 'bus' parameter to the SPI interfaces. To avoid wasting
time on AVR and CC1111 processors which only use one SPI bus, elide
those parameters from the actual functions by wrapping them with
macros.
Configuring chip select is now all macroized so that each chip can
have its own version, allowing the STM to share the various SPI device
drivers with the cc1111 and avr processors. Note that only the M25
driver has been ported; porting the others is 'trivial', but not
necessary at this point.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Some architecture specific stuff needs to use core altos code, so
create new ao_arch_funcs.h files per architecture that get pulled in
at the end of ao.h
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This ignores the interrupt disabled state, so we'd always leave
ao_yield with interrupts disabled.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The arch-specific section just puts a single nibble to the device.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
TeleScience and TelePyro now work.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This is useful for debugging the SPI and flash drivers, but not
necessary in production code.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Not that we have any way of knowing how much stack we're using, but at
least this seems to work.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
I don't know why this is necessary, but the receive buffer gets
'extra' data added somehow.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This makes the board work even when disconnected from TeleMetrum.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This code was left in a bit of a mess; just clean it up.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
The USART is used for SPI to talk to the flash part.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
Wrap the argument to ao_arch_critical in do { } while (0); to make
sure it gets correctly checked as a statement.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Cleans up the formating a bit.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
| |
SPI transactions generally require a read followed by a write, with
the chip select held the whole time. As a result, the SPI bus must be
held across multiple transactions. To make this reliable, the caller
must hold the SPI mutex, instead of the underlying SPI driver.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Just too many strings.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
We can't write general purpose SPI slave code as we must eliminate
any latency because the SPI ports have no buffering.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
This will be shared with the attiny code for TeleTerra v0.1
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
| |
Telescience and telebt both log data in 32-byte chunks, so share some
code which manages that between the two products. Add simple telemetry
logging to telebt.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
| |
Adds a few drivers including an LCD driver
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
| |
This completes the basic task of making an AVR version of altos by
getting the Teensy 'avr-demo' program to build.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More arch-indepdency bits.
GCC stdio is different from SDCC, so create suitable code in
avr/ao_avr_stdio.c
Create macros to initialize the task stack frame and save the task
context.
Add GCC/SDCC type definition compatibility macros
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Start pulling changes needed for avr port; architecture-specific code
will live in <architcture>/ao_arch.h. This first change defines
the ao_arch_reboot macro to reboot the microcontroller.
Signed-off-by: Keith Packard <keithp@keithp.com>
|