Skip to content

Commit

Permalink
[fix] led_hw.h fix dummy interface for testing (#3112)
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Oct 2, 2023
1 parent 46ea0a5 commit de6a1ad
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions tests/modules/test_arch/led_hw.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
#ifndef LED_HW_H
#define LED_HW_H

#include <stdio.h>
#include <caml/mlvalues.h>
#include <caml/memory.h>
#include <caml/callback.h>

extern value *leds_closure;
extern bool led_disable;

#define LED_INIT(i) { led_disable = false; }
#define LED_ON(i) { if (leds_closure && !led_disable) callback2(*leds_closure, Val_int(i), Val_int(1)); }
#define LED_OFF(i) { if (leds_closure && !led_disable) callback2(*leds_closure, Val_int(i), Val_int(0)); }
#define LED_TOGGLE(i) { if (leds_closure && !led_disable) callback2(*leds_closure, Val_int(i), Val_int(2)); }
#define LED_DISABLE(i) { LED_OFF(i); led_disable = true; }
#define LED_INIT(i) { }
#define LED_ON(i) { }
#define LED_OFF(i) { }
#define LED_TOGGLE(i) { }
#define LED_DISABLE(i) { }

#define LED_PERIODIC() {}

Expand Down

0 comments on commit de6a1ad

Please sign in to comment.