aboutsummaryrefslogtreecommitdiff
path: root/FT245.h
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2024-05-15 22:13:54 +0200
committerLeonard Kugis <leonard@kug.is>2024-05-15 22:13:54 +0200
commit09c02c202337f6651447b45de021097c234d5297 (patch)
tree02ddb685d5dfdb2d8e50f335fcfc8ccca9788cbf /FT245.h
parent86e784e4923f497f268c5bf41a0b086a1e0d9195 (diff)
FT245.h: Made compile time switches configurable from outside.
Diffstat (limited to 'FT245.h')
-rw-r--r--FT245.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/FT245.h b/FT245.h
index b5438d3..03280d1 100644
--- a/FT245.h
+++ b/FT245.h
@@ -6,11 +6,21 @@
#include <stdbool.h>
#include "circular_buffer.h"
+#ifndef FT245_DRIVER_MODE_DYNAMIC
#define FT245_DRIVER_MODE_DYNAMIC 1
+#endif
+
+#ifndef FT245_DRIVER_MODE_STATIC
#define FT245_DRIVER_MODE_STATIC 0
+#endif
+#ifndef FT245_BUFFER_SIZE_TX
#define FT245_BUFFER_SIZE_TX 64
+#endif
+
+#ifndef FT245_BUFFER_SIZE_RX
#define FT245_BUFFER_SIZE_RX 64
+#endif
typedef circular_buffer_struct(uint8_t, FT245_BUFFER_SIZE_TX) buffer_tx_t;
typedef circular_buffer_struct(uint8_t, FT245_BUFFER_SIZE_RX) buffer_rx_t;