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 "stm32f4_discovery.h" | |
#include "arm_math.h" | |
/* | |
- TIM4_CH1 pin (PB.06) | |
- TIM4_CH2 pin (PB.07) | |
*/ | |
void configureEncoder() { |
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
const struct __attribute__((__packed__, aligned (4))) { | |
uint8_t bLength, bDescriptorType; | |
uint8_t bcdUSBL, bcdUSBH; | |
uint8_t bDeviceClass, bDeviceSubClass, bDeviceProtocol, bMaxPacketSize; | |
uint8_t idVendorL, idVendorH; | |
uint8_t idProductL, idProductH; | |
uint8_t bcdDeviceL, bcdDeviceH; | |
uint8_t iManufacturer, iProduct, iSerialNumber; | |
uint8_t bNumConfigurations; | |
} deviceDescriptor = { |
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
test("jsparse number evaluation", function () { | |
var jp = jsparse; | |
var number = jp.action(jp.repeat1(jp.range('0', '9')), function (ast) { | |
return ast.join(''); | |
}); | |
var decimalPart = jp.action(jp.sequence('.', number), function (ast) { | |
return ast.join(''); | |
}); | |
var integerAndDecimal = jp.action(jp.sequence(number, jp.optional(decimalPart)), function (ast) { | |
return ast[1] !== false ? ast[0] + ast[1] : ast[0]; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>modbus ?</title> | |
</head> | |
<body> | |
modbus ?<br> | |
<script src="serial.js"></script> | |
<label> | |
DCD: |
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 "stm32f4xx_conf.h" | |
#include "stm32f4_discovery.h" | |
template<uint32_t GPIO_CLK, intptr_t GPIO_PORT_ADDR> class GPIOPort { | |
public: | |
static GPIOPort& port() { | |
static GPIOPort instance; | |
return instance; | |
}; |
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
//instrumented by nraynaud for testing purpose | |
/******************************************************************************* | |
* * | |
* Author : Angus Johnson * | |
* Version : 5.0.2 * | |
* Date : 30 December 2012 * | |
* Website : http://www.angusj.com * | |
* Copyright : Angus Johnson 2010-2012 * | |
* * |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Simple Bentley Ottmann with mock underlying structures</title> | |
<link rel="stylesheet" href="qunit-1.12.0.css"> | |
<style> | |
.svgTest td { | |
border: solid 1px green; | |
} |
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
//#define UsePolyTree | |
using System; | |
using System.Diagnostics; | |
using System.Text; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Drawing.Drawing2D; | |
using System.Drawing.Imaging; | |
using System.IO; |
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
"use strict"; | |
define(['libs/svg'], (function () { | |
SVG.Marker = SVG.invent({ | |
create: 'marker', | |
inherit: SVG.Container, | |
extend: { | |
getRef: function () { | |
return 'url(#' + this.attr('id') + ')' | |
}, | |
update: function (block) { |
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
-------------------------------------------------------------------- | |
--- | |
----------- | |
-- -- | |
-- GNAT EXAMPLE -- | |
-- -- | |
-- Copyright (C) 2014, Free Software Foundation, Inc. -- | |
-- -- | |
-- GNAT is free software; you can redistribute it and/or modify it under -- | |
-- terms of the GNU General Public License as published by the Free Soft- -- |
OlderNewer