Use generated system header in peripheral examples
MODIFY
examples/C/leds.c
examples/C/leds.c
-#define W 35
-#define H 25
+#include "ripes_system.h"
-unsigned* led_base = 0xF0000000;
+/* LEDs
+ * This program draws an animation on an LED matrix peripheral.
+ *
+ * To run this program, make sure that you have instantiated an "LED Matrix"
+ * peripheral in the "I/O" tab.
+ */
+
+#define W LED_MATRIX_0_WIDTH
+#define H LED_MATRIX_0_HEIGHT
+unsigned* led_base = LED_MATRIX_0_BASE;
void main() {
unsigned v = 0;

MODIFY
examples/C/switchesAndLeds.c
examples/C/switchesAndLeds.c
-#define W 35
-#define H 25
+#include "ripes_system.h"
-unsigned* led_base = 0xF0000004;
-unsigned* switch_base = 0xF0000000;
+/* Switches and LEDs
+ * This program will toggle an LED in an LED matrix when the corresponding
+ * switch is toggled.
+ *
+ * To run this program, make sure that you have instantiated one of the
+ * following peripherals in the I/O tab:
+ * - "LED Matrix"
+ * - "Switches"
+ */
+
+unsigned* led_base = LED_MATRIX_0_BASE;
+unsigned* switch_base = SWITCHES_0_BASE;
void main() {
unsigned v = 0;

Use generated system header in peripheral examples