summaryrefslogtreecommitdiff
path: root/firmware/inc/module/gate.h
diff options
context:
space:
mode:
authordmlunar <root@lunar.sh>2025-01-22 16:47:21 +0200
committerdmlunar <root@lunar.sh>2025-12-02 16:02:10 +0200
commit288b138cb59325c42d1a64d9a87e3c879494fd72 (patch)
tree03dce50bb5118a3deb46389f191cfb6da5e9bcb9 /firmware/inc/module/gate.h
downloadvarpa-288b138cb59325c42d1a64d9a87e3c879494fd72.tar.gz
varpa-288b138cb59325c42d1a64d9a87e3c879494fd72.zip
varpa: initial public commitHEADmain
Diffstat (limited to 'firmware/inc/module/gate.h')
-rw-r--r--firmware/inc/module/gate.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/firmware/inc/module/gate.h b/firmware/inc/module/gate.h
new file mode 100644
index 0000000..9f399c4
--- /dev/null
+++ b/firmware/inc/module/gate.h
@@ -0,0 +1,32 @@
+/**
+ *
+ * Author: Dylan Muller
+ * Copyright (c) 2025
+ * All rights reserved.
+ *
+ * - Commercial/IP use prohibited.
+ * - Attribution required.
+ * See License.txt
+ *
+ */
+
+#ifndef GATE_H_
+#define GATE_H_
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <util/delay.h>
+
+#define GATE_PROBE_START 2800 // mV
+#define GATE_PROBE_LIMIT 3300 // mV
+#define GATE_PROBE_DRAIN 1000 // mV
+#define GATE_PROBE_INC 1 // COUNTS
+#define GATE_PA_POWER_DOWN 1
+#define GATE_LOOP_DELAY_US 1000
+
+uint16_t gate_probe(
+ uint16_t target_amp, // mA
+ uint16_t* probe_result
+);
+
+#endif