This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mbed Microcontroller Library | |
* Copyright (c) 2006-2013 ARM Limited | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Include --------------------------------------------------------------------------------------- | |
#include "mbed.h" | |
#include "rtos.h" | |
#define BAUD(x) pcx.baud(x) | |
#define GETC(x) pcx.getc(x) | |
#define PUTC(x) pcx.putc(x) | |
#define PRINTF(...) pcx.printf(__VA_ARGS__) | |
#define READABLE(x) pcx.readable(x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FluentLogger.h" | |
FluentLogger logger("192.168.10.100"); | |
// for fluentd | |
void send_fluentd() | |
{ | |
uMP mp(64); | |
mp.init(); | |
mp.set_map(3); // 3 items |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Max3421e.h> | |
#include <Usb.h> | |
#include <AndroidAccessory2.h> | |
#define JOYSTICK_VERT A0 | |
#define JOYSTICK_HORZ A1 | |
#define JOYSTICK_SEL A2 | |
#define DIVIDER 32 | |
#define LED1 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A piezo transducer is wired to pins 19 and 18 to trigger | |
* cycling through the Record/Play/Stop modes. The code can | |
* be altered to also work with a simple push button. | |
*/ | |
#include <usbh_midi.h> | |
#include <usbhub.h> | |
#ifdef dobogusinclude | |
#include <spi4teensy3.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <usbh_midi.h> | |
#include <usbhub.h> | |
#ifdef dobogusinclude | |
#include <spi4teensy3.h> | |
#include <SPI.h> | |
#endif | |
USB Usb; | |
USBH_MIDI Midi(&Usb); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void USB::initialise() | |
{ | |
/* Configure the USB0 host pins(USB0_OVRCURA and USB0_VBUSEN) needed */ | |
// protection got turned off in hardware setup | |
// MPC.PWPR.BIT.B0WI = 0; // Enable write to PFSWE bit | |
// MPC.PWPR.BIT.PFSWE = 1; // Disable write protection to PFS registers | |
/* Use this for GR-Sakura and RSK */ | |
PORT1.PDR.BIT.B6 = 1; // P16 is an output pin | |
PORT1.PCR.BIT.B6 = 1; // P16 is an output pin | |
MPC.P16PFS.BIT.PSEL = 0x12; // Configure as USB0_VBUSEN pin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* GR-SAKURA Sketch Template V2.06 */ | |
#include <Arduino.h> | |
//USBDesc | |
#include <usbhub.h> | |
#define Serial Serial1 | |
#define BUFSIZE 256 //buffer size | |
#define LOBYTE(x) ((char*)(&(x)))[0] | |
#define HIBYTE(x) ((char*)(&(x)))[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat << EOT > /etc/udev/rules.d/51-usbblaster.rules | |
# USB-Blaster | |
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="666" | |
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="666" | |
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="666" | |
# USB-Blaster II | |
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="666" | |
ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="666" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mbed Microcontroller Library | |
* Copyright (c) 2015 ARM Limited | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |