projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos: Add SPI-based companion board support
[fw/altos]
/
src
/
ao_flash.c
diff --git
a/src/ao_flash.c
b/src/ao_flash.c
index 00e9639869cdf0a0a5b1345cbb3da4c22213c1ff..bb40f6f708b95515d165da8e131031639474593b 100644
(file)
--- a/
src/ao_flash.c
+++ b/
src/ao_flash.c
@@
-43,19
+43,9
@@
__xdata uint8_t ao_flash_mutex;
_asm nop _endasm; \
} while(0)
_asm nop _endasm; \
} while(0)
-void ao_flash_cs_low(void)
-{
- ao_flash_delay();
- FLASH_CS = 0;
- ao_flash_delay();
-}
+#define ao_flash_cs_low() ao_spi_get_bit(FLASH_CS)
-void ao_flash_cs_high(void)
-{
- ao_flash_delay();
- FLASH_CS = 1;
- ao_flash_delay();
-}
+#define ao_flash_cs_high() ao_spi_put_bit(FLASH_CS)
struct ao_flash_instruction {
uint8_t instruction;
struct ao_flash_instruction {
uint8_t instruction;