projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
altos/stm32f1: For some reason the DBG registers aren't always available
[fw/altos]
/
src
/
samd21
/
ao_arch_funcs.h
diff --git
a/src/samd21/ao_arch_funcs.h
b/src/samd21/ao_arch_funcs.h
index 32670b45ca1897bc1f6a3016a4fd9c1cf4902930..754ca3b51c3c84ecc4c8a6e2079ea64c8c8f54ba 100644
(file)
--- a/
src/samd21/ao_arch_funcs.h
+++ b/
src/samd21/ao_arch_funcs.h
@@
-282,10
+282,11
@@
ao_spi_put_bit(struct samd21_port *port, uint8_t bit, uint16_t spi_index)
}
static inline uint8_t
-ao_spi_speed(uint32_t hz)
+ao_spi_speed(
int index,
uint32_t hz)
{
int32_t baud = (int32_t) (AO_SYSCLK / (2 * hz)) - 1;
+ (void) index;
if (baud < 1)
baud = 1;
if (baud > 255)