aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/blinky.cpp2
-rw-r--r--examples/debug-dtrrts.cpp9
-rw-r--r--examples/freertos-blinky.cpp2
-rw-r--r--examples/fsmc-stress-test.cpp6
-rw-r--r--examples/mini-exti-test.cpp2
-rw-r--r--examples/qa-slave-shield.cpp2
-rw-r--r--examples/spi_master.cpp2
-rw-r--r--examples/test-bkp.cpp6
-rw-r--r--examples/test-dac.cpp4
-rw-r--r--examples/test-fsmc.cpp4
-rw-r--r--examples/test-print.cpp2
-rw-r--r--examples/test-ring-buffer-insertion.cpp4
-rw-r--r--examples/test-serial-flush.cpp2
-rw-r--r--examples/test-serialusb.cpp6
-rw-r--r--examples/test-servo.cpp2
-rw-r--r--examples/test-session.cpp2
-rw-r--r--examples/test-spi-roundtrip.cpp2
-rw-r--r--examples/test-systick.cpp4
-rw-r--r--examples/test-timers.cpp4
-rw-r--r--examples/test-usart-dma.cpp8
-rw-r--r--examples/vga-leaf.cpp2
-rw-r--r--examples/vga-scope.cpp4
22 files changed, 40 insertions, 41 deletions
diff --git a/examples/blinky.cpp b/examples/blinky.cpp
index dd72514..fad71f8 100644
--- a/examples/blinky.cpp
+++ b/examples/blinky.cpp
@@ -1,6 +1,6 @@
// Blinks the built-in LED
-#include "wirish.h"
+#include <wirish/wirish.h>
void setup() {
pinMode(BOARD_LED_PIN, OUTPUT);
diff --git a/examples/debug-dtrrts.cpp b/examples/debug-dtrrts.cpp
index 3829208..0286212 100644
--- a/examples/debug-dtrrts.cpp
+++ b/examples/debug-dtrrts.cpp
@@ -1,7 +1,7 @@
// Test sketch for figuring out DTR/RTS behavior on different platforms.
-#include "wirish.h"
-#include "usb.h"
+#include <wirish/wirish.h>
+#include "usb_cdcacm.h"
void setup() {
/* Set up the LED to blink */
@@ -10,7 +10,6 @@ void setup() {
/* Send a message out USART2 */
Serial2.begin(9600);
Serial2.println("Debugging DTR/RTS...");
-
}
void loop() {
@@ -18,9 +17,9 @@ void loop() {
delay(100);
Serial2.print("DTR: ");
- Serial2.print(usbGetDTR(), DEC);
+ Serial2.print(usb_cdcacm_get_dtr(), DEC);
Serial2.print("\tRTS: ");
- Serial2.println(usbGetRTS(), DEC);
+ Serial2.println(usb_cdcacm_get_rts(), DEC);
}
// Force init to be called *first*, i.e. before static object allocation.
diff --git a/examples/freertos-blinky.cpp b/examples/freertos-blinky.cpp
index 6f82d71..2e7c7f7 100644
--- a/examples/freertos-blinky.cpp
+++ b/examples/freertos-blinky.cpp
@@ -1,4 +1,4 @@
-#include "wirish.h"
+#include <wirish/wirish.h>
#include "libraries/FreeRTOS/MapleFreeRTOS.h"
static void vLEDFlashTask(void *pvParameters) {
diff --git a/examples/fsmc-stress-test.cpp b/examples/fsmc-stress-test.cpp
index 509a02f..20d3fa7 100644
--- a/examples/fsmc-stress-test.cpp
+++ b/examples/fsmc-stress-test.cpp
@@ -12,9 +12,9 @@
#include <stdio.h>
#include <stddef.h>
-#include "wirish.h"
-#include "rcc.h"
-#include "fsmc.h"
+#include <wirish/wirish.h>
+#include <libmaple/rcc.h>
+#include <libmaple/fsmc.h>
// -- SRAM config -------------------------------------------------------------
diff --git a/examples/mini-exti-test.cpp b/examples/mini-exti-test.cpp
index 84b323e..54a4dd0 100644
--- a/examples/mini-exti-test.cpp
+++ b/examples/mini-exti-test.cpp
@@ -10,7 +10,7 @@
#include <stdio.h>
#include <string.h>
-#include "wirish.h"
+#include <wirish/wirish.h>
// test routines
void run_exti_test(void);
diff --git a/examples/qa-slave-shield.cpp b/examples/qa-slave-shield.cpp
index 2da1c04..ec25e49 100644
--- a/examples/qa-slave-shield.cpp
+++ b/examples/qa-slave-shield.cpp
@@ -1,6 +1,6 @@
// Slave mode for Quality Assurance test
-#include "wirish.h"
+#include <wirish/wirish.h>
#define INTER_TOGGLE_DELAY_NORMAL 5
#define INTER_TOGGLE_DELAY_SLOW 80
diff --git a/examples/spi_master.cpp b/examples/spi_master.cpp
index 100fc53..ea6c990 100644
--- a/examples/spi_master.cpp
+++ b/examples/spi_master.cpp
@@ -33,7 +33,7 @@
* Pin 10 is used as slave select.
*/
-#include "wirish.h"
+#include <wirish/wirish.h>
#define NSS 10
diff --git a/examples/test-bkp.cpp b/examples/test-bkp.cpp
index f5957b7..719cac7 100644
--- a/examples/test-bkp.cpp
+++ b/examples/test-bkp.cpp
@@ -1,8 +1,8 @@
#include <stdio.h> // for snprintf()
-#include "wirish.h"
-#include "bkp.h"
-#include "iwdg.h"
+#include <wirish/wirish.h>
+#include <libmaple/bkp.h>
+#include <libmaple/iwdg.h>
void print_bkp_contents();
void write_to_bkp(uint16 val);
diff --git a/examples/test-dac.cpp b/examples/test-dac.cpp
index 40ae5d5..af188cc 100644
--- a/examples/test-dac.cpp
+++ b/examples/test-dac.cpp
@@ -6,8 +6,8 @@
* This file is released into the public domain.
*/
-#include "wirish.h"
-#include "dac.h"
+#include <wirish/wirish.h>
+#include <libmaple/dac.h>
uint16 count = 0;
diff --git a/examples/test-fsmc.cpp b/examples/test-fsmc.cpp
index 22f6975..1621317 100644
--- a/examples/test-fsmc.cpp
+++ b/examples/test-fsmc.cpp
@@ -1,7 +1,7 @@
#include <stddef.h> // for ptrdiff_t
-#include "wirish.h"
-#include "fsmc.h"
+#include <wirish/wirish.h>
+#include <libmaple/fsmc.h>
#ifndef BOARD_maple_native
#error "Sorry, this example only works on Maple Native."
diff --git a/examples/test-print.cpp b/examples/test-print.cpp
index 5477512..bdc1894 100644
--- a/examples/test-print.cpp
+++ b/examples/test-print.cpp
@@ -8,7 +8,7 @@
* This file is released into the public domain.
*/
-#include "wirish.h"
+#include <wirish/wirish.h>
#undef min
#undef max
diff --git a/examples/test-ring-buffer-insertion.cpp b/examples/test-ring-buffer-insertion.cpp
index e86372a..2188b03 100644
--- a/examples/test-ring-buffer-insertion.cpp
+++ b/examples/test-ring-buffer-insertion.cpp
@@ -12,9 +12,9 @@
* This file is released into the public domain.
*/
-#include "wirish.h"
+#include <wirish/wirish.h>
-#include "ring_buffer.h"
+#include <libmaple/ring_buffer.h>
#define BUF_SIZE 64
ring_buffer ring_buf;
diff --git a/examples/test-serial-flush.cpp b/examples/test-serial-flush.cpp
index adc9c3e..409d1f9 100644
--- a/examples/test-serial-flush.cpp
+++ b/examples/test-serial-flush.cpp
@@ -2,7 +2,7 @@
* Tests the "flush" Serial function.
*/
-#include "wirish.h"
+#include <wirish/wirish.h>
void setup() {
Serial1.begin(9600);
diff --git a/examples/test-serialusb.cpp b/examples/test-serialusb.cpp
index 15ab913..098e445 100644
--- a/examples/test-serialusb.cpp
+++ b/examples/test-serialusb.cpp
@@ -1,7 +1,7 @@
// Tests SerialUSB functionality.
-#include "wirish.h"
-#include "usb.h"
+#include <wirish/wirish.h>
+#include "usb_cdcacm.h"
#define QUICKPRINT 0
#define BIGSTUFF 1
@@ -37,7 +37,7 @@ void loop() {
switch (state) {
case QUICKPRINT:
for (int i = 0; i < 30; i++) {
- usbSendBytes(&c1, 1);
+ usb_cdcacm_putc((char)c1, 1);
SerialUSB.print('.');
SerialUSB.print('|');
}
diff --git a/examples/test-servo.cpp b/examples/test-servo.cpp
index b6b8cd5..6f6e3ba 100644
--- a/examples/test-servo.cpp
+++ b/examples/test-servo.cpp
@@ -29,7 +29,7 @@
#include <stdio.h>
-#include "wirish.h"
+#include <wirish/wirish.h>
#include "libraries/Servo/Servo.h"
diff --git a/examples/test-session.cpp b/examples/test-session.cpp
index 6c7cfff..4316cda 100644
--- a/examples/test-session.cpp
+++ b/examples/test-session.cpp
@@ -4,7 +4,7 @@
// Useful for testing Maple features and troubleshooting.
// Communicates over SerialUSB.
-#include "wirish.h"
+#include <wirish/wirish.h>
// ASCII escape character
#define ESC ((uint8)27)
diff --git a/examples/test-spi-roundtrip.cpp b/examples/test-spi-roundtrip.cpp
index 71ae658..ddc9875 100644
--- a/examples/test-spi-roundtrip.cpp
+++ b/examples/test-spi-roundtrip.cpp
@@ -17,7 +17,7 @@
* Author: Marti Bolivar <mbolivar@leaflabs.com>
*/
-#include "wirish.h"
+#include <wirish/wirish.h>
HardwareSPI alice(2);
diff --git a/examples/test-systick.cpp b/examples/test-systick.cpp
index 78c7307..356f302 100644
--- a/examples/test-systick.cpp
+++ b/examples/test-systick.cpp
@@ -1,7 +1,7 @@
// Tests the SysTick enable/disable functions
-#include "wirish.h"
-#include "systick.h"
+#include <wirish/wirish.h>
+#include <libmaple/systick.h>
void setup() {
pinMode(BOARD_LED_PIN, OUTPUT);
diff --git a/examples/test-timers.cpp b/examples/test-timers.cpp
index 247cc57..2a8223c 100644
--- a/examples/test-timers.cpp
+++ b/examples/test-timers.cpp
@@ -1,7 +1,7 @@
// Program to test the timer.h implementation's essential functionality.
-#include "wirish.h"
-#include "timer.h"
+#include <wirish/wirish.h>
+#include <libmaple/timer.h>
void handler1(void);
void handler2(void);
diff --git a/examples/test-usart-dma.cpp b/examples/test-usart-dma.cpp
index 5ff5b86..8fbcccb 100644
--- a/examples/test-usart-dma.cpp
+++ b/examples/test-usart-dma.cpp
@@ -19,11 +19,11 @@
* This code is released into the public domain.
*/
-#include "dma.h"
-#include "usart.h"
-#include "gpio.h"
+#include <libmaple/dma.h>
+#include <libmaple/usart.h>
+#include <libmaple/gpio.h>
-#include "wirish.h"
+#include <wirish/wirish.h>
#define BAUD 9600
diff --git a/examples/vga-leaf.cpp b/examples/vga-leaf.cpp
index f31dc87..5159956 100644
--- a/examples/vga-leaf.cpp
+++ b/examples/vga-leaf.cpp
@@ -32,7 +32,7 @@
// FIXME: generalize for Native and Mini
-#include "wirish.h"
+#include <wirish/wirish.h>
// Pinouts -- you also must change the GPIO macros below if you change
// these
diff --git a/examples/vga-scope.cpp b/examples/vga-scope.cpp
index b5fa8a5..8730cf0 100644
--- a/examples/vga-scope.cpp
+++ b/examples/vga-scope.cpp
@@ -35,8 +35,8 @@
Marti Bolivar <mbolivar@leaflabs.com>
*/
-#include "wirish.h"
-#include "systick.h"
+#include <wirish/wirish.h>
+#include <libmaple/systick.h>
// FIXME: generalize for Native and Mini