aboutsummaryrefslogtreecommitdiff
path: root/stmhal/dac.c
diff options
context:
space:
mode:
authorDamien George2014-08-05 23:35:21 +0100
committerDamien George2014-08-05 23:35:21 +0100
commit7cc20e7e99bcdfce5b59163aab611022b7e1128f (patch)
tree8fc032ef6db38f8659e7f77b45f79ad032105673 /stmhal/dac.c
parent56da07dcfa8e73c15818453ae9f5ecba13718fc9 (diff)
stmhal: Wrap DAC module and os.urandom in relevant #if's.
Diffstat (limited to 'stmhal/dac.c')
-rw-r--r--stmhal/dac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/dac.c b/stmhal/dac.c
index df46d2490..acfcf4e91 100644
--- a/stmhal/dac.c
+++ b/stmhal/dac.c
@@ -68,6 +68,8 @@
/// dac = DAC(1)
/// dac.write_timed(buf, 400 * len(buf), mode=DAC.CIRCULAR)
+#if MICROPY_HW_ENABLE_DAC
+
STATIC DAC_HandleTypeDef DAC_Handle;
void dac_init(void) {
@@ -354,3 +356,5 @@ const mp_obj_type_t pyb_dac_type = {
.make_new = pyb_dac_make_new,
.locals_dict = (mp_obj_t)&pyb_dac_locals_dict,
};
+
+#endif // MICROPY_HW_ENABLE_DAC