This file contains 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 <BOSL2/std.scad> | |
module pomffo(path1, path2, ratio=1, spacing=10) { | |
path1 = resample_path(path1, spacing=spacing, closed=false); | |
path2 = resample_path(path2, n=len(path1), closed=false); | |
center = [for (i = [0 : len(path1) - 1]) (path1[i] + path2[i]) * 0.5]; | |
tangents = path_tangents(center); | |
sweep( | |
circle(d=1, $fn=32), |
This file contains 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
#[idle] | |
fn idle(_: idle::Context) -> ! { | |
loop { | |
core::sync::atomic::spin_loop_hint(); | |
} | |
} |
This file contains 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
ISO-10303-21; | |
HEADER; | |
/* R_0805_2012Metric.step 3D STEP model for use in ECAD systems | |
* Copyright (C) 2018, kicad StepUp | |
* | |
* This work is licensed under the [Creative Commons CC-BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/legalcode), | |
* with the following exception: | |
* To the extent that the creation of electronic designs that use 'Licensed Material' can be considered to be 'Adapted Material', | |
* then the copyright holder waives article 3 of the license with respect to these designs and any generated files which use data provided | |
* as part of the 'Licensed Material'. |
This file contains 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
function context() | |
ctx = probe_context() | |
ctx.DbgMCU_CR = 0x7 | |
ctx.DbgMCU_APB1_Fz = 0x0 | |
ctx.DbgMCU_APB2_Fz = 0x0 | |
ctx.TraceClk_Pin = 0x40002 | |
ctx.TraceD0_Pin = 0x40003 | |
ctx.TraceD1_Pin = 0x40004 | |
ctx.TraceD2_Pin = 0x40005 | |
ctx.TraceD3_Pin = 0x40006 |
This file contains 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
<sequence name="ResetHardware"> | |
<block> | |
__var nReset = 0x80; | |
__var canReadPins = 0; | |
// De-assert nRESET line | |
canReadPins = (DAP_SWJ_Pins(0x00, nReset, 0) != 0xFFFFFFFF); | |
</block> | |
<!-- Keep reset active for 50 ms --> | |
<control while="1" timeout="50000"/> | |
<control if="canReadPins"> |
This file contains 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
set -e | |
cargo build -p app --target thumbv7m-none-eabi | |
echo "Starting QEMU (Ctrl-A X to exit)" | |
qemu-system-arm \ | |
-cpu cortex-m3 \ | |
-machine lm3s6965evb \ | |
-nographic \ |
This file contains 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
impl<U: UsbCore> UsbClass<U> for CdcAcmClass<U> { | |
fn configure(&mut self, mut config: Config<U>) -> Result<()> { | |
const DESC: InterfaceDescriptor = InterfaceDescriptor::class(USB_CLASS_CDC) | |
.sub_class(CDC_SUBCLASS_ACM).protocol(CDC_PROTOCOL_NONE); | |
let mut assoc = config.interface_association(DESC)?; | |
assoc | |
.interface( |
This file contains 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
impl<U: UsbCore> UsbClass<U> for CdcAcmClass<U> { | |
fn configure(&mut self, mut config: Config<U>) -> Result<()> { | |
const DESC: InterfaceDescriptor = InterfaceDescriptor::class(USB_CLASS_CDC) | |
.sub_class(CDC_SUBCLASS_ACM).protocol(CDC_PROTOCOL_NONE); | |
config | |
.interface_association(|a| a | |
.interface(&mut self.comm_if, DESC, |i| i | |
.descriptor( | |
CS_INTERFACE, |
This file contains 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 crate::Result; | |
use crate::allocator::InterfaceHandle; | |
use crate::class::{ControlIn, ControlOut, UsbClass, PollEvent}; | |
use crate::config::Config; | |
use crate::descriptor::BosWriter; | |
use crate::usbcore::UsbCore; | |
macro_rules! tuple_impls { | |
($($n:tt: $c:ident),+) => { | |
impl<U, $($c),+> UsbClass<U> for ($(&mut $c),+,) |
This file contains 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 crate::Result; | |
use crate::allocator::InterfaceHandle; | |
use crate::class::{ControlIn, ControlOut, UsbClass, PollEvent}; | |
use crate::config::Config; | |
use crate::descriptor::BosWriter; | |
use crate::usbcore::UsbCore; | |
macro_rules! tuple_impls { | |
($($n:tt: $c:ident),+) => { | |
impl<U, $($c),+> UsbClass<U> for ($(&mut $c),+) |
NewerOlder