summaryrefslogtreecommitdiff
path: root/src/ao_packet.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-02-20 20:22:16 -0800
committerKeith Packard <keithp@keithp.com>2010-02-20 20:30:27 -0800
commit84c93bb2fc4558a5e4654794ba90e730a84eaf67 (patch)
tree4d279672734ec5c3e50976917ccbf33a306a740d /src/ao_packet.c
parentfd0a42e0e96dcb8ecc9e999f70bcf70692692af9 (diff)
Change altos build process to support per-product compile-time changes
This creates per-product subdirectories and recompiles everything for each product, allowing per-product compile-time changes for things like peripheral pin assignments and attached serial devices. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_packet.c')
-rw-r--r--src/ao_packet.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ao_packet.c b/src/ao_packet.c
index 98fdcb90..dcd1647c 100644
--- a/src/ao_packet.c
+++ b/src/ao_packet.c
@@ -113,6 +113,11 @@ ao_packet_recv(void)
return dma_done;
}
+#ifndef PACKET_HAS_MASTER
+#define PACKET_HAS_MASTER 1
+#endif
+
+#if PACKET_HAS_MASTER
void
ao_packet_flush(void)
{
@@ -122,12 +127,15 @@ ao_packet_flush(void)
if (ao_packet_tx_used && ao_packet_master_sleeping)
ao_wake_task(&ao_packet_task);
}
+#endif /* PACKET_HAS_MASTER */
void
ao_packet_putchar(char c) __reentrant
{
while (ao_packet_tx_used == AO_PACKET_MAX && ao_packet_enable) {
+#if PACKET_HAS_MASTER
ao_packet_flush();
+#endif
ao_sleep(&tx_data);
}