aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/e300/rev_c/ltc3675.h
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2014-10-07 11:32:14 +0200
committerMartin Braun <martin.braun@ettus.com>2014-10-07 12:09:33 +0200
commit1b149f561370687ad65e3aa644a402f00dbd16ea (patch)
treeab86042840fa1369d64bca56c5f3a64d1a4f1f72 /firmware/e300/rev_c/ltc3675.h
parentfd3e84941de463fa1a7ebab0a69515b4bf2614cd (diff)
downloaduhd-1b149f561370687ad65e3aa644a402f00dbd16ea.tar.gz
uhd-1b149f561370687ad65e3aa644a402f00dbd16ea.tar.bz2
uhd-1b149f561370687ad65e3aa644a402f00dbd16ea.zip
Initial commit E300 support.
Diffstat (limited to 'firmware/e300/rev_c/ltc3675.h')
-rw-r--r--firmware/e300/rev_c/ltc3675.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/firmware/e300/rev_c/ltc3675.h b/firmware/e300/rev_c/ltc3675.h
new file mode 100644
index 000000000..d7c4baa59
--- /dev/null
+++ b/firmware/e300/rev_c/ltc3675.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2012 Ettus Research LLC
+ */
+
+#ifndef LTC3675_H
+#define LTC3675_H
+
+//#include "types.h"
+#include <stdbool.h>
+#include <stdint.h>
+
+typedef bool (*ltc3675_reg_helper_fn)(uint8_t address);
+
+bool ltc3675_init(ltc3675_reg_helper_fn helper);
+
+typedef enum ltc3675_regulators {
+ LTC3675_REG_1, // 1A Buck
+ LTC3675_REG_2, // 1A Buck
+ LTC3675_REG_3, // 500mA Buck
+ LTC3675_REG_4, // 500mA Buck
+ LTC3675_REG_5, // 1A Boost
+ LTC3675_REG_6 // 1A Buck-Boost
+ // LED Boost
+} ltc3675_regulator_t;
+
+bool ltc3675_enable_reg(ltc3675_regulator_t reg, bool on);
+bool ltc3675_set_voltage(ltc3675_regulator_t reg, uint16_t voltage);
+bool ltc3675_is_power_button_depressed(void);
+bool ltc3675_has_interrupt(void);
+bool ltc3675_handle_irq(void);
+int8_t ltc3675_check_status(void);
+uint8_t ltc3675_get_last_status(void);
+uint8_t ltc3675_status_to_error(uint8_t val);
+bool ltc3675_is_power_good(uint8_t val);
+bool ltc3675_is_waking_up(void);
+
+#endif /* LTC3675_H */